/* Estils personalitzats si fossin necessaris *//* Estils personalitzats per a l'aplicació */

/* Estils per a les pestanyes */
.pestanyes-container {
    display: flex;
    overflow-x: auto;
    background-color: #e2e8f0;
    border-bottom: 1px solid #cbd5e0;
    scrollbar-width: thin;
    scrollbar-color: #a0aec0 #e2e8f0;
}

.pestanyes-container::-webkit-scrollbar {
    height: 6px;
}

.pestanyes-container::-webkit-scrollbar-track {
    background: #e2e8f0;
}

.pestanyes-container::-webkit-scrollbar-thumb {
    background-color: #a0aec0;
    border-radius: 3px;
}

.pestanya-tab {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f7fafc;
    border-right: 1px solid #e2e8f0;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: background-color 0.2s;
}

.pestanya-tab.activa {
    background-color: #fff;
    border-bottom: 2px solid #4299e1;
}

.pestanya-tab:hover:not(.activa) {
    background-color: #edf2f7;
}

.pestanya-nom {
    margin-right: 0.5rem;
}

/* .pestanya-tancar {
    font-size: 1.25rem;
    line-height: 1;
    color: #a0aec0;
    border: none;
    background: transparent;
    padding: 0;
    margin-left: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pestanya-tancar:hover {
    color: #e53e3e;
    background-color: rgba(229, 62, 62, 0.1);
} */

#afegir-pestanya {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    background-color: transparent;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    margin-left: 0.25rem;
    border-radius: 4px;
}

#afegir-pestanya:hover {
    color: #2b6cb0;
    background-color: rgba(43, 108, 176, 0.1);
}

.contingut-pestanya {
    display: none; /* Per defecte, els continguts estan ocults */
    height: 100%;
}

/* Estil per al focus dels elements interactius */
button:focus, select:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* Transicions suaus per a millor UX */
.pestanya-tab, .pestanya-tancar, #afegir-pestanya {
    transition: all 0.2s ease;
}

/* Estils per al menú contextual */
#menu-context-pestanya {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.2s ease-out;
}

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

/* Estils per als botons d'opcions de pestanya */
.pestanya-opcions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.pestanya-opcions:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Estils per a la paleta de colors */
#paleta-colors {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 8px;
}

#paleta-colors button {
    transition: transform 0.1s;
}

#paleta-colors button:hover {
    transform: scale(1.15);
}

/* Estils per a les pestanyes amb colors */
.pestanya-tab.activa {
    position: relative;
}

.pestanya-tab.activa::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #4299e1;
}

/* Estils per als botons d'exportar i importar */
#exportar-dades, #importar-dades + label {
    transition: all 0.2s ease-in-out;
}

#exportar-dades:focus, #importar-dades:focus + label {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

@media (max-width: 768px) {
    header .flex {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    header .border-l {
        border-left: none;
        padding-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
}