/* ===================================
   MOBILE BOTTOM NAVIGATION - 2025
   Modern Bottom Tab Bar
   =================================== */

/* Bottom Navigation Container */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--navbar-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 999;
    padding: 8px 0;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Show only on mobile */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: block;
    }
    
    /* Add padding to body to prevent content from being hidden */
    body {
        padding-bottom: 70px;
    }
}

/* Navigation Items Container */
.mobile-bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Individual Nav Item */
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 60px;
    flex: 1;
    max-width: 80px;
}

/* Icon */
.mobile-nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

/* Label */
.mobile-nav-item span {
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Active State */
.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

/* Hover State (for devices with hover capability) */
@media (hover: hover) {
    .mobile-nav-item:hover {
        color: var(--primary);
        background: rgba(255, 107, 53, 0.1);
    }
}

/* Active Indicator */
.mobile-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-item.active::before {
    opacity: 1;
}

/* Badge/Notification Dot */
.mobile-nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    background: #EF4444;
    color: white;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Center FAB (Floating Action Button) Style */
.mobile-nav-item.fab {
    position: relative;
    margin: 0 5px;
}

.mobile-nav-item.fab i {
    background: linear-gradient(135deg, var(--primary), #F77F00);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    margin-bottom: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-item.fab span {
    position: absolute;
    bottom: -18px;
    font-size: 10px;
    white-space: nowrap;
}

.mobile-nav-item.fab:hover i,
.mobile-nav-item.fab:active i {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

/* Hide on Scroll Down, Show on Scroll Up */
.mobile-bottom-nav.hide {
    transform: translateY(100%);
}

/* Dark Mode Specific Styles */
[data-theme="dark"] .mobile-bottom-nav {
    background: var(--navbar-bg);
    border-top-color: var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .mobile-nav-item.active {
    color: var(--primary);
}

/* Safe Area Insets for Modern Devices (iPhone notch, etc.) */
@supports (padding: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

/* Tablet Optimization */
@media (min-width: 576px) and (max-width: 768px) {
    .mobile-nav-item {
        padding: 10px 15px;
        min-width: 70px;
    }
    
    .mobile-nav-item i {
        font-size: 24px;
    }
    
    .mobile-nav-item span {
        font-size: 12px;
    }
    
    .mobile-nav-item.fab i {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }
}

/* Small Mobile Devices */
@media (max-width: 360px) {
    .mobile-nav-item {
        padding: 6px 8px;
        min-width: 50px;
    }
    
    .mobile-nav-item i {
        font-size: 20px;
    }
    
    .mobile-nav-item span {
        font-size: 10px;
    }
    
    .mobile-nav-item.fab i {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

/* Touch Feedback */
.mobile-nav-item:active {
    transform: scale(0.95);
}

.mobile-nav-item.fab:active i {
    transform: scale(0.95);
}

/* Accessibility */
.mobile-nav-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print: Hide Bottom Nav */
@media print {
    .mobile-bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}

/* Loading State */
.mobile-nav-item.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Vibration Effect (Optional) */
@keyframes vibrate {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.mobile-nav-item.vibrate {
    animation: vibrate 0.3s ease;
}
