/**
 * MuleCube Mobile Bottom Navigation Styles
 * iOS-inspired fixed bottom navigation
 */

/* ============================================
   Base Navigation Bar
   ============================================ */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: env(safe-area-inset-bottom, 0);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-bottom-nav.visible {
    transform: translateY(0);
}

/* Light theme */
[data-theme="light"] .mobile-bottom-nav,
[data-display-mode="day"] .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* ============================================
   Navigation Items Container
   ============================================ */

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    max-width: 500px;
    margin: 0 auto;
    padding: 8px 16px;
}

/* ============================================
   Individual Navigation Item
   ============================================ */

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    min-width: 64px;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

/* Active state */
.mobile-nav-item.active {
    color: #22c55e;
}

.mobile-nav-item.active .nav-icon svg {
    stroke-width: 2.5;
}

/* Light theme */
[data-theme="light"] .mobile-nav-item,
[data-display-mode="day"] .mobile-nav-item {
    color: #94a3b8;
}

[data-theme="light"] .mobile-nav-item:hover,
[data-display-mode="day"] .mobile-nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .mobile-nav-item.active,
[data-display-mode="day"] .mobile-nav-item.active {
    color: #16a34a;
}

/* ============================================
   Icon Styles
   ============================================ */

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
    transition: stroke-width 0.2s ease;
}

/* ============================================
   Label Styles
   ============================================ */

.nav-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1;
}

/* ============================================
   Hide on Desktop
   ============================================ */

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}

/* ============================================
   Mobile Landscape
   ============================================ */

@media (max-width: 768px) and (orientation: landscape) {
    .mobile-nav-items {
        padding: 4px 24px;
    }
    
    .mobile-nav-item {
        flex-direction: row;
        gap: 8px;
        padding: 6px 12px;
    }
    
    .nav-icon {
        width: 24px;
        height: 24px;
    }
    
    .nav-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .nav-label {
        font-size: 12px;
    }
}

/* ============================================
   Small Screens
   ============================================ */

@media (max-width: 380px) {
    .mobile-nav-item {
        padding: 8px 12px;
        min-width: 56px;
    }
    
    .nav-label {
        font-size: 9px;
    }
}

/* ============================================
   Focus States (Accessibility)
   ============================================ */

.mobile-nav-item:focus {
    outline: none;
}

.mobile-nav-item:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .mobile-bottom-nav,
    .mobile-nav-item {
        transition: none;
    }
    
    .mobile-nav-item:active {
        transform: none;
    }
}

/* ============================================
   Body Padding Adjustment
   ============================================ */

@media (max-width: 768px) {
    body.has-mobile-nav {
        padding-bottom: 80px !important;
    }
    
    /* Account for safe area */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        body.has-mobile-nav {
            padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
        }
    }
}
