/* ---------------------------------------------------------------------------
   Meniul de accesibilitate (js/accesibilitate.js), acelasi ca pe lions.ro.
   Clasele a11y-* stau pe <html> si sunt puse de script inainte de prima desenare.

   Filtrele stau pe <html>, nu pe <body>: pe elementul radacina un filtru nu
   schimba pozitionarea elementelor fixe (meniul, ferestrele modale).
   Marirea e `zoom` pe tot ce e in <body> in afara de meniu, ca meniul sa ramana
   in coltul ecranului si sa nu creasca peste margine.
   --------------------------------------------------------------------------- */

html.a11y-zoom body > *:not(.a11y) { zoom: var(--a11y-scale, 1); }

html.a11y-gri      { filter: grayscale(1); }
html.a11y-inversat { filter: invert(1) hue-rotate(180deg); }
html.a11y-gri.a11y-inversat { filter: grayscale(1) invert(1) hue-rotate(180deg); }
/* Pozele si documentele se intorc la culorile lor. */
html.a11y-inversat :is(img, video, iframe, canvas) {
  filter: invert(1) hue-rotate(180deg);
}

html.a11y-legaturi a:not(.a11y *) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 0.18em;
  background-color: #FFF35C !important;
  color: #0D2240 !important;
  outline: 2px solid #0D2240;
  outline-offset: 1px;
}

html.a11y-font body,
html.a11y-font body :is(h1, h2, h3, h4, h5, h6, p, li, a, span, div, td, th, label, input, textarea, select, button) {
  font-family: Verdana, Tahoma, Arial, sans-serif !important;
  letter-spacing: 0.02em !important;
  word-spacing: 0.08em;
}

.a11y {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147483000;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.3; letter-spacing: normal;
}
.a11y-toggle {
  display: grid; place-items: center;
  width: 54px; height: 54px; padding: 0; margin: 0;
  border: 2px solid #FFF; border-radius: 50%;
  background: #00338D; color: #FFF; cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 34, 64, .35);
  transition: transform .15s ease, background .15s ease;
}
.a11y-toggle:hover, .a11y-toggle[aria-expanded="true"] { background: #0D2240; transform: scale(1.05); }
.a11y-toggle:focus-visible { outline: 3px solid #EBB700; outline-offset: 3px; }

.a11y-menu {
  position: absolute; left: 0; bottom: 66px;
  width: 280px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 100px); overflow-y: auto;
  background: #FFF; color: #1A1D23;
  border: 1px solid #E2E5EA; border-radius: 10px;
  box-shadow: 0 12px 34px rgba(13, 34, 64, .28);
  text-align: left;
}
.a11y-menu[hidden] { display: none; }
.a11y .a11y-title {
  margin: 0; padding: 12px 16px;
  background: #00338D; color: #FFF;
  font-weight: 700; font-size: 15px; border-radius: 10px 10px 0 0;
}
.a11y-menu ul { list-style: none; margin: 0; padding: 0; }
.a11y-menu li { margin: 0; padding: 0; }
.a11y-menu li + li { border-top: 1px solid #E2E5EA; }
.a11y-menu li button {
  display: flex; align-items: center; gap: 14px; width: 100%;
  margin: 0; padding: 12px 16px; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: #1A1D23; font: inherit; font-size: 16px; text-align: left; text-transform: none; cursor: pointer;
}
.a11y-menu li button:hover { background: #EEF2F9; transform: none; }
.a11y-menu li button:focus-visible { outline: 3px solid #EBB700; outline-offset: -3px; }
.a11y-menu li button[aria-pressed="true"] { background: #E3EAF7; color: #00338D; font-weight: 700; }
.a11y-menu li button[aria-pressed="true"]::after { content: "✓"; margin-left: auto; font-weight: 700; }
.a11y-menu li button:disabled { color: #8A929E; cursor: not-allowed; background: none; opacity: 1; }
.a11y-menu svg {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.a11y .a11y-status { margin: 0; padding: 8px 16px 12px; font-size: 13px; color: #5A6371; }
.a11y .a11y-status:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .a11y-toggle { transition: none; }
}
@media print {
  .a11y { display: none; }
}
