/**
 * Mobile Navigation Styling
 * Anpassung der mobilen Navigation an Desktop-Stil
 */

/* Offcanvas below modal stack (modal backdrop 200000 / modal 200010) */
.offcanvas-start {
    width: 280px !important;
    z-index: 1040 !important;
}

.offcanvas-backdrop,
.app-offcanvas-backdrop {
    z-index: 1035 !important;
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(15, 23, 42, 0.45) !important;
}

.app-offcanvas-backdrop.fade:not(.show) {
    opacity: 0;
}
.app-offcanvas-backdrop.show {
    opacity: 1;
}

/* Navbar below modals so dialogs are never covered */
.navbar,
.app-navbar {
    z-index: 1030 !important;
    position: relative;
}

.navbar-toggler {
    z-index: 1031 !important;
    position: relative;
}

.mobile-nav-list {
    pointer-events: auto;
}

/* Mobile navigation links */
.mobile-nav-list a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--bs-body-color);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.mobile-nav-list a:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--bs-primary);
}

[data-bs-theme="dark"] .mobile-nav-list a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Active link styling */
.mobile-nav-list a.fw-semibold,
.mobile-nav-list a.active {
    background-color: var(--bs-primary);
    color: white !important;
    font-weight: 600;
}

/* Section headers */
.mobile-nav-list .text-muted {
    padding: 1rem 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

/* Icons in mobile nav */
.mobile-nav-list a i {
    margin-right: 0.75rem;
    font-size: 1.125rem;
    width: 1.25rem;
    text-align: center;
}

/* Highlighted nav items (e.g., Glücksrad) */
.mobile-nav-list .nav-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.mobile-nav-list .nav-highlight:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Search input in mobile nav */
.offcanvas-body .form-control {
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9375rem;
}

[data-bs-theme="dark"] .offcanvas-body .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.offcanvas-body .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Profile section in mobile nav */
.offcanvas-body a[href*="profile"] {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .offcanvas-body a[href*="profile"] {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.offcanvas-body a[href*="profile"]:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .offcanvas-body a[href*="profile"]:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Offcanvas header */
.offcanvas-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.25rem 1.5rem;
}

[data-bs-theme="dark"] .offcanvas-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.offcanvas-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--bs-body-color);
}

/* Offcanvas body scrolling */
.offcanvas-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* Smooth scrolling */
.offcanvas-body::-webkit-scrollbar {
    width: 6px;
}

.offcanvas-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.offcanvas-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

[data-bs-theme="dark"] .offcanvas-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .offcanvas-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* Spacing adjustments */
.mobile-nav-list > a:not(:last-child),
.mobile-nav-list > div:not(:last-child) {
    margin-bottom: 0.25rem;
}

/* Section dividers */
.mobile-nav-list > .mt-3 {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 1rem !important;
}

[data-bs-theme="dark"] .mobile-nav-list > .mt-3 {
    border-top-color: rgba(255, 255, 255, 0.06);
}
