/* ==========================
   Stili per le tab (condivisi)
   ========================== */
.nav-tabs {
    border-bottom: 2px solid var(--colore-bordo);
    margin-bottom: 2rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: var(--colore-accento) transparent;
    overflow: hidden;
}

/* Nascondi la scrollbar su Chrome, Safari e Opera */
.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tabs .nav-item {
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 12px 12px 0 0;
    color: #9ca3af;
    font-weight: 500;
    padding: 12px 20px;
    margin-right: 8px;
    position: relative;
    background: transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Applica gli stili anche agli span annidati */
.nav-tabs .nav-link span {
    color: inherit;
    font-weight: inherit;
    transition: inherit;
}

.nav-tabs .nav-link:hover {
    color: var(--colore-accento);
    background: var(--colore-container);
    border-color: transparent;
}

/* Assicura che anche gli span ereditino il colore al hover */
.nav-tabs .nav-link:hover span {
    color: inherit;
}

.nav-tabs .nav-link.active {
    color: var(--colore-accento);
    background: var(--colore-container);
    border-color: transparent;
    font-weight: 600;
    position: relative;
}

/* Assicura che anche gli span ereditino gli stili quando active */
.nav-tabs .nav-link.active span {
    color: inherit;
    font-weight: inherit;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--colore-accento), var(--colore-accento-secondario));
    border-radius: 2px 2px 0 0;
}

.nav-tabs .nav-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--colore-accento-rgb), 0.05);
    border-radius: 12px 12px 0 0;
    z-index: -1;
}

/* Assicura che anche gli span ereditino gli stili al focus */
.nav-tabs .nav-link:focus span {
    color: inherit;
}

.nav-link .material-symbols-rounded {
    vertical-align: middle;
    margin-right: 3px;
    margin-left: -3px;
    font-size: 1.2em;
}

@media (max-width: 576px) {

    .nav-tabs {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .nav-tabs .nav-item {
        flex: 1 1 0;
        min-width: 0;
    }

    .nav-tabs .nav-link {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        background: transparent;
        position: relative;
    }
}

.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
