/**
 * Pannello accessibilita' e preferenze (classi a11y-* su <html>).
 * Il pannello usa unita' in px di proposito: non deve ingrandirsi insieme al testo del sito.
 * Il testo del sito usa rem: html { font-size } (impostato dal JS) lo scala tutto.
 */

/* ---------- Pulsante e pannello ---------- */
.pspxn-a11y { position: fixed; right: 14px; bottom: 14px; z-index: 99990; font-family: "Plus Jakarta Sans", Verdana, sans-serif; }
.pspxn-a11y__toggle {
	display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
	border: 2px solid #fff; border-radius: 50%; background: #1c1917; color: #fff;
	cursor: pointer; box-shadow: 0 6px 18px rgb(0 0 0 / .3);
}
.pspxn-a11y__toggle:hover, .pspxn-a11y__toggle[aria-expanded="true"] { background: var(--color-terracotta, #b84a2a); }
.pspxn-a11y button:focus-visible, .pspxn-a11y select:focus-visible, .pspxn-a11y__panel:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.pspxn-a11y__panel {
	position: fixed; right: 14px; bottom: 74px; width: 360px; max-width: calc(100vw - 28px);
	max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain;
	padding: 14px 16px 18px; background: #fffcf7; color: #1c1917; font-size: 15px; line-height: 1.4;
	border: 2px solid #1c1917; border-radius: 16px; box-shadow: 0 16px 40px -12px rgb(0 0 0 / .45);
}
.pspxn-a11y__panel[hidden] { display: none; }
.pspxn-a11y__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: -14px; margin: -14px -16px 6px; padding: 12px 16px 8px; background: #fffcf7; z-index: 1; }
.pspxn-a11y__title { margin: 0; font-size: 19px; font-weight: 800; color: #1c1917; }
.pspxn-a11y__close { width: 44px; height: 44px; border: 2px solid #1c1917; border-radius: 50%; background: #fff; color: #1c1917; font-size: 26px; line-height: 1; cursor: pointer; }
.pspxn-a11y__sec { margin: 0 0 12px; padding-top: 10px; border-top: 1px solid #e2d8c8; }
.pspxn-a11y__sec h3 { margin: 0 0 8px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #57534e; }
.pspxn-a11y__hint { margin: 0 0 8px; font-size: 13px; color: #57534e; }
.pspxn-a11y__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pspxn-a11y__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pspxn-a11y__grid--3 { grid-template-columns: repeat(3, 1fr); }
.pspxn-a11y__btn {
	min-height: 44px; min-width: 44px; padding: 6px 10px; border: 2px solid #d6c9b4; border-radius: 10px;
	background: #f3efea; color: #1c1917; font: 600 14px/1.2 "Plus Jakarta Sans", Verdana, sans-serif; text-align: center; cursor: pointer;
}
.pspxn-a11y__btn:hover:not(:disabled) { border-color: #1c1917; }
.pspxn-a11y__btn:disabled { opacity: .4; cursor: not-allowed; }
.pspxn-a11y__btn[aria-pressed="true"] { border-color: #1c1917; background: #f4e3a8; box-shadow: inset 0 0 0 1px #1c1917; }
.pspxn-a11y__btn[aria-pressed="true"]::after { content: " \2713"; font-weight: 800; }
.pspxn-a11y__btn--wide { flex: 1; }
.pspxn-a11y__btn--reset { width: 100%; background: #1c1917; border-color: #1c1917; color: #fff; }
.pspxn-a11y__level { min-width: 64px; text-align: center; font-size: 18px; font-weight: 800; }
.pspxn-a11y__speed { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; font-weight: 600; font-size: 14px; }
.pspxn-a11y__speed select { min-height: 44px; padding: 4px 8px; border: 2px solid #d6c9b4; border-radius: 10px; background: #fff; color: #1c1917; font: 600 14px "Plus Jakarta Sans", Verdana, sans-serif; }
.pspxn-a11y__msg { margin: 8px 0 0; min-height: 1.2em; font-size: 13px; font-weight: 600; color: #7a2e12; }

/* Telefono: pannello a scheda in basso, scorrevole; con il banner cookie aperto sta sopra di lui */
@media (max-width: 600px) {
	.pspxn-a11y__panel {
		left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 82vh; max-height: 82dvh;
		border-width: 2px 0 0; border-radius: 18px 18px 0 0; padding-bottom: 28px;
	}
	html.pspxn-cookie-on .pspxn-a11y__panel { bottom: var(--pspxn-cookie-h, 0px); max-height: calc(82dvh - var(--pspxn-cookie-h, 0px)); }
}

/* ---------- Dimensione del testo: la scala la fa html { font-size }; qui i casi con px fissi rimasti (plugin) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }

/* ---------- Spaziatura ---------- */
html.a11y-lh-1 body *:not(.pspxn-a11y):not(.pspxn-a11y *) { line-height: 1.9 !important; }
html.a11y-lh-2 body *:not(.pspxn-a11y):not(.pspxn-a11y *) { line-height: 2.3 !important; }
html.a11y-ls-1 body *:not(.pspxn-a11y):not(.pspxn-a11y *) { letter-spacing: .06em !important; word-spacing: .12em !important; }
html.a11y-ls-2 body *:not(.pspxn-a11y):not(.pspxn-a11y *) { letter-spacing: .12em !important; word-spacing: .22em !important; }

/* ---------- Font leggibile (solo font di sistema) ---------- */
html.a11y-font body *:not(.pspxn-a11y):not(.pspxn-a11y *) { font-family: "Atkinson Hyperlegible", Verdana, Tahoma, "Trebuchet MS", sans-serif !important; }

/* ---------- Contrasto ---------- */
html.a11y-c-gray { filter: grayscale(1); }
html.a11y-c-dark { --a-bg: #14130f; --a-fg: #f2efe9; --a-link: #9cc4ff; --a-bd: #7d786f; }
html.a11y-c-high { --a-bg: #000; --a-fg: #fff; --a-link: #ffe600; --a-bd: #fff; }
html.a11y-c-dark, html.a11y-c-high { color-scheme: dark; }
html.a11y-c-dark body, html.a11y-c-high body { background-color: var(--a-bg) !important; color: var(--a-fg) !important; }
html.a11y-c-dark body *:not(.pspxn-a11y):not(.pspxn-a11y *):not(img):not(video):not(picture):not(canvas):not(svg):not(svg *):not([class*="overlay"]):not([class*="scrim"]):not([class*="veil"]):not([class*="shade"]):not([class*="gradient"]):not([class*="slide-bg"]),
html.a11y-c-high body *:not(.pspxn-a11y):not(.pspxn-a11y *):not(img):not(video):not(picture):not(canvas):not(svg):not(svg *):not([class*="overlay"]):not([class*="scrim"]):not([class*="veil"]):not([class*="shade"]):not([class*="gradient"]):not([class*="slide-bg"]) {
	background-color: var(--a-bg) !important; color: var(--a-fg) !important; border-color: var(--a-bd) !important; text-shadow: none !important;
}
html.a11y-c-dark body a:not(.pspxn-a11y *), html.a11y-c-high body a:not(.pspxn-a11y *) { color: var(--a-link) !important; }
html.a11y-c-dark body :is(button, .pspx-btn, input, select, textarea):not(.pspxn-a11y *),
html.a11y-c-high body :is(button, .pspx-btn, input, select, textarea):not(.pspxn-a11y *) { border: 2px solid var(--a-bd) !important; }
html.a11y-c-high body *:not(.pspxn-a11y):not(.pspxn-a11y *) { box-shadow: none !important; }
html.a11y-c-dark body .pspx-hamburger-line, html.a11y-c-high body .pspx-hamburger-line { background-color: var(--a-fg) !important; }

/* ---------- Evidenzia link e titoli ---------- */
html.a11y-links body a:not(.pspxn-a11y *) { text-decoration: underline !important; text-underline-offset: .2em; text-decoration-thickness: 2px !important; outline: 2px solid currentColor; outline-offset: 2px; font-weight: 700; }
html.a11y-heads body :is(h1, h2, h3, h4, h5, h6):not(.pspxn-a11y *) { background: #ffe97a !important; color: #000 !important; outline: 3px solid #000; outline-offset: 2px; padding: .1em .35em; text-shadow: none !important; }

/* ---------- Cursore grande ---------- */
html.a11y-cursor, html.a11y-cursor body, html.a11y-cursor body * {
	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 3v34l9-8 6 14 7-3-6-13h13z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}
html.a11y-cursor a, html.a11y-cursor a *, html.a11y-cursor button, html.a11y-cursor button *, html.a11y-cursor [role="button"], html.a11y-cursor select, html.a11y-cursor label, html.a11y-cursor summary {
	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 3v34l9-8 6 14 7-3-6-13h13z' fill='%23ffd400' stroke='%23000' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, pointer !important;
}

/* ---------- Guida e maschera di lettura ---------- */
.pspxn-a11y-guide, .pspxn-a11y-mask { display: none; position: fixed; left: 0; right: 0; pointer-events: none; z-index: 890; }
.pspxn-a11y-guide { top: 0; height: 28px; background: rgb(255 214 0 / .28); border-block: 3px solid #1c1917; box-shadow: 0 0 0 1px #ffd400; }
.pspxn-a11y-mask { background: rgb(0 0 0 / .72); }
.pspxn-a11y-mask--top { top: 0; height: 0; }
.pspxn-a11y-mask--bottom { top: 100%; bottom: 0; }
html.a11y-guide .pspxn-a11y-guide, html.a11y-mask .pspxn-a11y-mask { display: block; }

/* ---------- Ferma animazioni e nascondi immagini ---------- */
html.a11y-nomotion *, html.a11y-nomotion *::before, html.a11y-nomotion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-nomotion video { display: none !important; }
html.a11y-noimg body :is(img, picture, video, canvas, iframe, figure img):not(.pspxn-a11y *) { display: none !important; }
html.a11y-noimg body *:not(.pspxn-a11y):not(.pspxn-a11y *) { background-image: none !important; }

/* ---------- Correzione dei px fissi del plugin slider (non modificabile): stessi valori, ma in rem ---------- */
.se-slide-title { font-size: clamp(1.75rem, 5vw, 3rem) !important; }
.se-slide-desc { font-size: clamp(1rem, 2.2vw, 1.25rem) !important; }
.se-slide a { font-size: 1rem; }
