/**
 * VenueCast Bottom Tab Bar — Mobile Navigation
 * Displayed on mobile (≤768px) on all main pages except admin.
 *
 * NOTE: The bar is injected as a <div role="navigation"> (not <nav>) so it
 * never inherits page-level `nav { position: fixed; top: 0; padding: … }`
 * styles. No !important wars needed for core positioning.
 */

.vc-bottom-nav {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    /* Spacing so page content doesn't hide behind the bar */
    body.has-bottom-nav {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 4px));
        min-height: 100dvh;
    }

    .vc-bottom-nav {
        /* Position */
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 9999;

        /* Layout */
        flex-direction: row;
        align-items: stretch;
        justify-content: space-evenly;
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom, 0);
        gap: 0;

        /* Appearance */
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid #e2ddd5;
        box-shadow: 0 -2px 20px rgba(13, 17, 23, 0.08);
    }

    .vc-bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px;
        min-height: 56px;
        text-decoration: none;
        color: #9ca3af;
        font-size: 0.62rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        transition: color 0.18s ease, transform 0.12s ease;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        position: relative;
    }

    .vc-bottom-nav-item:active {
        transform: scale(0.93);
    }

    .vc-bottom-nav-item.active {
        color: #e85d26;
    }

    /* Active indicator dot */
    .vc-bottom-nav-item.active::after {
        content: '';
        position: absolute;
        top: 6px;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: #e85d26;
        opacity: 0.7;
    }

    .vc-bottom-nav-item svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        transition: transform 0.18s ease;
    }

    .vc-bottom-nav-item.active svg {
        transform: translateY(-1px) scale(1.08);
    }

    .vc-bottom-nav-label {
        display: block;
        line-height: 1;
    }

    /* Replace hamburger with bottom tab bar on mobile */
    body.has-bottom-nav .nav-hamburger {
        display: none !important;
    }

    /* On pages with bottom nav, keep top nav compact (logo only) */
    body.has-bottom-nav nav {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    /* Hide language selector from top nav on mobile — now accessible via Settings tab */
    body.has-bottom-nav #vc-lang-container,
    body.has-bottom-nav #lang-switcher {
        display: none !important;
    }

    /* Dark mode support for bottom nav */
    html.dark .vc-bottom-nav {
        background: rgba(18, 18, 30, 0.97);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    html.dark .vc-bottom-nav-item {
        color: rgba(255, 255, 255, 0.45);
    }
    html.dark .vc-bottom-nav-item.active {
        color: #e85d26;
    }
}
