/* Barra di accessibilità e regolazioni che applica alle pagine. */

/* ---- Pulsante ---- */
.a11y-toggle {
  position: fixed;
  right: 15px;
  bottom: 15px;
  z-index: 2147483646;
  display: block;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 30px;
  background: none;
}
.a11y-toggle:hover,
.a11y-toggle:focus-visible { background: none; }
.a11y-toggle img {
  display: block;
  width: 48px;
  height: 48px;
  padding: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background-color: #0048fe;
  box-shadow: 0 0 0 4px #0048fe;
  transition: transform 0.3s;
}
.a11y-toggle:hover img { transform: scale(1.1); }
.a11y-toggle:focus-visible img { outline: 3px solid #ffb575; outline-offset: 4px; }
.a11y--hidden .a11y-toggle { display: none; }
@media (max-width: 768px) {
  .a11y-toggle { width: 44px; height: 44px; }
  .a11y-toggle img {
    width: 44px;
    height: 44px;
    padding: 7px;
  }
}

/* ---- Pannello ---- */
.a11y-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2147483647;
  width: 580px;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #f3f4f6;
  box-shadow: 2px 8px 60px -2px rgba(0, 0, 0, 0.2);
  color: #181d27;
  font: 400 16px/1.7 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.75s cubic-bezier(0.23, 1, 0.32, 1), visibility 0s 0.75s;
}
.a11y-panel.is-open {
  visibility: visible;
  transform: none;
  transition: transform 0.75s cubic-bezier(0.23, 1, 0.32, 1);
}
@media (prefers-reduced-motion: reduce) {
  .a11y-panel,
  .a11y-panel.is-open { transition: none; }
}
.a11y-panel button {
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
}
.a11y-panel :focus-visible {
  outline: 3px solid #ffb575;
  outline-offset: 2px;
}

.a11y-head {
  position: relative;
  height: 351px;
  padding: 83px 20px 0;
  background: #0048fe;
  color: #fff;
  text-align: center;
}
.a11y-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  color: #fff;
}
.a11y-close:hover,
.a11y-close:focus-visible { background: rgba(0, 0, 0, 0.25); color: #fff; }
.a11y-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}
.a11y-head__icon {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  margin: 0 auto 30px;
  border-radius: 50%;
  background: #fff;
  color: #0048fe;
}
.a11y-head__icon svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}
.a11y-head__title {
  margin: 0 0 16px;
  color: #fff;
  font-family: inherit;
  font-size: 28px;
  font-weight: 600;
  line-height: 32px;
}
.a11y-head__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 15px;
  margin: 0;
  opacity: 0.85;
  line-height: 19.236px;
}
.a11y-head__links button {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #fff;
  line-height: inherit;
}
.a11y-head__links button:hover,
.a11y-head__links button:focus-visible {
  background: none;
  color: #fff;
  text-decoration: underline;
}

