/* ============================================================
   WeCo Document Manager — Frontend stylesheet (v3.18.0)
   Design: slate/teal palette, sidebar filters + grouped cards.
   Tutti i colori sono CSS variables, sovrascrivibili dalla
   pagina admin "Aspetto & Colori".
   ============================================================ */

/* ---------- Reset locale ---------- */
.weco-product-docs *,
.weco-docs-archive *,
.weco-product-docs *::before,
.weco-product-docs *::after,
.weco-docs-archive *::before,
.weco-docs-archive *::after {
    box-sizing: border-box;
}

/* ---------- Default tokens (sovrascritti dal modulo Appearance) ----------
   Includiamo anche .weco-archive-sidebar: il drawer mobile viene spostato in
   <body> (fuori da .weco-docs-archive) all'apertura, quindi deve portarsi
   dietro i propri token colore, altrimenti perde sfondo bianco e tema. */
.weco-product-docs,
.weco-docs-archive,
.weco-archive-sidebar {
    --weco-bg:          #F8FAFC;
    --weco-card:        #FFFFFF;
    --weco-border:      #E2E8F0;
    --weco-text:        #0F172A;
    --weco-text-muted:  #64748B;
    --weco-accent:      #0D9488;
    --weco-accent-soft: #CCFBF1;
    --weco-cta:         #F59E0B;
    --weco-cta-hover:   #D97706;
    --weco-cta-text:    #FFFFFF;
    --weco-fmt-pdf:     #DC2626;
    --weco-fmt-zip:     #475569;
    --weco-fmt-doc:     #2563EB;
    --weco-fmt-xls:     #16A34A;
    --weco-fmt-img:     #9333EA;
    --weco-fmt-other:   #64748B;
    --weco-tag-type:    #0F766E;
    --weco-tag-type-bg: #F0FDFA;
    --weco-tag-area:    #7C2D12;
    --weco-tag-area-bg: #FFF7ED;
    --weco-tag-sec:     #1E40AF;
    --weco-tag-sec-bg:  #EFF6FF;
    --weco-tag-prod:    #3730A3;
    --weco-tag-prod-bg: #EEF2FF;
    --weco-tag-lang:    #334155;
    --weco-tag-lang-bg: #F1F5F9;

    color: var(--weco-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =============================================================
   ARCHIVIO — layout sidebar + risultati
   ============================================================= */
.weco-docs-archive {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    background: var(--weco-bg);
    padding: 20px;
    border-radius: 12px;
}

/* ---------- Sidebar filtri ---------- */
.weco-archive-sidebar {
    background: var(--weco-card);
    border: 1px solid var(--weco-border);
    border-radius: 12px;
    padding: 18px;
    align-self: start;
    position: sticky;
    top: 20px;
}
.weco-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--weco-text);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.weco-sidebar-title .weco-filter-reset {
    font-size: 12px;
    color: var(--weco-accent);
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}
.weco-sidebar-title .weco-filter-reset:hover { text-decoration: underline; }

/* Pulsante mobile "Filtra per" + close + backdrop (default: nascosti su desktop) */
.weco-filters-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--weco-accent, #0d9488);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: filter 0.15s;
}
.weco-filters-toggle:hover { filter: brightness(0.95); }
.weco-filters-toggle .weco-filters-toggle-badge {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 2px;
}
.weco-sidebar-close {
    display: none;
    background: none;
    border: 0;
    color: var(--weco-text-muted, #64748b);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 6px;
}
/* Barra "Apply" in fondo alla sidebar: visibile solo nel drawer mobile. */
.weco-sidebar-apply-bar {
    display: none;
}
.weco-sidebar-apply {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: var(--weco-accent, #0D9488);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 16px;
    cursor: pointer;
}
.weco-sidebar-apply:hover { filter: brightness(0.95); }
.weco-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    /* z-index molto alto: deve stare sopra widget di altri plugin (es. il
       pulsante WhatsApp flottante) che in mobile coprirebbero il drawer. */
    z-index: 2147483646;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.weco-sidebar-backdrop[hidden] { display: none; }
.weco-sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.weco-filter-group { margin-bottom: 14px; }
.weco-filter-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--weco-text-muted);
    margin-bottom: 6px;
}
.weco-search-input,
.weco-filter-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--weco-border);
    border-radius: 8px;
    background: var(--weco-card);
    color: var(--weco-text);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.weco-search-input:focus,
