/* ============================================
   BOTTOM NAVIGATION BAR
   ============================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.3s ease-out;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    position: relative;
    min-width: 60px;
}

.bottom-nav-item:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.bottom-nav-item.active {
    color: var(--accent-primary);
}

.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 0 0 var(--radius-full) var(--radius-full);
}

.bottom-nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    transition: transform var(--transition-fast);
}

.bottom-nav-item:hover .bottom-nav-icon {
    transform: scale(1.1);
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.2);
}

.bottom-nav-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.bottom-nav-fab {
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    z-index: 1001;
}

.bottom-nav-fab:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.bottom-nav-fab:active {
    transform: translateX(-50%) scale(0.95);
}

/* Bottom nav with different themes */
.bottom-nav.theme-dark {
    background: rgba(0, 0, 0, 0.8);
    border-top-color: rgba(255, 255, 255, 0.1);
}

.bottom-nav.theme-light {
    background: rgba(255, 255, 255, 0.9);
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* Hide bottom nav on certain screens */
.bottom-nav.hidden {
    transform: translateY(100%);
    animation: slideDown 0.3s ease-out;
}

/* Responsive adjustments */
@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
}

/* Tab bar indicator animation */
.bottom-nav-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    background: var(--accent-primary);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badge for notifications */
.bottom-nav-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-full);
    min-width: 1.25rem;
    text-align: center;
    animation: pulse 2s infinite;
}

/* Ripple effect for nav items */
.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.3s, height 0.3s, opacity 0.3s;
}

.bottom-nav-item:active::before {
    width: 40px;
    height: 40px;
    opacity: 0.2;
}

/* Safe area for iPhone X+ */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .bottom-nav,
    .bottom-nav-item,
    .bottom-nav-fab,
    .bottom-nav-indicator {
        animation: none;
        transition: none;
    }
    
    .bottom-nav-item:hover,
    .bottom-nav-item:active {
        transform: none;
    }
    
    .bottom-nav-badge {
        animation: none;
    }
}
