/*! Evo Compliance v2.2.3 - Accessibility widget
 * CRITICAL FIX: filter CSS non applicato al body perché rompe position:fixed.
 * Usa invece una classe su html + selettori che escludono banner/widget.
 *
 * FIX v2.2.3:
 * - [hidden] con !important per bypassare temi che sovrascrivono display (JNews, ecc.)
 * - tool accessibility con !important per bypassare CSS tema che modifica aside/button
 */

/* Fix critico: l'attributo hidden deve funzionare anche con tema JNews/WPBakery */
#evocwp-banner[hidden],
#evocwp-acc-panel[hidden],
#evocwp-revoke-badge[hidden],
#evocwp-debug[hidden]{display:none !important}

.evocwp-acc-toggle{position:fixed !important;z-index:2147483638 !important;width:56px !important;height:56px !important;border-radius:50% !important;border:0 !important;background:var(--evocwp-acc-color,#1a6fe0) !important;color:#fff !important;font-size:28px !important;cursor:pointer !important;box-shadow:0 4px 12px rgba(0,0,0,.25) !important;display:flex !important;align-items:center !important;justify-content:center !important;padding:0 !important;margin:0 !important;line-height:1 !important}
.evocwp-acc-toggle.evocwp-acc-pos-bottom-right{bottom:20px !important;right:20px !important;left:auto !important;top:auto !important}
.evocwp-acc-toggle.evocwp-acc-pos-bottom-left{bottom:20px !important;left:20px !important;right:auto !important;top:auto !important}
.evocwp-acc-toggle.evocwp-acc-pos-top-right{top:20px !important;right:20px !important;bottom:auto !important;left:auto !important}
.evocwp-acc-toggle.evocwp-acc-pos-top-left{top:20px !important;left:20px !important;bottom:auto !important;right:auto !important}
.evocwp-acc-toggle:focus{outline:3px solid rgba(0,0,0,.5) !important;outline-offset:3px}
.evocwp-acc-panel{position:fixed !important;z-index:2147483639 !important;width:320px !important;max-width:calc(100vw - 40px) !important;background:#fff !important;color:#111 !important;border-radius:12px !important;box-shadow:0 8px 32px rgba(0,0,0,.25) !important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif !important;margin:0 !important;padding:0 !important}
.evocwp-acc-panel.evocwp-acc-pos-bottom-right{bottom:86px !important;right:20px !important;left:auto !important;top:auto !important}
.evocwp-acc-panel.evocwp-acc-pos-bottom-left{bottom:86px !important;left:20px !important;right:auto !important;top:auto !important}
.evocwp-acc-panel.evocwp-acc-pos-top-right{top:86px !important;right:20px !important;bottom:auto !important;left:auto !important}
.evocwp-acc-panel.evocwp-acc-pos-top-left{top:86px !important;left:20px !important;bottom:auto !important;right:auto !important}
.evocwp-acc-panel__header{display:flex !important;align-items:center !important;justify-content:space-between !important;padding:14px 16px !important;border-bottom:1px solid #eee !important;margin:0 !important}
.evocwp-acc-panel__header h2{margin:0 !important;font-size:17px !important;color:#111 !important}
.evocwp-acc-panel__close{border:0 !important;background:transparent !important;font-size:26px !important;cursor:pointer !important;line-height:1 !important;padding:0 4px !important;color:#111 !important;margin:0 !important}
.evocwp-acc-panel__tools{display:grid !important;grid-template-columns:1fr 1fr !important;gap:8px !important;padding:14px !important;margin:0 !important}
.evocwp-acc-tool{font:inherit !important;border:1px solid #ddd !important;background:#f8f8f8 !important;padding:10px 6px !important;border-radius:6px !important;cursor:pointer !important;font-size:12px !important;text-align:center !important;color:#111 !important;min-height:56px !important;line-height:1.3 !important;word-break:break-word !important;hyphens:auto !important;display:flex !important;align-items:center !important;justify-content:center !important;margin:0 !important;text-transform:none !important;letter-spacing:normal !important}
.evocwp-acc-tool:hover{background:#eef !important}
.evocwp-acc-tool[aria-pressed=true]{background:var(--evocwp-acc-color,#1a6fe0) !important;color:#fff !important;border-color:var(--evocwp-acc-color,#1a6fe0) !important}
.evocwp-acc-tool:focus{outline:3px solid rgba(26,111,224,.5) !important;outline-offset:2px}
.evocwp-acc-panel__footer{padding:10px 16px !important;border-top:1px solid #eee !important;font-size:13px !important;text-align:center !important;margin:0 !important}
.evocwp-acc-panel__footer a{color:var(--evocwp-acc-color,#1a6fe0) !important}

/*
 * CRITICAL FIX v2.2
 * Il filter CSS crea un "containing block" per i figli position:fixed,
 * rompendo il banner cookie. Soluzione: applicare il filter a un wrapper
 * interno, non al body. Usiamo html[data-evocwp-*] per evitare il body.
 *
 * Per tutti i temi WP standard, il contenuto sta in un wrapper come
 * .site, #page, .container, main, ecc. Applichiamo ai selettori più
 * comuni escludendo esplicitamente banner e widget.
 */
html.evocwp-highcontrast body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug){background:#000 !important;color:#fff !important}
html.evocwp-highcontrast body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug) *{background:#000 !important;color:#fff !important;border-color:#fff !important}
html.evocwp-highcontrast body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug) a,
html.evocwp-highcontrast body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug) a *{color:#ffff00 !important;text-decoration:underline !important}

/* Negative contrast: applicato tramite CSS var su un wrapper, non sul body */
html.evocwp-negative body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug){filter:invert(100%) hue-rotate(180deg)}

/* Grayscale: stesso trattamento */
html.evocwp-grayscale body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug){filter:grayscale(100%)}

/* Sottolineatura link */
html.evocwp-underline a{text-decoration:underline !important}

/* Font leggibile */
html.evocwp-readable,html.evocwp-readable *{font-family:"Atkinson Hyperlegible",Verdana,Tahoma,sans-serif !important;letter-spacing:.03em !important;word-spacing:.1em !important}

/* Cursore ingrandito */
html.evocwp-bigcursor,html.evocwp-bigcursor *{cursor:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="48" height="48"><path fill="%23000" stroke="%23fff" stroke-width="2" d="M4 2l24 14-10 2 6 12-4 2-6-12-10 4z"/></svg>') 4 2, auto !important}

/* Guida di lettura */
.evocwp-reading-guide{position:fixed;left:0;right:0;height:40px;background:rgba(255,255,0,.3);border-top:2px solid #000;border-bottom:2px solid #000;z-index:2147483646;pointer-events:none;top:0}

/*
 * Font size scaling v2.2.4
 * Usa 'zoom' (Chrome/Safari/Edge da sempre, Firefox 126+ da maggio 2024) che
 * ridimensiona TUTTO ignorando i px fissi del tema. Applicato a body > *
 * escludendo gli elementi del plugin (banner, widget accessibilità) che NON
 * devono scalare.
 */
html.evocwp-fs-1 body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug):not(.evocwp-reading-guide){zoom:1.1}
html.evocwp-fs-2 body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug):not(.evocwp-reading-guide){zoom:1.2}
html.evocwp-fs-3 body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug):not(.evocwp-reading-guide){zoom:1.3}
html.evocwp-fs-4 body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug):not(.evocwp-reading-guide){zoom:1.4}
html.evocwp-fs-5 body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug):not(.evocwp-reading-guide){zoom:1.5}
html.evocwp-fs-m1 body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug):not(.evocwp-reading-guide){zoom:.9}
html.evocwp-fs-m2 body > *:not(#evocwp-banner):not(#evocwp-acc-panel):not(#evocwp-acc-toggle):not(#evocwp-revoke-badge):not(#evocwp-debug):not(.evocwp-reading-guide){zoom:.8}