.a11y-section {
  margin-bottom: 24px;
  padding: 0 14px;
}
.a11y-section--first { margin-top: -85px; }
.a11y-card {
  position: relative;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
}
.a11y-card__title {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  color: #181d27;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
}
.a11y-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.a11y-tile {
  display: flex;
  flex: 1 1 calc((100% - 20px) / 3);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 132px;
  padding: 24px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f8fafc;
  color: #181d27;
  text-align: center;
  transition: border-color 0.2s, background-color 0.2s;
}
button.a11y-tile:hover,
button.a11y-tile:focus-visible {
  border-color: #0048fe;
  background: #f8fafc;
  color: #181d27;
}
.a11y-tile[aria-pressed='true'],
.a11y-tile.is-active {
  border-color: #0048fe;
  background: #eef3ff;
}
.a11y-tile--wide { flex-basis: calc((100% - 20px) / 3 * 2 + 10px); }
.a11y-tile__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #111;
}
.a11y-tile[aria-pressed='true'] .a11y-tile__icon {
  background: #0048fe;
  color: #fff;
}
.a11y-tile__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.a11y-tile__label {
  font-size: 14px;
  line-height: 24px;
}
.a11y-tile__label--strong { font-weight: 500; }
.a11y-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 210px;
  max-width: 100%;
  border-radius: 30px;
  background: #fff;
}
.a11y-stepper__btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #0048fe;
  color: #fff;
}
.a11y-stepper__btn:hover,
.a11y-stepper__btn:focus-visible { background: #0036c2; color: #fff; }
.a11y-stepper__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.a11y-stepper__btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.a11y-stepper__value {
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.a11y-skip__label {
  display: block;
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 28px;
}
.a11y-skip {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  background: #fff;
  color: #000;
  font: inherit;
}

.a11y-reset { padding: 0 14px 24px; }
.a11y-reset button,
.a11y-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: #0048fe;
  color: #fff;
  font-weight: 600;
  line-height: 1.3333;
}
.a11y-reset button:hover,
.a11y-reset button:focus-visible,
.a11y-btn:hover,
.a11y-btn:focus-visible { background: #0036c2; color: #fff; }

.a11y-statement {
  color: #334155;
  font-size: 14px;
  line-height: 22px;
}
.a11y-statement h2 {
  margin: 0 0 16px;
  color: #111;
  font-family: inherit;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}
.a11y-statement h3 {
  margin: 16px 0 8px;
  color: #111;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  line-height: 24px;
}
.a11y-statement p,
.a11y-statement ul { margin: 0 0 12px; }
.a11y-statement ul { padding-left: 20px; }
.a11y-statement a { color: #0048fe; }
.a11y-back,
.a11y-btn--light {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  margin-bottom: 24px;
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}
.a11y-back:hover,
.a11y-back:focus-visible,
.a11y-btn--light:hover,
.a11y-btn--light:focus-visible { background: #f3f4f6; color: #374151; }
.a11y-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.a11y-hide fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.a11y-hide__option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}
.a11y-hide__option input { accent-color: #0048fe; }
.a11y-hide__note {
  margin: 6px 0 20px;
  color: #4b5563;
  font-size: 14px;
  line-height: 20px;
}
.a11y-hide__actions {
  display: flex;
  gap: 10px;
}
.a11y-hide__actions .a11y-btn--light {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

/* Linea e maschera di lettura */
.a11y-line {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 2147483645;
  height: 12px;
  margin-top: -6px;
  border-top: 3px solid #0048fe;
  border-bottom: 3px solid #0048fe;
  background: rgba(255, 213, 0, 0.35);
  pointer-events: none;
}
.a11y-mask {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 2147483645;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.a11y-mask--top { top: 0; }
.a11y-mask--bottom { bottom: 0; }

@media (max-width: 600px) {
  .a11y-head__title { font-size: 24px; }
  .a11y-tile { flex-basis: calc((100% - 10px) / 2); }
  .a11y-tile--wide { flex-basis: 100%; }
}

/* ---- Effetti delle regolazioni sulla pagina (esclusa la barra stessa) ---- */
html.a11y-readable body > :not(.a11y) :not(svg, svg *, .icon, .icon *) {
  font-family: Roboto, Verdana, Arial, sans-serif !important;
}
html.a11y-letter-spacing body > :not(.a11y) * {
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
}
html.a11y-bold body > :not(.a11y) * { font-weight: 700 !important; }
html.a11y-align-left body > :not(.a11y) :is(p, li, h1, h2, h3, h4, h5, h6, label, td, th, blockquote, .title) { text-align: left !important; }
html.a11y-align-center body > :not(.a11y) :is(p, li, h1, h2, h3, h4, h5, h6, label, td, th, blockquote, .title) { text-align: center !important; }
html.a11y-align-right body > :not(.a11y) :is(p, li, h1, h2, h3, h4, h5, h6, label, td, th, blockquote, .title) { text-align: right !important; }

html.a11y-cursor,
html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2v18l4.8-4.5 3.2 6.6 2.9-1.4-3.2-6.5H19z' fill='%23000' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 10 4, auto !important;
}

html.a11y-light-contrast body > :not(.a11y),
html.a11y-light-contrast body > :not(.a11y) :is(p, li, span, a, label, h1, h2, h3, h4, h5, h6, input, textarea, select, blockquote, td, th, .title) {
  color: #27272d !important;
  background-color: #fff !important;
}
html.a11y-high-contrast body > :not(.a11y) { filter: contrast(150%); }
html.a11y-monochrome body > :not(.a11y) { filter: grayscale(100%); }
html.a11y-high-contrast.a11y-monochrome body > :not(.a11y) { filter: contrast(150%) grayscale(100%); }

html.a11y-hide-images body > :not(.a11y) :is(img, picture, video, iframe) { visibility: hidden !important; }
html.a11y-hide-images body > :not(.a11y),
html.a11y-hide-images body > :not(.a11y) * { background-image: none !important; }

html.a11y-highlight-content body > :not(.a11y) :is(h1, h2, h3, h4, h5, h6) {
  outline: 2px solid #0048fe !important;
  outline-offset: 3px;
}
html.a11y-highlight-links body > :not(.a11y) a {
  outline: 2px solid #0048fe !important;
  outline-offset: 2px;
  text-decoration: underline !important;
}
html.a11y-stop-animations *,
html.a11y-stop-animations *::before,
html.a11y-stop-animations *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
