/* ==============================================
   MOBILE BOTTOM NAVIGATION
   Modern bottom nav bar for authenticated users
   ============================================== */

:root {
    --bottom-nav-height: 52px;
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4px 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: none; /* Hidden by default, shown on mobile */
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.2s ease;
}

/* iOS safe area: add padding for home indicator */
@supports (-webkit-touch-callout: none) {
    .bottom-nav {
        padding-bottom: max(env(safe-area-inset-bottom), 4px);
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 64px;
    min-height: 44px;
    padding: 6px 12px;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    border-radius: 12px;
    position: relative;
}

.bottom-nav-item i {
    font-size: 22px;
    transition: all 0.2s ease;
}

.bottom-nav-item span {
    opacity: 0.9;
    transition: all 0.2s ease;
}

/* Active state */
.bottom-nav-item.active {
    color: var(--primary-color, #00b4ff);
    font-weight: 600;
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

.bottom-nav-item.active span {
    opacity: 1;
}

/* Hover/tap feedback */
.bottom-nav-item:hover,
.bottom-nav-item:focus {
    background: rgba(0, 180, 255, 0.08);
    outline: none;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    /* Add padding to body to prevent content overlap with fixed bottom nav */
    body {
        padding-bottom: var(--bottom-nav-height) !important;
    }
}

/* iOS: account for safe area in body padding too */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        body {
            padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom)) !important;
        }
    }
}

/* Extra compact for very narrow screens */
@media (max-width: 380px) {
    .bottom-nav-item {
        min-width: 56px;
        padding: 4px 8px;
        font-size: 9px;
    }

    .bottom-nav-item i {
        font-size: 20px;
    }
}

/* Dark mode */
body.dark-mode .bottom-nav {
    background: rgba(26, 26, 26, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .bottom-nav-item {
    color: var(--text-secondary, #9ca3af);
}

body.dark-mode .bottom-nav-item.active {
    color: var(--primary-color, #60a5fa);
}

body.dark-mode .bottom-nav-item:hover,
body.dark-mode .bottom-nav-item:focus {
    background: rgba(96, 165, 250, 0.12);
}
