/* ========================================
   BOTTOM NAVIGATION (Mobile/Tablet)
   ======================================== */

/* Container - hidden on desktop */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(11, 15, 18, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(43, 157, 238, 0.15);
    padding: 0.25rem 0.75rem;
    padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
    box-shadow:
        0 -8px 32px rgba(0, 0, 0, 0.5),
        0 -1px 0 rgba(43, 157, 238, 0.1);
}

/* Show on tablet and mobile */
@media (max-width: 1024px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    /* Reserve space for fixed bottom nav */
    #main-app-content {
        padding-bottom: calc(var(--bottom-nav-height, 3.75rem) + var(--safe-area-bottom, 0px));
        height: 100dvh;
        /* Use dynamic viewport height if supported */
    }

    /* Add bottom padding to scrolling lists so last items are always visible above nav */
    #active-segments-list,
    #templates-list-container,
    .rundown-cards {
        padding-bottom: 4rem !important;
    }
}

/* Tab Button */
.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex: 1;
    padding: 0.5rem 0.5rem 0.375rem;
    border-radius: 0.75rem;
    background: transparent;
    border: none;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

/* Icon */
.bottom-nav-btn .nav-icon {
    font-size: 24px;
    transition: all 0.2s ease;
    line-height: 1;
}

/* Label */
.bottom-nav-btn .nav-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
}

/* Hover */
.bottom-nav-btn:hover {
    color: #9dadb9;
    background: rgba(255, 255, 255, 0.03);
}

/* Active State */
.bottom-nav-btn.active {
    color: #2b9dee;
    background: rgba(43, 157, 238, 0.08);
}

.bottom-nav-btn.active .nav-icon {
    font-variation-settings: 'FILL' 1;
    transform: translateY(-1px);
}

.bottom-nav-btn.active .nav-label {
    color: #2b9dee;
}

/* Active indicator line */
.bottom-nav-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2.5px;
    border-radius: 0 0 4px 4px;
    background: #2b9dee;
    box-shadow: 0 2px 8px rgba(43, 157, 238, 0.5);
}

/* Hide on desktop */
@media (min-width: 1025px) {
    .bottom-nav {
        display: none !important;
    }

    #main-app-content {
        padding-bottom: 0 !important;
    }
}