/* Bottom Navigation Styles */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    border-top-left-radius: 20px;
    /* Rounded top corners */
    border-top-right-radius: 20px;
    z-index: 1050;
    /* Above most elements like bootstraps maxz */
    padding-bottom: env(safe-area-inset-bottom);
    /* iOS safe area spacing */
    transition: all 0.3s ease-in-out;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #a0a0ab;
    /* Default inactive color */
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* Important for ripple effect */
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.bottom-nav-item span {
    font-size: 11px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: opacity 0.3s ease, font-weight 0.3s ease;
}

/* Active State */
.bottom-nav-item.active {
    color: #007aff;
    /* Modern primary color */
}

.bottom-nav-item.active i {
    transform: translateY(-2px) scale(1.15);
    /* Subtle jump and scale */
    color: #007aff;
}

.bottom-nav-item.active span {
    font-weight: 600;
}

/* Modern Indicator dot below the icon for active state */
.bottom-nav-item::after {
    content: '';
    position: absolute;
    bottom: 8px;
    /* Slightly above the bottom edge */
    width: 4px;
    height: 4px;
    background-color: #007aff;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.bottom-nav-item.active::after {
    opacity: 1;
    transform: scale(1);
}


/* --- Ripple Effect Styles --- */
.bottom-nav-item .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.2);
    /* Faint primary color */
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
    /* Let clicks pass through */
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 
 * Body padding helper 
 * Prevents content from hiding behind the fixed navigation.
 */
body {
    padding-bottom: 75px;
}

/* Desktop sizing adjustments: Hide bottom nav on screens wider than 768px */
@media (min-width: 768px) {
    .bottom-nav {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}