/* ==========================================================================
   Mobile Bottom Navigation (iOS 20 Liquid Glass Island)
   ========================================================================== */

:root {
    --mbn-height: 70px;
    /* Height of the nav bar */
    --mbn-bottom-spacing: 20px;
    /* Spacing from bottom of screen */
    --mbn-border-radius: 35px;
    /* Fully rounded ends */
    --mbn-bg: rgba(255, 255, 255, 0.75);
    /* High transparency white */
    --mbn-blur: 20px;
    /* Strong blur */
    --mbn-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --mbn-active-color: #000;
    --mbn-inactive-color: #999;
}

/* Dark Mode Support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    :root {
        --mbn-bg: rgba(20, 20, 20, 0.75);
        --mbn-active-color: #fff;
        --mbn-inactive-color: #666;
        --mbn-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    }
}

/* The Navigation Container (Fixed Island) */
/* The Navigation Container (Fixed Island) */
.mobile-bottom-nav-island {
    position: fixed;
    /* iOS Safe Area Support */
    bottom: calc(var(--mbn-bottom-spacing) + env(safe-area-inset-bottom));
    bottom: calc(var(--mbn-bottom-spacing) + constant(safe-area-inset-bottom));
    /* iOS < 11.2 */

    left: 20px;
    right: 20px;
    height: var(--mbn-height);
    background: var(--mbn-bg);

    /* Standard & Webkit Backdrop Filter */
    -webkit-backdrop-filter: blur(var(--mbn-blur)) saturate(180%);
    backdrop-filter: blur(var(--mbn-blur)) saturate(180%);

    border-radius: var(--mbn-border-radius);
    box-shadow: var(--mbn-shadow);
    z-index: 99999;
    /* Boost Z-index */

    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
    box-sizing: border-box;
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    /* Sharper border for retina */

    /* Optimize for iOS GPU */
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;

    transition: transform 0.3s ease, bottom 0.3s ease;
}

/* Hide on Desktop */
@media (min-width: 769px) {
    .mobile-bottom-nav-island {
        display: none !important;
    }
}

/* Avoid footer overlapping */
@media (max-width: 768px) {
    body {
        padding-bottom: 100px !important;
        /* Make room for the nav */
    }
}

/* Nav Item */
.mbn-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--mbn-inactive-color);
    flex: 1;
    height: 100%;
    z-index: 2;
    /* Above indicator */
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.mbn-item.active {
    color: var(--mbn-active-color);
}

/* Icon Styling */
.mbn-icon {
    font-size: 24px;
    margin-bottom: 2px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mbn-item.active .mbn-icon {
    transform: translateY(-2px);
    /* Slight lift */
}

/* SVG Support */
.mbn-svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mbn-item.active .mbn-svg {
    transform: translateY(-2px);
}

/* Text Styling */
.mbn-text {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.8;
}

/* The Sliding Blob Indicator */
.mbn-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    width: 50px;
    /* Will be set dynamically via JS */
    height: 50px;
    /* Will be set dynamically */
    background: rgba(255, 255, 255, 0.5);
    /* Light highlight for dark mode or vice versa */
    /* Wait, for iOS style, usually it's not a background blob behind, but the icon color changes. 
       BUT user requested "Sliding Animation like iOS 26". 
       Usually this implies a "Spotlight" or a "Blob" behind the active item.
       Let's stick to a subtle glow or a blob behind. */
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 1;
    /* Behind text/icon */
    opacity: 0;
    /* Hidden initially, shown via JS */
    transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1), width 0.4s ease;
    pointer-events: none;
    filter: blur(8px);
    /* Glow effect */
}

/* Light Mode Specific Blob */
@media (prefers-color-scheme: light) {
    .mbn-indicator {
        background: rgba(0, 0, 0, 0.05);
        /* Subtle dark blob */
    }
}

@media (prefers-color-scheme: dark) {
    .mbn-indicator {
        background: rgba(255, 255, 255, 0.1);
        /* Subtle light blob */
    }
}