/* ============================================
   DOWNLOAD MODAL - REDESIGNED
   ============================================ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms ease, visibility 300ms ease;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-white);
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 48px 40px 32px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
    transition: all 200ms ease;
}

.modal-close:hover {
    background: var(--border-subtle);
    color: var(--text-primary);
}

/* Logo Section */
.logo-box {
    width: 64px;
    height: 64px;
    background: var(--text-primary);
    border-radius: 16px;
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.15);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    align-self: center;
    letter-spacing: 0.02em;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 12px 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.subtitle {
    font-size: 15px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    margin: 0 0 32px 0;
    padding: 0 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Form Styling */
.download-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-input {
    height: 52px;
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-white);
    padding: 0 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 200ms ease;
    outline: none !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    border-color: var(--border-light) !important;
}

.form-input:focus-visible {
    outline: none !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

.form-input.error {
    border-color: #FF3B30;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02), 0 0 0 3px rgba(255, 59, 48, 0.1);
    color: #FF3B30;
}

.helper-text {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.form-error {
    font-size: 13px;
    color: #FF3B30;
    min-height: 18px;
    display: block;
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Button Styling */
.primary-button {
    height: 56px;
    border-radius: 999px;
    background: var(--text-primary);
    color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    border: none;
    transition: all 200ms ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.2);
}

.primary-button:active:not(:disabled) {
    transform: translateY(0);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.primary-button svg {
    width: 20px;
    height: 20px;
}

.btn-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.system-note {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
    font-weight: 500;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Success Message */
.modal-success-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: var(--primary-green-light);
    border-radius: 12px;
    color: var(--primary-green);
    font-weight: 500;
    animation: slideUp 300ms ease;
    flex-direction: column;
    margin: 0;
}

.modal-success-message svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.modal-success-message p {
    margin: 0;
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-light);
    margin: 32px 0 24px;
    width: 100%;
}

/* Trust Section */
.trust-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.trust-item svg {
    width: 16px;
    height: 16px;
    color: var(--primary-green);
    flex-shrink: 0;
}

.footer-text {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.footer-text a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: all 200ms ease;
}

.footer-text a:hover {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
    }

    .modal-container {
        padding: 36px 24px 24px;
        border-radius: 20px;
    }

    .heading {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modal-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
    }

    .modal-container {
        padding: 32px 20px 20px;
        border-radius: 16px;
    }

    .modal-close {
        width: 28px;
        height: 28px;
    }

    .logo-box {
        width: 56px;
        height: 56px;
    }

    .heading {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .eyebrow {
        font-size: 12px;
        padding: 5px 12px;
        margin-bottom: 16px;
    }

    .trust-row {
        flex-direction: column;
        gap: 12px;
    }

    .trust-item {
        justify-content: center;
        width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 375px) {
    .modal-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
    }

    .modal-container {
        padding: 28px 16px 16px;
        max-width: calc(100vw - 32px);
    }

    .heading {
        font-size: 20px;
    }

    .subtitle {
        font-size: 12px;
    }

    .form-input {
        height: 48px;
        font-size: 14px;
    }
}
