/* Click Accessibilità */
:root { --cla-primary: #1b2a4a; --cla-icon: #ffffff; --cla-offset: 20px; --cla-bottom: 20px; }

/* ---------- Correzioni sempre attive ---------- */
.cla-skip { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cla-skip:focus {
	position: fixed; left: 16px; top: 16px; width: auto; height: auto; overflow: visible; z-index: 2147483647;
	padding: 12px 18px; background: #fff; color: #000; border: 3px solid #000; border-radius: 6px;
	font: 600 16px/1.2 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; text-decoration: underline;
}
[data-cla-skip-target]:focus { outline: none; }
html.cla-fixes :focus-visible:not(input):not(textarea):not(select) {
	outline: 3px solid #fff !important; outline-offset: 0 !important; box-shadow: 0 0 0 6px var(--cla-primary) !important;
}

/* ---------- Widget ---------- */
#cla-root, #cla-root * { box-sizing: border-box; }
#cla-root {
	position: fixed; bottom: var(--cla-bottom); z-index: 99990;
	font: 400 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: #1a1a1a; letter-spacing: normal; word-spacing: normal; text-transform: none; text-align: left;
}
#cla-root.cla-left { left: var(--cla-offset); }
#cla-root.cla-right { right: var(--cla-offset); }
#cla-root button { all: unset; box-sizing: border-box; cursor: pointer; font: inherit; color: inherit; }
#cla-root button:focus-visible, #cla-root a:focus-visible {
	outline: 3px solid #fff !important; outline-offset: 0 !important; box-shadow: 0 0 0 6px #000 !important;
}
#cla-root .cla-trigger {
	width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: var(--cla-primary); color: var(--cla-icon); box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	border: 2px solid var(--cla-icon);
}
#cla-root .cla-trigger svg { width: 32px; height: 32px; display: block; }
#cla-root .cla-panel {
	position: fixed; bottom: calc(var(--cla-bottom) + 68px); width: 380px; max-width: calc(100vw - 16px);
	max-height: calc(100vh - var(--cla-bottom) - 84px); display: flex; flex-direction: column;
	background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); overflow: hidden;
}
#cla-root.cla-left .cla-panel { left: max(8px, var(--cla-offset)); }
#cla-root.cla-right .cla-panel { right: max(8px, var(--cla-offset)); }
#cla-root .cla-panel[hidden] { display: none; }
#cla-root .cla-head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 16px 18px; background: var(--cla-primary); color: var(--cla-icon);
}
#cla-root .cla-title {
	margin: 0; padding: 0; font-family: inherit; font-size: 20px; font-weight: 700; line-height: 1.2; color: inherit;
	text-transform: none; letter-spacing: normal;
}
#cla-root .cla-close {
	width: 40px; height: 40px; flex: 0 0 40px; display: flex; align-items: center; justify-content: center;
	border: 2px solid currentColor; border-radius: 8px; font-size: 24px; line-height: 1;
}
#cla-root .cla-body { overflow-y: auto; padding: 6px 16px 18px; }
#cla-root .cla-sec {
	margin: 16px 0 8px; padding: 0; font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.3; color: #3d3d3d;
	text-transform: uppercase; letter-spacing: .04em;
}
#cla-root .cla-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#cla-root .cla-tile {
	display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px;
	padding: 10px 12px; border: 2px solid #6b6b6b; border-radius: 10px; background: #fff; color: #1a1a1a;
	font-size: 14px; font-weight: 600; line-height: 1.25; text-align: left;
}
#cla-root .cla-tile:hover { border-color: var(--cla-primary); }
#cla-root .cla-tile[aria-pressed="true"] { background: var(--cla-primary); border-color: var(--cla-primary); color: var(--cla-icon); }
#cla-root .cla-check {
	flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor;
	display: flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1;
}
#cla-root .cla-tile[aria-pressed="false"] .cla-check span { visibility: hidden; }
#cla-root .cla-size {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 8px 10px; border: 2px solid #6b6b6b; border-radius: 10px;
}
#cla-root .cla-size-label { font-size: 14px; font-weight: 600; }
#cla-root .cla-size-ctrl { display: flex; align-items: center; gap: 8px; }
#cla-root .cla-step {
	width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
	border: 2px solid var(--cla-primary); border-radius: 8px; font-size: 16px; font-weight: 700; color: #1a1a1a;
}
#cla-root .cla-step[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
#cla-root .cla-size output { min-width: 48px; text-align: center; font-weight: 700; }
#cla-root .cla-reset {
	display: block; width: 100%; margin-top: 16px; padding: 12px; text-align: center;
	border: 2px solid var(--cla-primary); border-radius: 10px; font-weight: 700;
}
#cla-root .cla-foot { padding: 10px 16px; border-top: 1px solid #d6d6d6; font-size: 13px; }
#cla-root .cla-foot a { color: #1a1a1a; text-decoration: underline; }
#cla-root .cla-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#cla-root .cla-guide {
	position: fixed; left: 0; right: 0; top: -100px; height: 14px; margin-top: -7px; pointer-events: none; z-index: 99989;
	background: rgba(255, 213, 0, .35); border-top: 2px solid #000; border-bottom: 2px solid #000;
}
@media (max-width: 600px) {
	#cla-root .cla-panel { left: 8px !important; right: 8px !important; width: auto; max-width: none; }
	#cla-root .cla-trigger { width: 50px; height: 50px; }
}

