/* =========================================================
   StudioEsagono - Sort Widget
   ========================================================= */
.cew-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}
.cew-sort *,
.cew-sort *::before,
.cew-sort *::after { box-sizing: border-box; }

/* Etichetta sopra: forza colonna */
.cew-sort--label-top {
    flex-direction: column;
    align-items: flex-start;
}

.cew-sort__label {
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    line-height: 1.3;
}

/* ---------- Dropdown ---------- */
.cew-sort__select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-height: 40px;
    padding: 8px 36px 8px 12px;
    font-family: inherit;
    font-size: inherit;
    color: #1f2937;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2937' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
    border: 1px solid #d0d5db;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1.3;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cew-sort__select:focus {
    outline: none;
    /* Bordo e background in hover/focus sono ora esposti come controlli Elementor
       (tab "Hover / Focus" nella sezione Dropdown). Il CSS non impone più un colore
       arancione fisso: lascia tutto al controllo utente. */
}

/* ---------- Pulsanti ---------- */
.cew-sort__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cew-sort__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    color: #1f2937;
    background-color: #ffffff;
    border: 1px solid #d0d5db;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.3;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.08s;
    white-space: nowrap;
}
.cew-sort__btn:hover {
    background-color: #fff7ed;
    color: #ea7a0c;
    border-color: #ea7a0c;
    text-decoration: none;
}
.cew-sort__btn:active {
    transform: translateY(1px);
}
.cew-sort__btn.is-active {
    background-color: #ea7a0c;
    color: #ffffff;
    border-color: #ea7a0c;
}
.cew-sort__btn.is-active:hover {
    background-color: #c96808;
    color: #ffffff;
    border-color: #c96808;
}
