/*
 * Reelify — Windows / Linux / Android waitlist (isolated add-on)
 * Every selector is prefixed with .wl- / #wl so nothing here can affect existing styles.
 * These rules are inert unless js/windows-waitlist.js injects its elements
 * (banner/modal: non-Mac visitors only; inline form: /reelify-ai-windows page).
 */

/* ---------- Top banner ---------- */
.wl-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    /* above .main-header (100), below .platform-modal (10000) */
    background: linear-gradient(135deg, rgba(10, 10, 14, 0.96), rgba(18, 18, 24, 0.96));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 44px 10px 20px;
    animation: wlSlideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wlSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wl-banner {
        animation: none;
    }
}

.wl-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.wl-banner-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
}

.wl-banner-msg {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

.wl-banner-msg:empty {
    display: none;
}

.wl-banner-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.wl-banner-close:hover,
.wl-banner-close:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

/* Push fixed header + page content down by the banner's measured height */
body.wl-has-banner {
    padding-top: var(--wl-banner-h, 50px);
}

body.wl-has-banner .main-header {
    top: var(--wl-banner-h, 50px);
}

/* Keep the expanded non-Mac modal usable on short screens. */
.platform-modal-content.wl-modal-content {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .platform-modal-content.wl-modal-content {
        max-height: calc(100vh - 40px);
        max-height: calc(100dvh - 40px);
    }
}

@media (max-width: 480px) {
    .platform-modal-content.wl-modal-content {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
}

/* ---------- Shared form ---------- */
.wl-form {
    display: flex;
    align-items: stretch;
}

.wl-email {
    min-width: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    outline: none;
    transition: border-color 0.25s ease;
}

.wl-email::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.wl-email:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.wl-submit {
    background: linear-gradient(135deg, #F8FAFC 0%, #94A3B8 100%);
    color: #000;
    border: none;
    font-family: 'Geist Mono', 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.wl-submit:hover {
    opacity: 0.9;
}

.wl-submit:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.wl-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Banner variant */
.wl-form--banner {
    gap: 6px;
}

.wl-form--banner .wl-email {
    width: 190px;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
}

.wl-form--banner .wl-submit {
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.65rem;
}

/* Modal variant */
.wl-modal-block {
    margin: 24px 0 8px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    text-align: left;
}

.wl-modal-title {
    margin: 0 0 4px;
    font-family: 'Geist Mono', 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

.wl-modal-sub {
    margin: 0 0 14px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
}

.wl-form--modal {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    overflow: hidden;
}

.wl-form--modal .wl-email {
    flex: 1;
    border: none;
    background: transparent;
    padding: 13px 16px;
    font-size: 0.9rem;
}

.wl-form--modal .wl-submit {
    padding: 13px 20px;
    font-size: 0.68rem;
}

.wl-modal-msg {
    margin: 10px 0 0;
    font-size: 0.8rem;
    min-height: 1.2em;
}

.wl-modal-msg:empty {
    margin: 0;
    min-height: 0;
}

/* Inline variant (dedicated waitlist page) */
.wl-form--inline {
    width: 100%;
    max-width: 520px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px;
    transition: border-color 0.25s ease;
}

.wl-form--inline:focus-within {
    border-color: rgba(255, 255, 255, 0.4);
}

.wl-form--inline .wl-email {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 18px;
    font-size: 0.95rem;
}

.wl-form--inline .wl-submit {
    border-radius: 9999px;
    padding: 12px 22px;
    font-size: 0.68rem;
}

.wl-inline-msg {
    margin: 12px 0 0;
    font-size: 0.85rem;
    min-height: 1.2em;
}

.wl-inline-msg:empty {
    margin: 0;
    min-height: 0;
}

/* Message states */
.wl-banner-msg.is-success,
.wl-modal-msg.is-success,
.wl-inline-msg.is-success {
    color: rgba(255, 255, 255, 0.9);
}

.wl-banner-msg.is-error,
.wl-modal-msg.is-error,
.wl-inline-msg.is-error {
    color: rgba(255, 120, 120, 0.9);
}

/* Utilities */
.wl-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.wl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
    .wl-banner {
        padding: 8px 40px 8px 12px;
    }

    .wl-banner-inner {
        gap: 8px;
    }

    .wl-banner-text {
        font-size: 0.72rem;
        text-align: center;
        width: 100%;
    }

    .wl-form--banner {
        width: 100%;
        justify-content: center;
    }

    .wl-form--banner .wl-email {
        width: 150px;
        font-size: 0.72rem;
    }

    .wl-form--modal {
        flex-direction: column;
    }

    .wl-form--modal .wl-submit {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .wl-form--inline {
        flex-direction: column;
        border-radius: 16px;
        gap: 6px;
    }

    .wl-form--inline .wl-submit {
        border-radius: 12px;
        padding: 14px 20px;
    }
}