/* ---------- Modalità attivabili dal pannello ---------- */
/* Il widget è figlio diretto di body: tutte le modalità escludono .cla-root */

html.cla-readable body > :not(.cla-root),
html.cla-readable body > :not(.cla-root) *:not(i):not([class^="icon-"]):not([class*=" icon-"]):not([class*="fa-"]):not(.dashicons):not([class*="star"]) {
	font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
}

html.cla-spacing body > :not(.cla-root) * { letter-spacing: .12em !important; word-spacing: .16em !important; }
html.cla-spacing body > :not(.cla-root) p { margin-bottom: 2em !important; }

html.cla-links body > :not(.cla-root) a {
	text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important;
	outline: 2px dashed currentColor !important; outline-offset: 2px !important;
}

html.cla-headings body > :not(.cla-root) :is(h1, h2, h3, h4, h5, h6) {
	outline: 3px solid var(--cla-primary) !important; outline-offset: 4px !important;
}

html.cla-contrast-light body,
html.cla-contrast-light body > :not(.cla-root),
html.cla-contrast-light body > :not(.cla-root) * {
	background-color: #fff !important; background-image: none !important; color: #000 !important;
	border-color: #000 !important; text-shadow: none !important; box-shadow: none !important;
}
html.cla-contrast-light body > :not(.cla-root) a,
html.cla-contrast-light body > :not(.cla-root) a * { color: #0000a8 !important; text-decoration: underline !important; }
html.cla-contrast-light body > :not(.cla-root) :is(button, .button, input[type="submit"], input[type="button"]) {
	color: #000 !important; border: 2px solid #000 !important;
}

html.cla-contrast-dark body,
html.cla-contrast-dark body > :not(.cla-root),
html.cla-contrast-dark body > :not(.cla-root) * {
	background-color: #000 !important; background-image: none !important; color: #fff !important;
	border-color: #fff !important; text-shadow: none !important; box-shadow: none !important;
}
html.cla-contrast-dark body > :not(.cla-root) a,
html.cla-contrast-dark body > :not(.cla-root) a * { color: #ffeb3b !important; text-decoration: underline !important; }
html.cla-contrast-dark body > :not(.cla-root) :is(button, .button, input[type="submit"], input[type="button"]) {
	color: #fff !important; border: 2px solid #ffeb3b !important;
}

/* Il filtro va sul root: su altri elementi romperebbe gli elementi position:fixed (header sticky). */
html.cla-gray { filter: grayscale(1) !important; }

html.cla-cursor, html.cla-cursor * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3 6 40 15 31 22 46 29 43 22 28 35 28Z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}
html.cla-cursor :is(a, button, [role="button"], label, select, input[type="submit"]),
html.cla-cursor :is(a, button, [role="button"], label, select, input[type="submit"]) * {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3 6 40 15 31 22 46 29 43 22 28 35 28Z' fill='%23ffd500' stroke='%23000' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, pointer !important;
}

html.cla-stop *, html.cla-stop *::before, html.cla-stop *::after {
	animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
	transition-duration: 0s !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}

html.cla-focus body > :not(.cla-root) *:focus {
	outline: 4px solid #ffd500 !important; outline-offset: 2px !important; box-shadow: 0 0 0 8px #000 !important;
}