.weco-filter-select:focus {
    outline: 0;
    border-color: var(--weco-accent);
    box-shadow: 0 0 0 3px var(--weco-accent-soft);
}
.weco-filter-search {
    position: relative;
}
.weco-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: var(--weco-text-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
}

/* ---------- Filtri pagina prodotto (chip dinamici, riga singola) ---------- */
.weco-product-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 12px 0 18px;
    padding: 10px 14px;
    background: var(--weco-bg, #f8fafc);
    border: 1px solid var(--weco-border, #e2e8f0);
    border-radius: 8px;
}
.weco-product-filter-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.weco-product-filter-row + .weco-product-filter-row {
    border-left: 1px solid var(--weco-border, #e2e8f0);
    padding-left: 14px;
}
.weco-product-filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--weco-text-muted, #64748b);
}
.weco-product-filter-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}
.weco-pf-chip {
    background: var(--weco-surface, #fff);
    border: 1px solid var(--weco-border, #e2e8f0);
    color: var(--weco-text, #1e293b);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.weco-pf-chip:hover { border-color: var(--weco-accent, #0d9488); color: var(--weco-accent, #0d9488); }
.weco-pf-chip.is-active {
    background: var(--weco-accent, #0d9488);
    border-color: var(--weco-accent, #0d9488);
    color: #fff;
    font-weight: 600;
}
.weco-pf-reset {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: var(--weco-accent, #0d9488);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    text-decoration: underline;
}
.weco-pf-reset[hidden] { display: none; }

/* Pager interno accordion (max 14 card per pagina) */
.weco-doc-card.is-paged-out { display: none !important; }
.weco-group-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 0 4px;
    margin-top: 4px;
    border-top: 1px dashed var(--weco-border, #e2e8f0);
    font-size: 13px;
}
.weco-pager-btn {
    background: var(--weco-surface, #fff);
    border: 1px solid var(--weco-border, #e2e8f0);
    color: var(--weco-accent, #0d9488);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.weco-pager-btn:hover:not(:disabled) {
    background: #5abb950a;
    border-color: #5abb9560;
    color: #060606;
}
.weco-pager-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.weco-pager-info {
    color: var(--weco-text-muted, #64748b);
    font-weight: 500;
}

/* Card/group nascosti dal filtraggio */
.weco-doc-card.is-hidden,
.weco-doc-group.is-empty { display: none !important; }

/* ---------- Accordion gruppi documenti ---------- */
.weco-doc-group { margin-bottom: 16px; }
.weco-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--weco-surface, #fff);
    border: 1px solid var(--weco-border, #e2e8f0);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    color: var(--weco-accent, #0d9488);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
}
.weco-group-header:hover { background: var(--weco-bg, #f8fafc); border-color: var(--weco-accent, #0d9488); color: #060606; }
.weco-doc-group:not(.is-collapsed) > .weco-group-header {
    background: #5abb950a;
    border-color: #5abb9540;
    color: #060606;
}
.weco-doc-group:not(.is-collapsed) > .weco-group-header > .weco-group-chevron { color: #060606; }
.weco-doc-group:not(.is-collapsed) > .weco-group-header:hover {
    background: #5abb9514;
    border-color: #5abb9560;
    color: #060606;
}
.weco-group-title { flex: 1 1 auto; }
.weco-group-chevron {
    display: inline-block;
    width: 14px;
    color: var(--weco-accent, #0d9488);
    transition: transform 0.18s ease;
    transform: rotate(0deg);
    font-size: 12px;
    line-height: 1;
}
.weco-doc-group:not(.is-collapsed) > .weco-group-header > .weco-group-chevron {
    transform: rotate(90deg);
}
.weco-group-count {
    background: var(--weco-accent-soft, #ccfbf1);
    color: var(--weco-accent, #0d9488);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
.weco-group-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
}
.weco-doc-group.is-collapsed > .weco-group-body { display: none; }

/* ---------- Lista checkbox (tipologia / area / sezione) ---------- */
.weco-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 2px;
}
.weco-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--weco-text);
    line-height: 1.3;
    transition: background 0.12s;
    user-select: none;
}
.weco-checkbox-item:hover { background: var(--weco-bg); }
.weco-checkbox-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--weco-accent);
    cursor: pointer;
    flex-shrink: 0;
}
.weco-checkbox-item input[type="checkbox"]:checked + span {
    color: var(--weco-accent);
    font-weight: 600;
}

/* ---------- Header risultati ---------- */
.weco-archive-main { min-width: 0; }
.weco-archive-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 4px;
}
.weco-results-count {
    font-size: 13px;
    color: var(--weco-text-muted);
}
.weco-results-count strong {
    color: var(--weco-text);
    font-weight: 600;
}
.weco-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.weco-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--weco-accent-soft);
    color: var(--weco-accent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}
.weco-chip-remove {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
}
.weco-chip-remove:hover { opacity: 1; }

/* ---------- Card documento ---------- */
.weco-doc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--weco-card);
    border: 1px solid var(--weco-border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    color: var(--weco-text);
}
.weco-doc-card:hover {
    border-color: var(--weco-accent);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}
.weco-doc-card-info {
    flex: 1;
    min-width: 0;
}
.weco-doc-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--weco-text);
    margin-bottom: 6px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.weco-doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.weco-doc-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.weco-doc-size {
    font-size: 12px;
    color: var(--weco-text-muted);
    white-space: nowrap;
}
.weco-doc-version {
    font-size: 12px;
    color: var(--weco-text-muted);
    background: var(--weco-bg);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ---------- Badge formato file (semantico per estensione) ---------- */
.weco-fmt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #626262;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
    background: var(--weco-fmt-other);
}
.weco-fmt-pdf  { background: var(--weco-fmt-pdf); }
.weco-fmt-zip,
.weco-fmt-rar,
.weco-fmt-tar,
.weco-fmt-gz,
.weco-fmt-7z   { background: var(--weco-fmt-zip); }
.weco-fmt-doc,
.weco-fmt-docx,
.weco-fmt-rtf,
.weco-fmt-txt  { background: var(--weco-fmt-doc); }
.weco-fmt-xls,
.weco-fmt-xlsx,
.weco-fmt-csv  { background: var(--weco-fmt-xls); }
.weco-fmt-jpg,
.weco-fmt-jpeg,
.weco-fmt-png,
.weco-fmt-gif,
.weco-fmt-webp,
.weco-fmt-svg  { background: var(--weco-fmt-img); }
.weco-fmt-bin,
.weco-fmt-hex,
.weco-fmt-file { background: var(--weco-fmt-other); }

/* ---------- Tag metadati ---------- */
.weco-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}
.weco-tag-type     { color: var(--weco-tag-type);  background: var(--weco-tag-type-bg); }
.weco-tag-area     { color: var(--weco-tag-area);  background: var(--weco-tag-area-bg); }
.weco-tag-sezione  { color: var(--weco-tag-sec);   background: var(--weco-tag-sec-bg); }
.weco-tag-prodotto { color: var(--weco-tag-prod);  background: var(--weco-tag-prod-bg); }
.weco-tag-lingua   { color: var(--weco-tag-lang);  background: var(--weco-tag-lang-bg); }

/* ---------- Pulsante Scarica ---------- */
.weco-doc-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--weco-cta);
    color: var(--weco-cta-text);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}
.weco-doc-cta:hover {
    background: var(--weco-cta-hover);
    color: var(--weco-cta-text);
    text-decoration: none;
}
.weco-doc-cta:active { transform: translateY(1px); }
.weco-doc-cta::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/><polyline points='7 10 12 15 17 10'/><line x1='12' y1='15' x2='12' y2='3'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ---------- Stati vuoti / loading ---------- */
.weco-archive-loading,
.weco-archive-empty,
.weco-docs-empty {
    background: var(--weco-card);
    border: 1px dashed var(--weco-border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: var(--weco-text-muted);
    font-size: 14px;
}
.weco-archive-empty strong {
    display: block;
    color: var(--weco-text);
    font-size: 16px;
    margin-bottom: 4px;
}
.weco-spinner-ring {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid var(--weco-border);
    border-top-color: var(--weco-accent);
    border-radius: 50%;
    animation: weco-spin 0.8s linear infinite;
    margin-bottom: 10px;
}
@keyframes weco-spin { to { transform: rotate(360deg); } }

/* ---------- Paginazione ---------- */
.weco-archive-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    padding: 16px;
}
.weco-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: var(--weco-card);
    border: 1px solid var(--weco-border);
    border-radius: 8px;
    color: var(--weco-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}
.weco-page-btn:hover:not(:disabled):not(.active) {
    background: var(--weco-bg);
    border-color: var(--weco-accent);
}
.weco-page-btn.active {
    background: var(--weco-accent);
    color: #fff;
    border-color: var(--weco-accent);
}
.weco-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =============================================================
   PAGINA PRODOTTO — [weco_product_docs]
   Stesso linguaggio visivo, container più compatto.
   ============================================================= */
.weco-product-docs {
    background: var(--weco-bg);
    border-radius: 12px;
    padding: 20px;
}
.weco-product-docs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.weco-product-docs-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--weco-text);
    margin: 0;
}
.weco-docs-count {
    font-size: 13px;
    color: var(--weco-text-muted);
    background: var(--weco-card);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--weco-border);
}

/* =============================================================
   COUNTRY TABS — pannelli per paese specifico vs universale
   (visibili solo per shortcode tipo [weco_product_docs_australia])
   ============================================================= */
.weco-country-tabs {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    background: var(--weco-card);
    border: 1px solid var(--weco-border);
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.weco-ct-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--weco-text-muted);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    line-height: 1.2;
}
.weco-ct-tab:hover {
    border-color: #4b5563;
}
.weco-ct-tab.is-active {
    background: #e7ebf5;
    color: #000000;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}
.weco-ct-flag { font-size: 16px; line-height: 1; }
.weco-ct-count {
    background: rgba(15, 23, 42, 0.08);
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}
.weco-ct-tab.is-active .weco-ct-count {
    background: rgb(255 255 255 / 94%);
    color: #000;
}
.weco-ct-panel[hidden] { display: none; }

/* Bandierina paese accanto al titolo della card */
.weco-flag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    margin-left: 6px;
    padding: 2px 6px;
    background: var(--weco-card);
    border: 1px solid var(--weco-border);
    border-radius: 6px;
    vertical-align: middle;
    cursor: help;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 880px) {
    .weco-docs-archive {
        grid-template-columns: 1fr;
        padding: 12px;
    }
    /* Mostra il pulsante "Filtra per" e nascondi la sidebar finché non viene aperta */
    .weco-filters-toggle {
        display: inline-flex;
    }
    .weco-sidebar-close {
        display: inline-block;
    }
    .weco-archive-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        /* Altezza esplicita pari al viewport: usare top/bottom non basta perché,
           con il body in position:fixed (scroll-lock), l'altezza non si risolve
           e la sidebar non scrolla. dvh segue la viewport reale su mobile. */
        height: 100vh;
        height: 100dvh;
        width: min(85vw, 340px);
        max-width: 100%;
        /* sopra il backdrop e i widget flottanti di altri plugin (WhatsApp). */
        z-index: 2147483647;
        border-radius: 0 12px 12px 0;
        display: flex;
        flex-direction: column;
        /* spazio extra in fondo per non lasciare contenuto sotto la barra Apply. */
        padding-bottom: 100px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15);
    }
    .weco-archive-sidebar.is-open {
        transform: translateX(0);
    }
    /* Nel drawer mobile l'intera sidebar deve scrollare come un unico blocco:
       togliamo lo scroll interno delle liste checkbox, altrimenti catturano
       il gesto di scroll e la sidebar resta ferma. */
    .weco-archive-sidebar .weco-checkbox-list {
        max-height: none;
        overflow: visible;
    }
    /* La barra Apply resta ancorata in fondo al drawer mobile. */
    .weco-sidebar-apply-bar {
        display: block;
        position: sticky;
        bottom: 0;
        margin-top: auto;
        padding-top: 14px;
        padding-bottom: 4px;
        background: var(--weco-card, #fff);
        /* sopra le checkbox che scorrono, altrimenti i quadratini passano
           visivamente sopra al pulsante Apply. */
        z-index: 2;
    }
    body.weco-sidebar-locked {
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
        overflow: hidden;
    }
    .weco-doc-card {
        flex-wrap: wrap;
    }
    .weco-doc-meta {
        margin-left: auto;
    }
}
@media (max-width: 560px) {
    .weco-doc-card {
        gap: 10px;
        padding: 12px;
    }
    .weco-doc-meta {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
        margin-top: 8px;
        padding-top: 10px;
        border-top: 1px solid var(--weco-border);
    }
    .weco-doc-cta {
        flex: 1;
        justify-content: center;
    }
}
