/* ============================================
   BOTTOM NAVIGATION - Lu Nibareddu
   Pattern: 5 tab fissi, Material style
   ============================================ */

.bottom-nav {
    position: fixed;
    bottom: var(--space-1);
    left: var(--space-4);
    right: var(--space-4);
    max-width: calc(500px - var(--space-4) * 2);
    margin-left: auto;
    margin-right: auto;
    z-index: var(--z-header);

    display: flex;
    align-items: stretch;
    justify-content: space-around;

    height: var(--nav-height);
    padding-bottom: 0;
    margin-bottom: var(--safe-area-bottom);

    /* Sfondo bianco leggermente trasparente */
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: var(--radius-2xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);

    padding: var(--space-2) var(--space-1);

    background: none;
    border: none;
    cursor: pointer;

    color: var(--brand-brown-light);
    transition: color var(--duration-fast) var(--ease-out);

    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nav-item:hover {
    color: var(--brand-brown);
}

.nav-item.active {
    color: var(--brand-brown-dark);
    background: rgba(255, 255, 255, 0.35);
    border-radius: var(--radius-lg);
    margin: var(--space-1);
    padding: var(--space-2) var(--space-1);
}

.nav-icon {
    font-size: 24px;
    line-height: 1;
    transition: transform var(--duration-fast) var(--ease-bounce);
}

.nav-item.active .nav-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.nav-label {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    line-height: 1;
    white-space: nowrap;
    transition: font-weight var(--duration-fast) var(--ease-out);
}

.nav-item.active .nav-label {
    font-weight: var(--weight-bold);
}

/* Active indicator dot (optional) */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 4px;
    width: 4px;
    height: 4px;
    background: var(--brand-brown);
    border-radius: var(--radius-full);
    opacity: 0;
}

/* Nav stays above expanded weather */
.bottom-nav {
    z-index: calc(var(--z-modal) + 10);
}

/* Keep nav clickable over modal */
body.modal-open .bottom-nav {
    position: fixed;
    z-index: 9999;
    pointer-events: auto;
}

/* Safe area support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        margin-bottom: env(safe-area-inset-bottom);
    }
}
