/* Landing <-> Demo Toggle Styles — v7 (FIX #182601 attempt #9) */
/* CRITICAL: ALL sizing for #demo-view and its iframe is done by JS inline styles.
   CSS must NOT use !important on height/min-height — it overrides JS pixel values
   and viewport units (100vh) are unreliable on mobile Safari in dynamic containers.
   CSS here is COSMETIC ONLY + fallback. JS is the single source of truth. */

/* View Container — simple wrapper */
.view-container {
    position: relative;
    width: 100%;
}

/* Demo view layout — FALLBACK sizing only (JS sets explicit pixels) */
#demo-view {
    width: 100%;
    position: relative;
    background: #0A0A0A;
    /* NO min-height here — JS controls it with explicit pixels */
}

/* Iframe inside demo view — FALLBACK only (JS sets explicit pixels) */
#demo-view iframe {
    display: block;
    width: 100%;
    border: none;
    position: relative;
    z-index: 1;
    /* NO height/min-height here — JS controls it with explicit pixels */
}

/* =============================================
   Toggle Switch UI (cosmetic only)
   ============================================= */
.view-toggle-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 12px;
}

.view-toggle {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 100px;
    padding: 6px;
    display: flex;
    gap: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.toggle-option {
    padding: 10px 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #A8A29E;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
    border: none;
    background: none;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* FIX: Remove iOS tap flash */
}

.toggle-option:hover {
    color: #F5F5F4;
}

.toggle-option.active {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
    color: #0A0A0A;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.toggle-option.active:hover {
    color: #0A0A0A;
}

/* =============================================
   Mobile — toggle sizing + demo view fixes
   ============================================= */
@media (max-width: 768px) {
    .view-toggle-container {
        top: 70px;
        left: 12px;
        right: 12px;
        transform: none;
        width: calc(100% - 24px);
    }

    .view-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .toggle-option {
        flex: 1;
        text-align: center;
        padding: 10px 16px;
        font-size: 13px;
    }

    /* FIX #182601 v9: NO !important sizing — JS sets explicit pixels.
       Only cosmetic fallbacks here in case JS hasn't run yet. */
    #demo-view {
        width: 100%;
    }

    #demo-view iframe {
        width: 100%;
    }
}
