/* ==============================================
   MOBILE BOTTOM NAVIGATION
   Modern bottom nav bar for authenticated users
   ============================================== */

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    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;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 64px;
    min-height: 48px; /* iOS accessibility minimum */
    padding: 8px 12px;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    border-radius: 12px;
    position: relative;
}

.bottom-nav-item i {
    font-size: 24px;
    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 main content to prevent overlap with bottom nav */
    main,
    .main-content,
    #main-content {
        padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    }
}

/* Extra compact for very narrow screens */
@media (max-width: 380px) {
    .bottom-nav-item {
        min-width: 56px;
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .bottom-nav-item i {
        font-size: 22px;
    }
}

/* 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);
}

/* Safe area insets for iPhone notch/home indicator */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}
