/* Jessica — the theme's side of the accessibility panel (cd-accessibilita 1.0, LEGGIMI.md «Il patto con il tema»).
   The theme declares cd-a11y-contrasto, cd-a11y-semplice and cd-a11y-lettura (functions.php) and styles them here.
   Text size is left to the module (zoom): the theme's scale is in px, as YOOtheme's. */

/* ── high contrast: black text on white; the turquoise stays only as a background, text and lines become dark teal ── */
html.cd-a11y-contrasto { --testo: #000; --titoli: #000; --tenue: #333; --giallo: #7a4a00; --blu-testo: #00606e; --bordo: #222; }
html.cd-a11y-contrasto body { background: #fff; color: #000; }
html.cd-a11y-contrasto a:not(.pulsante), html.cd-a11y-contrasto .titolo--blu, html.cd-a11y-contrasto .titolo--titolo-blu,
html.cd-a11y-contrasto .riquadri h3, html.cd-a11y-contrasto .menu .attiva > a, html.cd-a11y-contrasto .dati-commento dd a { color: var(--blu-testo); }
html.cd-a11y-contrasto main a:not(.pulsante) { text-decoration-line: underline; }
html.cd-a11y-contrasto .pulsante--primary, html.cd-a11y-contrasto .colonna--primary, html.cd-a11y-contrasto .scheda--primary,
html.cd-a11y-contrasto .barra-social, html.cd-a11y-contrasto .menu-telefono-pannello { background: var(--blu-testo); }
html.cd-a11y-contrasto .cd-form-avanti, html.cd-a11y-contrasto .cd-form-invia { background: var(--blu-testo) !important; }
html.cd-a11y-contrasto .colonna--primary, html.cd-a11y-contrasto .colonna--primary a:not(.pulsante), html.cd-a11y-contrasto .ultimi-corsi-data { color: #fff; }
html.cd-a11y-contrasto .pulsante--default { color: var(--blu-testo); border-color: var(--blu-testo); }
html.cd-a11y-contrasto .colonna--primary .pulsante--default, html.cd-a11y-contrasto .pulsante--bianco { color: #fff; border-color: #fff; }
html.cd-a11y-contrasto .menu-pannello a { color: #fff; }
html.cd-a11y-contrasto .filtro-voci button { color: #333; }
html.cd-a11y-contrasto .filtro-voci button[aria-pressed="true"] { color: #000; border-bottom-color: #000; }
html.cd-a11y-contrasto .carosello-punti button { border-color: #666; }
html.cd-a11y-contrasto .carosello-punti button[aria-current="true"] { border-color: var(--blu-testo); background: var(--blu-testo); }
html.cd-a11y-contrasto .scheda--default, html.cd-a11y-contrasto .colonna--default, html.cd-a11y-contrasto .riquadri > li { border: 2px solid #222; }

/* ── simplified page: one column, no shadows, no sticky bar ── */
html.cd-a11y-semplice .riga--2, html.cd-a11y-semplice .griglia, html.cd-a11y-semplice .riquadri { grid-template-columns: 1fr !important; }
html.cd-a11y-semplice .sezione--secondary .colonna > p:first-of-type { column-count: 1; }
html.cd-a11y-semplice .sezione--secondary .colonna > p:first-of-type::first-letter { float: none; font-size: inherit; margin: 0; }
html.cd-a11y-semplice * { box-shadow: none !important; }
html.cd-a11y-semplice .testata { position: static; }

/* ── reading mode: the buttons made of links, the slider's arrows and dots are not text to read ── */
html.cd-a11y-lettura-pronta .cd-lettura-radice :is(.pulsante, .carosello-punti, .carosello-freccia, .filtro, .social) { display: none !important; }

/* ── «Molto grande» on a 320 px phone (the module zooms the page by 1.3): long words of the course titles and the «Menu»
   button with its padding were wider than the screen, so the whole page scrolled sideways (WCAG 1.4.10). Ticket 07. ── */
@media (max-width: 479px) {
    html.cd-a11y-testo-grande main, html.cd-a11y-testo-molto main,
    html.cd-a11y-testo-grande footer, html.cd-a11y-testo-molto footer { overflow-wrap: anywhere; }
    html.cd-a11y-testo-molto .menu-apri { padding: 0 8px; }
    html.cd-a11y-testo-molto .menu-apri svg { margin-left: 6px; }
}
