/* Mobile Bottom Navigation Bar Styles - Material 3 Design (Light Theme Enforced) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* M3 Surface Container color (Light) */
    background: #f0f4f8;
    border-top: none;
    z-index: 50;
    height: 80px;
    /* M3 standard height */
    padding: 12px 0 16px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    display: none;
    /* Hidden on desktop by default */
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    /* On Surface Variant */
    text-decoration: none;
    transition: all 0.2s ease;
    width: 20%;
    max-width: 64px;
    /* Limit touch target width */
    cursor: pointer;
    border: none;
    background: transparent;
    gap: 4px;
}

.mobile-nav-item i {
    font-size: 24px;
    /* M3 Icon size */
    z-index: 2;
    padding: 4px 20px;
    border-radius: 16px;
    /* Pill shape */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-item span {
    font-size: 12px;
    /* M3 Label Text */
    font-weight: 500;
    text-align: center;
    line-height: 16px;
    letter-spacing: 0.5px;
}

/* Active State */
.mobile-nav-item.active {
    color: #0f172a;
    /* On Surface (Darker text) */
}

.mobile-nav-item.active i {
    background-color: hsl(24 100% 41.4%);
    /* Primary Color for Active Indicator */
    color: #ffffff;
    /* On Primary */
    width: 64px;
    /* Fixed width for pill */
    padding: 4px 0;
    /* Adjust vertical padding to center */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 32px;
    /* Fixed height for pill */
}

/* Hover/Focus States */
.mobile-nav-item:hover {
    color: #1a202c;
}

/* Account for safe area on iPhone X+ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-nav {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        height: calc(80px + env(safe-area-inset-bottom));
    }
}

/* Media Queries */
@media (max-width: 1023px) {
    body {
        padding-bottom: 90px;
        /* 80px nav + margin */
    }

    footer {
        padding-bottom: 100px;
    }

    .mobile-bottom-nav {
        display: flex;
    }
}

/* Remove old leftover styles */
.mobile-nav-item.active::after {
    display: none;
}