/*
 * Multimediality Accessibilità – effetti applicati alle pagine del sito.
 * Tutte le regole dipendono da una classe "mma-*" sull'elemento <html>, aggiunta
 * solo quando il visitatore attiva un'opzione: senza scelte attive il plugin non
 * modifica in nulla il tema. L'interfaccia del menu vive in uno Shadow DOM ed è
 * esclusa con :not(.mma-host).
 */

/* ---------- Carattere per dislessia ---------- */
html.mma-dys body, html.mma-dys body *:not(.mma-host){font-family:'MMA OpenDyslexic',Verdana,Tahoma,sans-serif !important;font-style:normal !important}
/* le icone dei temi (Font Awesome, Dashicons, ecc.) mantengono il loro carattere */
html.mma-dys body [class*="fa-"], html.mma-dys body [class^="fa"], html.mma-dys body .dashicons, html.mma-dys body [class*="icon-"], html.mma-dys body [class^="icon"], html.mma-dys body .material-icons, html.mma-dys body i:empty{font-family:revert !important}

/* ---------- Spaziatura lettere ---------- */
html.mma-sp1 body *:not(.mma-host){letter-spacing:.06em !important;word-spacing:.12em !important}
html.mma-sp2 body *:not(.mma-host){letter-spacing:.12em !important;word-spacing:.24em !important}
html.mma-sp3 body *:not(.mma-host){letter-spacing:.18em !important;word-spacing:.36em !important}

/* ---------- Altezza riga ---------- */
html.mma-lh1 body *:not(.mma-host){line-height:1.9 !important}
html.mma-lh2 body *:not(.mma-host){line-height:2.3 !important}
html.mma-lh3 body *:not(.mma-host){line-height:2.7 !important}

/* ---------- Spessore ---------- */
html.mma-bold body *:not(.mma-host){font-weight:700 !important}

/* ---------- Allineamento ---------- */
html.mma-al-left body *:not(.mma-host){text-align:left !important}
html.mma-al-center body *:not(.mma-host){text-align:center !important}
html.mma-al-right body *:not(.mma-host){text-align:right !important}
html.mma-al-center body ul, html.mma-al-center body ol, html.mma-al-right body ul, html.mma-al-right body ol{list-style-position:inside !important}

/* ---------- Evidenzia titoli e collegamenti ---------- */
html.mma-headings body h1, html.mma-headings body h2, html.mma-headings body h3,
html.mma-headings body h4, html.mma-headings body h5, html.mma-headings body h6{background:#fff3c4 !important;color:#000 !important;outline:2px dashed #1d5fd0 !important;outline-offset:3px !important;box-shadow:inset 6px 0 0 #1d5fd0 !important;padding-left:.5em !important}
html.mma-links body a:not(.mma-host){text-decoration:underline !important;font-weight:700 !important;background:#fff3c4 !important;color:#00309c !important;outline:2px solid #1d5fd0 !important;outline-offset:1px !important}

/* ---------- Contrasti ---------- */
html.mma-c-dark, html.mma-c-dark body{background:#121212 !important}
html.mma-c-dark body *:not(.mma-host){background-color:#121212 !important;color:#e8e8e8 !important;border-color:#444 !important;box-shadow:none !important;text-shadow:none !important}
html.mma-c-dark body a:not(.mma-host), html.mma-c-dark body a *{color:#7cc0ff !important}

html.mma-c-light, html.mma-c-light body{background:#fff !important}
html.mma-c-light body *:not(.mma-host){background-color:#fff !important;color:#000 !important;border-color:#000 !important;box-shadow:none !important;text-shadow:none !important}
html.mma-c-light body a:not(.mma-host), html.mma-c-light body a *{color:#003c9e !important}

html.mma-c-high, html.mma-c-high body{background:#000 !important}
html.mma-c-high body *:not(.mma-host){background-color:#000 !important;color:#fff !important;border-color:#fff !important;box-shadow:none !important;text-shadow:none !important}
html.mma-c-high body a:not(.mma-host), html.mma-c-high body a *{color:#ff0 !important;text-decoration:underline !important}
html.mma-c-high body h1, html.mma-c-high body h2, html.mma-c-high body h3, html.mma-c-high body h4{color:#ff0 !important}

/* immagini e video restano visibili nei contrasti */
html.mma-c-dark body img, html.mma-c-light body img, html.mma-c-high body img,
html.mma-c-dark body video, html.mma-c-light body video, html.mma-c-high body video{background-color:transparent !important}

/* ---------- Saturazione (non tocca il menu) ---------- */
html.mma-sat-high body > *:not(.mma-host){filter:saturate(2) !important}
html.mma-sat-low body > *:not(.mma-host){filter:saturate(.4) !important}
html.mma-sat-mono body > *:not(.mma-host){filter:grayscale(1) !important}

/* ---------- Cursore grande e animazioni ---------- */
html.mma-cursor, html.mma-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 3l30 26H22l8 15-6 3-8-15-10 9z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3,auto !important}
html.mma-noanim *, html.mma-noanim *::before, html.mma-noanim *::after{animation:none !important;transition:none !important;scroll-behavior:auto !important}

/* ---------- Paragrafo letto ad alta voce ---------- */
.mma-speaking{background:#fff3c4 !important;color:#000 !important;outline:3px solid #ffbf47 !important;outline-offset:3px !important}

/* ---------- Host dell'interfaccia ---------- */
.mma-host{all:initial}
.mma-bar-host{display:block;margin:0 0 1.5em}

@media print{
	#mma-root, .mma-bar-host{display:none !important}
}
