/*
 * a11y-iframe.css v1
 * Da includere nelle pagine aperte in <iframe>.
 * Gestisce dark mode e contrasto senza toolbar/pulsanti.
 * Il background dell'iframe deve essere transparent per
 * eredirare il tema dalla pagina principale.
 */

/* ── Dark mode ────────────────────────────────────────────── */
body.a11y-dark {
  background-color: #0f1a1a !important;
  color: #dce8e8 !important;
}

body.a11y-dark p,
body.a11y-dark li,
body.a11y-dark span,
body.a11y-dark div   { color: #dce8e8 !important; }

body.a11y-dark h1, body.a11y-dark h2, body.a11y-dark h3,
body.a11y-dark h4, body.a11y-dark h5, body.a11y-dark h6 { color: #aee8e8 !important; }

body.a11y-dark a         { color: #4dd4d6 !important; }
body.a11y-dark a:hover   { color: #80e8e8 !important; }
body.a11y-dark a:visited { color: #4dd4d6 !important; }

body.a11y-dark table { background-color: #1a2a2a !important; }
body.a11y-dark th,
body.a11y-dark td    { background-color: #1e3030 !important; color: #dce8e8 !important; border-color: #2a4040 !important; }

body.a11y-dark input,
body.a11y-dark textarea,
body.a11y-dark select { background-color: #1e3030 !important; color: #dce8e8 !important; border-color: #2a4040 !important; }

body.a11y-dark img {
  /* evita immagini troppo abbaglianti in dark mode */
  filter: brightness(0.9);
}

/* ── Alto contrasto ───────────────────────────────────────── */
body.a11y-contrast::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999998;
  backdrop-filter: contrast(1.65);
  -webkit-backdrop-filter: contrast(1.65);
}

/* ── Override sfondo contenuto contratto ─────────────────── */
body.a11y-dark #Testo,
body.a11y-dark #Testo * {
  background-color: #1e3030 !important;
  color: #dce8e8 !important;
  border-color: #2a4040 !important;
}

body.a11y-dark #Testo h1,
body.a11y-dark #Testo h2,
body.a11y-dark #Testo h3,
body.a11y-dark #Testo h4 { color: #aee8e8 !important; }

body.a11y-dark #Testo a         { color: #4dd4d6 !important; }
body.a11y-dark #Testo a:hover   { color: #80e8e8 !important; }

/* Override Bootstrap card/panel/well che hanno bg bianco */
body.a11y-dark .card,
body.a11y-dark .panel,
body.a11y-dark .well,
body.a11y-dark .panel-body,
body.a11y-dark .panel-heading   { background-color: #1e3030 !important; color: #dce8e8 !important; border-color: #2a4040 !important; }

/* Google Translate bar */
body.a11y-dark #google_translate_element,
body.a11y-dark .goog-te-gadget  { background-color: #0f1a1a !important; color: #dce8e8 !important; }

/* ── Override sfondo contenuto contratto ─────────────────── */
body.a11y-dark #newsbox,
body.a11y-dark #newsbox * {
  background-color: #1e3030 !important;
  color: #dce8e8 !important;
  border-color: #2a4040 !important;
}

body.a11y-dark #newsbox h1,
body.a11y-dark #newsbox h2,
body.a11y-dark #newsbox h3,
body.a11y-dark #newsbox h4 { color: #aee8e8 !important; }

body.a11y-dark #newsbox a         { color: #4dd4d6 !important; }
body.a11y-dark #newsbox a:hover   { color: #80e8e8 !important; }