/*! purgecss start ignore */
/* 🔧 SIDEBAR & LAYOUT FIX v2.0
 *
 * DESKTOP sidebar → see radim-inline.css (single source of truth)
 * This file handles ONLY:
 *   - Mobile/tablet bottom navigation (≤1024px)
 *   - Hamburger overlay menu
 *   - Activation/splash overlays
 *   - Color presets & UI elements
 */

/* ============================================================================
   MOBILE + TABLET: Bottom navigation + scrollable layout (1024px-)
   ============================================================================ */
@media (max-width: 1024px) {
    /* Allow page to scroll on mobile */
    html {
        overflow-x: hidden !important;
        overflow-y: scroll !important;
        height: 100% !important;
    }

    body {
        overflow-x: hidden !important;
        overflow-y: visible !important;
        height: auto !important;
        min-height: 100% !important;
    }

    .app-container,
    .radim-main-container {
        height: auto !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .dashboard-layout {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        gap: 0 !important;
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .main-panel,
    main.main-panel {
        position: relative !important;
        transform: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        max-height: none !important;
        min-height: calc(100vh - 140px) !important;
        min-height: calc(100dvh - 140px) !important;
        background: #f8fafa !important;
        z-index: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Module sections — visible stacking */
    /* Top padding = 60px mobile-header + 34px info-strip + 6px gap = 100px */
    .module-section {
        position: relative !important;
        transform: none !important;
        width: 100% !important;
        min-height: calc(100vh - 140px) !important;
        min-height: calc(100dvh - 140px) !important;
        padding: 16px !important;
        padding-top: 88px !important;
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
        background: #f8fafa !important;
        overflow-y: auto !important;
    }

    .module-section.hidden {
        display: none !important;
    }

    /* Sidebar as bottom nav — Light Radim theme */
    /* ALWAYS visible — menu-hidden class must NOT hide it */
    aside.sidebar,
    aside.sidebar.menu-hidden {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        min-width: 100% !important;
        height: 80px !important;
        max-height: 80px !important;
        min-height: 80px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        overflow-y: hidden !important;
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        padding: 4px 4px !important;
        padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)) !important;
        border-right: none !important;
        border-left: none !important;
        border-top: 1px solid rgba(91, 168, 160, 0.15) !important;
        background: rgba(255, 255, 255, 0.97) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        backdrop-filter: blur(20px) !important;
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06) !important;
        z-index: 1100 !important;
        transform: none !important;
        transition: none !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        gap: 0 !important;
        scrollbar-width: none !important; /* Hide scrollbar Firefox */
    }

    /* Hide scrollbar but keep scrollable */
    aside.sidebar::-webkit-scrollbar {
        display: none !important;
        height: 0 !important;
    }

    /* Hide ::before pseudo-element (old Radim Care header) */
    aside.sidebar::before {
        display: none !important;
        content: '' !important;
    }

    aside.sidebar button {
        display: flex !important;
        width: 68px !important;
        min-width: 68px !important;
        max-width: 68px !important;
        height: 70px !important;
        min-height: 70px !important;
        padding: 8px 4px !important;
        margin: 0 !important;
        font-size: 0.7rem !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        color: #718096 !important;
        background: transparent !important;
        border: none !important;
        border-bottom: none !important;
        border-radius: 10px !important;
        transition: all 0.2s ease !important;
    }

    aside.sidebar button:hover,
    aside.sidebar button:active {
        background: rgba(91, 168, 160, 0.06) !important;
    }

    aside.sidebar button.active {
        color: var(--accent-primary, #5BA8A0) !important;
        background: rgba(91, 168, 160, 0.08) !important;
        border-left: none !important;
    }

    aside.sidebar button span:first-child {
        font-size: 1.8rem !important;
        line-height: 1.1 !important;
    }

    aside.sidebar button span:last-child {
        font-size: 0.75rem !important;
        line-height: 1.15 !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 68px !important;
    }

    aside.sidebar button.active span:last-child {
        font-weight: 700 !important;
        color: var(--accent-primary, #5BA8A0) !important;
    }

    /* Hide sidebar scrollbar on mobile (still scrollable via touch) */
    aside.sidebar::-webkit-scrollbar {
        height: 0 !important;
        display: none !important;
    }

    aside.sidebar {
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE/Edge */
    }

    /* Scroll fade indicator — right edge gradient */
    aside.sidebar::after {
        content: '' !important;
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        right: 0 !important;
        width: 32px !important;
        height: 60px !important;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.95)) !important;
        pointer-events: none !important;
        z-index: 1001 !important;
    }

    /* ─── HAMBURGER OVERLAY: sidebar becomes fullscreen menu ─── */
    aside.sidebar.menu-overlay {
        top: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 80px 12px 16px !important;  /* top padding for topbar */
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        gap: 4px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(91, 168, 160, 0.15) !important;
        box-shadow: none !important;
        z-index: 1200 !important;
    }

    aside.sidebar.menu-overlay button {
        max-width: 100% !important;
        width: 100% !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        padding: 14px 18px !important;
        font-size: 1.15rem !important;
        gap: 14px !important;
        border-radius: 14px !important;
        color: #4a5568 !important;
        min-height: 56px !important;
    }

    aside.sidebar.menu-overlay button span:first-child {
        font-size: 1.7rem !important;
    }

    aside.sidebar.menu-overlay button span:last-child {
        font-size: 1.1rem !important;
        max-width: none !important;
        white-space: normal !important;
        font-weight: 500 !important;
    }

    aside.sidebar.menu-overlay button.active {
        background: rgba(91, 168, 160, 0.1) !important;
        color: var(--accent-primary, #5BA8A0) !important;
    }

    aside.sidebar.menu-overlay button:active {
        background: rgba(91, 168, 160, 0.15) !important;
        transform: scale(0.98);
    }

    aside.sidebar.menu-overlay::after {
        display: none !important;
    }

    /* Hide "Více" on mobile bottom nav — hamburger ☰ handles full menu */
    aside.sidebar .sidebar-more-toggle,
    aside.sidebar .sidebar-more-content {
        display: none !important;
    }

    /* In fullscreen overlay — show all items from "Více" */
    aside.sidebar.menu-overlay .sidebar-more-content {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    aside.sidebar.menu-overlay .sidebar-more-content button {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ============================================================================
   ACTIVATION & SPLASH OVERLAYS
   (.radim-activation-overlay base styles in radim-branding.css + radim-inline.css)
   ============================================================================ */
.radim-activation-overlay .text-center {
    text-align: center;
}

/* .radim-activate-btn, .radim-splash — canonical definitions in radim-inline.css */

.radim-main-container {
    display: none;
    flex-direction: column;  /* topbar above dashboard-layout */
    width: 100%;
    min-height: 100vh;
}

/* ============================================================================
   COLOR PRESETS & UI ELEMENTS
   ============================================================================ */
.color-preset-btn {
    padding: 15px 25px;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    background: transparent;
}

.color-preset-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.preset-red { background: linear-gradient(135deg, #ff6b6b, #ee5a6f); }
.preset-blue { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.preset-green { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.preset-purple { background: linear-gradient(135deg, #a8edea, #fed6e3); }
.preset-orange { background: linear-gradient(135deg, #fa709a, #fee140); }
.preset-pink { background: linear-gradient(135deg, #ffecd2, #fcb69f); }

.color-preset {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-preset:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.color-preset[data-color="#4facfe"] { background: #4facfe; }
.color-preset[data-color="#00f2fe"] { background: #00f2fe; }
.color-preset[data-color="#43e97b"] { background: #43e97b; }
.color-preset[data-color="#f093fb"] { background: #f093fb; }
.color-preset[data-color="#ff6b6b"] { background: #ff6b6b; }
.color-preset[data-color="#fee140"] { background: #fee140; }
.color-preset[data-color="#fa709a"] { background: #fa709a; }
.color-preset[data-color="#5BA8A0"] { background: #5BA8A0; }

#accent-color-picker {
    width: 80px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.color-palette {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-picker-controls {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    flex-wrap: wrap;
}

.color-picker-controls label {
    font-size: var(--font-base);
}

/* Soul Section Styles */
.soul-reflection-text {
    font-style: italic;
}

.soul-value-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border-radius: 2rem;
    margin: 0.25rem;
    font-weight: 600;
}

.lesson-metadata {
    font-size: 0.875rem;
}

.lesson-timestamp {
    font-size: 0.75rem;
}
/*! purgecss end ignore */
