/* === Fix contenitori tema Alecta per FacetWP === */
.qodef-page-content-holder,
.qodef-container-inner,
.qodef-grid-row,
.qodef-grid-col-12,
.qodef-content,
.qodef-content-inner {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* === FacetWP — Stile coerente con tema Esautomotion === */
.facetwp-facet {
    font-family: inherit;
    font-size: 14px;
    color: #333333;
    margin-bottom: 12px;
}

.facetwp-checkbox {
    color: #333333;
    font-size: 13px;
    line-height: 1.8;
    padding: 2px 0;
}

.facetwp-checkbox.checked {
    color: #cf2c39;
    font-weight: 600;
}

.facetwp-counter {
    color: #999999;
    font-size: 12px;
}

.facetwp-facet .facetwp-search {
    border: 1px solid #cccccc;
    border-radius: 25px;
    padding: 10px 16px;
    font-size: 13px;
    color: #333333;
    background: #ffffff;
    width: 100%;
    max-width: 300px;
    outline: none;
    transition: border-color 0.15s ease;
    margin-bottom: 6px !important;
}

.facetwp-facet .facetwp-search:focus {
    border-color: #999999;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.facetwp-facet-cerca {
    margin-bottom: 2px !important;
}

.facetwp-facet .facetwp-reset {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #cccccc;
    border-radius: 25px;
    background: #f5f5f5;
    color: #555555;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}

.facetwp-facet .facetwp-reset:hover {
    background: #cf2c39;
    border-color: #cf2c39;
    color: #ffffff;
}

.facetwp-facet h3,
.facetwp-facet-label {
    color: #333333;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.facetwp-facet-esa_lingua,
.facetwp-facet-tipo_di_documento,
.facetwp-facet-cerca,
.facetwp-facet-reset {
    display: inline-block;
    vertical-align: top;
    margin-right: 24px;
    margin-bottom: 16px;
}

.facetwp-facet-reset {
    clear: both;
    display: block !important;
    width: fit-content;
}

/* === Tabella DLP — Colonne === */
td.col-esa_prodotto,
td.col-esa_codice_prodotto {
    font-size: 12px !important;
    line-height: 1.6;
    max-height: 60px;
    overflow: hidden;
    position: relative;
}

td.col-esa_prodotto a,
td.col-esa_prodotto span,
td.col-esa_codice_prodotto a,
td.col-esa_codice_prodotto span {
    display: inline-block;
    font-size: 11px !important;
    background: #e5e5e5;
    color: #5a4a3b;
    padding: 2px 8px;
    border-radius: 12px;
    margin: 2px 3px 2px 0;
    white-space: nowrap;
}

td.col-esa_prodotto::after,
td.col-esa_codice_prodotto::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, #ffffff);
    pointer-events: none;
}

/* === Download link — solo icona === */
.dlp-download-link {
    text-indent: -9999px;
    overflow: hidden;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: auto !important;
    padding: 8px !important;
}

.dlp-download-link .dlp-button-icon {
    text-indent: 0;
    margin: 0 !important;
}

/* === Allineamento altezza box filtri === */
.facetwp-facet-esa_lingua,
.facetwp-facet-tipo_di_documento {
    min-height: 180px;
}

/* === Tabella DLP — frecce ordinamento colonne === */
/* Frecce ordinamento — stato neutro: entrambe visibili */
table.posts-data-table thead th.sorting::after,
table.posts-data-table thead th.sorting::before {
    opacity: 0.5 !important;
    color: #ffffff !important;
}

/* Frecce ordinamento — stato attivo: freccia attiva evidenziata */
table.posts-data-table thead th.sorting_asc::after,
table.posts-data-table thead th.sorting_desc::before {
    opacity: 1 !important;
    color: #ffffff !important;
}

/* Frecce ordinamento — stato attivo: freccia inattiva nascosta */
table.posts-data-table thead th.sorting_asc::before,
table.posts-data-table thead th.sorting_desc::after {
    opacity: 0.2 !important;
    color: #ffffff !important;
}

/* Badge Nuovo / Aggiornato nella libreria documenti */
.esa-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-right: 6px;
    line-height: 1.6;
}

.esa-badge--new {
    background-color: #00a32a;
    color: #ffffff;
}

.esa-badge--updated {
    background-color: #0073aa;
    color: #ffffff;
}
