/* ============================================================
   Mobile & Tablet Layout (under 1024px)
   Single-column with bottom navigation
   ============================================================ */

/* Top bar adjustments */
.top-bar {
    padding: 0 0.75rem;
    height: 52px;
}

.site-title {
    font-size: 1.05rem;
}

.top-bar-center {
    display: none;
}

/* Hide top nav tabs on mobile (use bottom nav) */
.top-nav {
    display: none;
}

#compareToggle {
    display: none;
}

/* Nav toggle visible */
.nav-toggle {
    display: inline-flex;
}

/* Panels become full-screen overlays on mobile */
.app-layout {
    position: relative;
}

.panel-nav {
    position: fixed;
    top: 52px;
    left: 0;
    bottom: 56px;
    width: 100%;
    max-width: 320px;
    z-index: 90;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-lg);
    border-right: 1px solid var(--border);
}

.panel-nav.open {
    transform: translateX(0);
}

.panel-read {
    flex: 1;
    border-right: none;
    width: 100%;
}

.panel-study {
    position: fixed;
    top: 52px;
    right: 0;
    bottom: 56px;
    width: 100%;
    max-width: 360px;
    z-index: 90;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--border);
}

.panel-study.open {
    transform: translateX(0);
}

/* Overlay backdrop */
.panel-overlay {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 56px;
    background: rgba(0, 0, 0, 0.3);
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.panel-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile reading */
.scripture-content {
    padding: 1.25rem 1rem;
}

.reading-header {
    padding: 0.5rem 1rem;
}

.verse-text {
    font-size: 1.05rem;
    line-height: 1.75;
}

.verse-number {
    min-width: 22px;
}

/* Chapter bottom nav */
.chapter-bottom-nav {
    padding: 0.75rem 1rem;
    margin-bottom: 56px;
}

/* Comparison - single column on mobile */
.comparison-translations {
    grid-template-columns: 1fr;
}

/* Mobile bottom nav */
.mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding: 0;
}

.mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.65rem;
    cursor: pointer;
    transition: color var(--transition);
    padding: 0.25rem;
}

.mobile-nav-btn:hover,
.mobile-nav-btn.active {
    color: var(--accent);
}

/* Mobile maps/timeline/quiz adjustments */
.maps-container,
.timeline-container,
.quiz-container {
    padding: 1.25rem 1rem;
    padding-bottom: 70px;
}

.maps-grid {
    grid-template-columns: 1fr;
}

/* Mobile Leaflet map adjustments */
.leaflet-map-header {
    flex-direction: column;
    gap: 0.75rem;
}

.leaflet-map-controls {
    align-items: flex-start;
    width: 100%;
}

.map-view-toggle {
    width: 100%;
    justify-content: center;
}

.map-compare-btn {
    width: 100%;
    justify-content: center;
}

.leaflet-map-container {
    height: 320px;
}

.leaflet-map-comparison {
    flex-direction: column;
}

.leaflet-map-comparison-divider {
    width: 100%;
    height: 3px;
}

.leaflet-map-comparison .leaflet-map-container {
    height: 280px;
}

.legend-items {
    gap: 0.2rem 0.5rem;
}

.legend-item {
    font-size: 0.7rem;
}

.quiz-categories {
    grid-template-columns: 1fr;
}

/* Mobile search - show in a dedicated area */
.mobile-search {
    display: block;
    padding: 0.5rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-light);
}

/* Tablet adjustments (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .panel-nav {
        max-width: 300px;
    }

    .panel-study {
        max-width: 360px;
    }

    .scripture-content {
        padding: 1.5rem 2rem;
    }

    .maps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quiz-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .comparison-translations {
        grid-template-columns: repeat(2, 1fr);
    }

    .leaflet-map-container {
        height: 400px;
    }

    .leaflet-map-comparison {
        flex-direction: row;
    }

    .leaflet-map-comparison-divider {
        width: 3px;
        height: auto;
    }

    .leaflet-map-comparison .leaflet-map-container {
        height: 380px;
    }
}

/* --- Paywall Mobile Adjustments --- */
.paywall-modal {
    padding: 1.5rem;
    max-width: 100%;
    margin: 0 0.5rem;
}

.paywall-title {
    font-size: 1.25rem;
}

/* --- Inline Paywall Banner Mobile --- */
.verse-paywall-banner {
    padding: 1.25rem 1rem;
    margin: 1rem 0;
}

.verse-paywall-banner-features {
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.trans-dropdown {
    right: -0.5rem;
    min-width: 160px;
}
