/* Bottom Navigation Menu for Mobile - Native Mobile App Style */

.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 0.5px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 -1px 30px rgba(0, 0, 0, 0.08) !important;
    z-index: 9999 !important;
    padding: 0 !important;
    display: block !important;
    height: 70px !important;
}

.bottom-nav .container-fluid {
    padding: 0;
    max-width: 100%;
    height: 100%;
}

.bottom-nav .row {
    height: 100%;
    margin: 0;
}

.bottom-nav-item {
    padding: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8E8E93;
    padding: 6px 4px 8px 4px;
    width: 100%;
    height: 100%;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    border-radius: 12px;
    margin: 4px 2px;
    min-height: 54px;
}

.bottom-nav-link:hover,
.bottom-nav-link:focus {
    color: #2ea3a5;
    text-decoration: none;
    background-color: rgba(46, 163, 165, 0.08);
    transform: scale(1.05);
}

.bottom-nav-link.active {
    color: #2ea3a5;
    background-color: rgba(46, 163, 165, 0.12);
    transform: scale(1.02);
}

.bottom-nav-link i {
    font-size: 20px;
    margin-bottom: 3px;
    transition: all 0.2s ease;
}

.bottom-nav-link.active i {
    transform: scale(1.1);
}

.bottom-nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 3px;
    object-fit: contain;
    transition: all 0.2s ease;
}

.bottom-nav-link.active .bottom-nav-icon {
    transform: scale(1.1);
}

.bottom-nav-link span {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    margin-top: 1px;
    letter-spacing: -0.2px;
    transition: all 0.2s ease;
}

.bottom-nav-link.active span {
    font-weight: 600;
    transform: scale(1.05);
}

/* Add padding to body to prevent content from being hidden behind bottom nav */
body {
    padding-bottom: 76px !important;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
    .bottom-nav {
        height: 65px !important;
    }
    
    .bottom-nav-link {
        padding: 5px 2px 7px 2px;
        min-height: 50px;
        margin: 3px 1px;
    }
    
    .bottom-nav-link i {
        font-size: 18px;
    }
    
    .bottom-nav-icon {
        width: 18px;
        height: 18px;
    }
    
    .bottom-nav-link span {
        font-size: 10px;
    }
    
    body {
        padding-bottom: 71px !important;
    }
}

/* Tablet and larger screens - hide bottom nav */
@media (min-width: 768px) {
    .bottom-nav {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
}

/* Active state indicator */
.bottom-nav-link.active::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, #2ea3a5, #267577);
    border-radius: 2px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 20px;
        opacity: 1;
    }
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .bottom-nav-link:active {
        background-color: rgba(46, 163, 165, 0.2) !important;
        transform: scale(0.96) !important;
        transition: all 0.1s ease !important;
    }
    
    .bottom-nav-link:active i,
    .bottom-nav-link:active .bottom-nav-icon,
    .bottom-nav-link:active span {
        transform: scale(0.9) !important;
    }
}

/* Haptic feedback animation */
.bottom-nav-link {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* iOS Safari safe area support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom) !important;
        height: calc(70px + env(safe-area-inset-bottom)) !important;
    }
    
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    }
    
    @media (max-width: 480px) {
        .bottom-nav {
            height: calc(65px + env(safe-area-inset-bottom)) !important;
        }
        
        body {
            padding-bottom: calc(71px + env(safe-area-inset-bottom)) !important;
        }
    }
}

/* Smooth scroll behavior when nav is tapped */
html {
    scroll-behavior: smooth;
}

/* Dropdown Menu Styling - Updated for native look */
.bottom-nav .dropdown-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 10px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 220px;
    padding: 8px;
}

.bottom-nav .dropdown-item {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #1D1D1F;
    display: flex;
    align-items: center;
    border-radius: 12px;
    margin: 2px 0;
    transition: all 0.2s ease;
}

.bottom-nav .dropdown-item:hover {
    background-color: rgba(46, 163, 165, 0.08);
    color: #2ea3a5;
    transform: scale(1.02);
}

.bottom-nav .dropdown-item i {
    width: 24px;
    text-align: center;
    margin-right: 12px;
    font-size: 16px;
}
