/**
 * Download Modal Styles
 * Consistent with Show Us Modal and VEXML aesthetic
 */

/* Modal Overlay */
.download-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 11000;
    /* Higher than Show Us if needed, or same */
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(5px);
}

.download-modal-overlay.active {
    display: flex;
}

/* Modal Container */
.download-modal {
    background: #1a1a1a;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    /* Slightly narrower than Show Us for focus */
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
}

/* Close Button */
.download-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.download-modal-close:hover {
    opacity: 1;
}

.download-modal-close::before,
.download-modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #ffffff;
    transform-origin: center;
}

.download-modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.download-modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Header */
.download-modal-header {
    padding: 40px 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.download-modal-logo {
    width: 60px;
    height: auto;
    margin-bottom: 20px;
}

.download-modal-title {
    font-family: 'Sui Generis', Georgia, serif;
    font-size: 24px;
    color: #ffffff;
    letter-spacing: 2px;
    margin: 0 0 10px;
}

.xirod-branded-text {
    font-family: 'XIROD', sans-serif;
    background: linear-gradient(90deg, #F9EC2E 0%, #EB0084 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-size: 24px;
    /* Ensure size matches or exceeds title */
}

.download-modal-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #888888;
    margin: 0;
}

/* Body */
.download-modal-body {
    padding: 10px 40px 40px;
}

/* OS Buttons */
.download-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.download-os-btn {
    display: flex;
    align-items: center;
    background: #222;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    text-align: left;
    width: 100%;
}

.download-os-btn:hover {
    background: #2a2a2a;
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Active/Selected state gradient border effect via pseudo-element not strictly needed if we just use hover,
   but let's make it look premium on hover */
.download-os-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #FD724C, #EF405C);
    opacity: 0;
    transition: opacity 0.3s;
}

.download-os-btn:hover::before {
    opacity: 1;
}

.os-icon {
    width: 32px;
    height: 32px;
    margin-right: 20px;
    color: #fff;
    flex-shrink: 0;
}

.os-info {
    display: flex;
    flex-direction: column;
}

.os-name {
    font-family: 'XIROD', sans-serif;
    font-size: 14px;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.os-desc {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #888;
}

/* Legacy Section */
.download-legacy-section {
    border-top: 1px solid #333;
    padding-top: 20px;
}

.legacy-toggle-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #666;
    transition: color 0.2s;
}

.legacy-toggle-btn:hover {
    color: #aaa;
}

.legacy-toggle-btn span {
    font-weight: 500;
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.legacy-toggle-btn.active .chevron-icon {
    transform: rotate(180deg);
}

.legacy-content {
    padding-top: 16px;
    animation: fadeIn 0.3s ease;
}

.legacy-empty-state {
    text-align: center;
    padding: 20px;
    background: #222;
    border-radius: 8px;
}

.legacy-empty-state p {
    font-family: 'Sui Generis', Georgia, serif;
    font-size: 12px;
    color: #EF405C;
    /* Using brand pink for the happy message */
    margin: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .download-modal-body {
        padding: 10px 24px 30px;
    }

    .download-os-btn {
        padding: 16px;
    }
}