/* Bottom Navigation Bar (Airbnb-style) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: calc(0.5rem + 15px) 0 calc(1.25rem + 5px + env(safe-area-inset-bottom)) 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    /* Prevent Chrome mobile address bar from affecting position */
    height: calc(60px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    /* Chrome iOS fixes for address bar scroll behavior */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    min-width: 0;
}

.nav-item:active {
    opacity: 0.6;
}

.nav-item.active {
    color: var(--button-color);
}

.nav-item.has-active-filters {
    color: var(--accent-color);
}

.nav-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    flex-shrink: 0;
}

.nav-label {
    font-size: 0.6875rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* Responsive sizing for larger screens */
@media (min-width: 600px) {
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        border-radius: 12px 12px 0 0;
    }
}

/* Desktop: move nav to top */
@media (min-width: 800px) {
    .bottom-nav {
        position: fixed;
        top: 0;
        bottom: auto;
        left: 0;
        right: 0;
        max-width: none;
        transform: none;
        border-top: none;
        border-bottom: 1px solid var(--border-color);
        border-left: none;
        border-right: none;
        border-radius: 0;
        padding: 0.75rem 1rem;
        height: 60px;
    }

    .nav-item {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
    }

    .nav-label {
        font-size: 0.9375rem;
    }

    /* Adjust content for top nav */
    .incident-list {
        padding-top: calc(60px + 1rem);
        padding-bottom: 1rem;
    }

    #map-container {
        top: 60px;
        bottom: 0;
    }

    .incident-sheet {
        top: 60px;
    }
}
