/**
 * View Mode Toggle — Desktop/Mobile viewport switching styles
 */

/* ========================================
   SIDEBAR VIEW MODE TOGGLE
   ======================================== */

.sidebar-view-toggle {
    display: none; /* Hidden by default, shown on mobile */
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--theme-sidebar-border);
    margin-top: auto;
}

/* Show only on mobile devices */
@media (max-width: 768px) {
    .sidebar-view-toggle {
        display: flex;
    }
}

.view-toggle-label {
    font-size: var(--fs-sm);
    color: var(--theme-sidebar-text);
    font-weight: 500;
}

.view-mode-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--theme-sidebar-hover);
    border: 1px solid var(--theme-sidebar-border);
    border-radius: 14px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.view-mode-toggle:hover {
    background: var(--theme-sidebar-active);
}

.view-toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.view-toggle-mobile {
    left: 6px;
    opacity: 1;
}

.view-toggle-desktop {
    right: 6px;
    opacity: 0.4;
}

.view-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--theme-accent);
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Desktop mode active state */
.view-mode-toggle.is-desktop .view-toggle-slider {
    transform: translateX(28px);
}

.view-mode-toggle.is-desktop .view-toggle-mobile {
    opacity: 0.4;
}

.view-mode-toggle.is-desktop .view-toggle-desktop {
    opacity: 1;
}


/* ========================================
   SIDEBAR THEME PREVIEW TOGGLE
   ======================================== */

.sidebar-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--theme-sidebar-border, rgba(255,255,255,0.1));
}

.theme-toggle-label {
    font-size: var(--fs-sm);
    color: var(--theme-sidebar-text, #9ba3b5);
    font-weight: 500;
}

.theme-toggle-buttons {
    display: flex;
    gap: 4px;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    background: var(--theme-sidebar-hover, rgba(255,255,255,0.05));
    border: 1px solid var(--theme-sidebar-border, rgba(255,255,255,0.1));
    border-radius: 6px;
    color: var(--theme-sidebar-text, #9ba3b5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--theme-accent, #f2a900);
    background: var(--theme-sidebar-active, rgba(255,255,255,0.08));
    color: var(--theme-sidebar-text, #e2e8f0);
}

.theme-toggle-btn.active {
    background: var(--theme-accent, #f2a900);
    border-color: var(--theme-accent, #f2a900);
    color: #111827;
}

.theme-btn-icon {
    font-size: 16px;
    line-height: 1;
}


/* ========================================
   FLOATING DESKTOP MODE INDICATOR
   ======================================== */

/* ========================================
   FIXED TOP-LEFT "BACK TO MOBILE" BUTTON
   Always visible in desktop view mode
   ======================================== */

.mobile-mode-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 99999;
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 18px;
    color: #fff;
    font-family: 'Oswald', 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    align-items: center;
    gap: 8px;
}

.mobile-mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5), 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mobile-mode-btn:active {
    transform: translateY(0);
}

/* Show only in desktop view mode */
html[data-view-mode="desktop"] .mobile-mode-btn {
    display: flex;
}

.mobile-mode-btn-icon {
    font-size: 16px;
}


/* ========================================
   FLOATING BOTTOM INDICATOR (backup/alternative)
   ======================================== */

.desktop-mode-indicator {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 18, 25, 0.95);
    border: 2px solid #3B82F6;
    border-radius: 24px;
    padding: 10px 20px;
    z-index: 99999;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(8px);
    animation: indicatorSlideUp 0.3s ease;
}

/* Hide bottom indicator since we have top-left button now */
.desktop-mode-indicator.is-visible {
    display: none;
}

@keyframes indicatorSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.desktop-mode-indicator-icon {
    font-size: 16px;
}

.desktop-mode-indicator-text {
    font-size: 13px;
    font-weight: 500;
    color: #F0F2F5;
    white-space: nowrap;
}

.desktop-mode-indicator-close {
    background: transparent;
    border: none;
    color: #9BA3B5;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 4px;
    transition: color 0.2s ease;
}

.desktop-mode-indicator-close:hover {
    color: #F0F2F5;
}

/* When logged in with bottomnav, position higher */
body.has-frontend .desktop-mode-indicator {
    bottom: 80px;
}


/* ========================================
   DESKTOP VIEW MODE LAYOUT ADJUSTMENTS
   These rules apply when mobile users view desktop version
   Viewport is 1400px to fit 1320px content + padding
   ======================================== */

/* Main site: expand to fill viewport, remove decorative styling */
html[data-view-mode="desktop"] .site-container {
    max-width: 1380px;  /* Slightly less than 1400px viewport for edge breathing room */
    border-radius: 0;
    box-shadow: none;
}

/* Simplify body background in desktop view mode */
html[data-view-mode="desktop"] body.has-frontend {
    background-color: var(--ct-sidebar-bg);
    background-image: none;
}

/* Splash page: remove forced full-viewport height on scaled desktop view
   On mobile with 1400px viewport, 100vh becomes extremely tall (~2800px)
   Let content determine section height instead */
html[data-view-mode="desktop"] .screen {
    min-height: auto;
    padding-top: 60px;
    padding-bottom: 60px;
}

/* First screen (stadium) - needs some minimum for visual impact */
html[data-view-mode="desktop"] .screen-stadium {
    min-height: 600px;
    padding-top: 80px;
    padding-bottom: 80px;
}

/* Scale up logo and countdown for better visibility when scaled */
html[data-view-mode="desktop"] .logo-container .logo {
    max-width: 500px;
}

html[data-view-mode="desktop"] .countdown {
    transform: scale(1.15);
    transform-origin: center;
}

html[data-view-mode="desktop"] .hero-subtitle,
html[data-view-mode="desktop"] .hero-signup-date {
    font-size: 1.3rem;
}

html[data-view-mode="desktop"] .scroll-cta-btn {
    transform: scale(1.1);
}

/* Features screen */
html[data-view-mode="desktop"] .screen-features {
    padding-top: 60px;
    padding-bottom: 80px;
}

/* Bunker screen */
html[data-view-mode="desktop"] .screen-bunker {
    padding-top: 60px;
    padding-bottom: 100px;
}

/* Content areas - allow more room */
html[data-view-mode="desktop"] .features-content {
    max-width: 1340px;
}

html[data-view-mode="desktop"] .stadium-content {
    max-width: 100%;
}

html[data-view-mode="desktop"] .bunker-content {
    max-width: 100%;
    padding: 0 30px;
}

/* Bunker room container - fill available space */
html[data-view-mode="desktop"] .bunker-room-container {
    max-width: 1340px;
}

/* Hide mobile-only bunker content in desktop mode */
html[data-view-mode="desktop"] .bunker-mobile {
    display: none !important;
}

/* Show desktop bunker content */
html[data-view-mode="desktop"] .bunker-desktop {
    display: flex !important;
}


/* ========================================
   SPLASH PAGE DESKTOP BUTTON
   ======================================== */

.bunker-view-desktop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #D4A24C 0%, #B8860B 50%, #8B6914 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 8px;
    color: #0F1219;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(180, 130, 40, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.bunker-view-desktop-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 25px rgba(180, 130, 40, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.bunker-view-desktop-btn:active {
    transform: translateY(0);
}

/* Hide on actual desktop */
@media (min-width: 769px) {
    .bunker-view-desktop-btn {
        display: none;
    }
}
