/* Butonul de accesibilitate (js/accesibilitate.js) și efectele lui pe pagină.
   Efectele se pun pe copiii lui body, nu pe body: filter și zoom pe body ar muta și butonul fix. */

/* ---------- efectele ---------- */
.a11y-zoom body > :not(.a11y) { zoom: var(--a11y-zoom, 1); }
.a11y-gray body > :not(.a11y) { filter: grayscale(1); }
/* cu text mare, antetul crește cât îi trebuie, ca numele clubului să nu fie tăiat */
.a11y-zoom .nav-in { height: auto; min-height: 62px; padding-block: 8px; }

.a11y-contrast {
  --ink-2: var(--ink); --ink-3: #2b3138; --line: #6b737d; --field: #4a5058;
  --accent: #0b3a8a; --accent-dark: #082c69; --wash: #dfe8f7;
}
.a11y-contrast .nav { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
.a11y-contrast ::placeholder { color: #4a5058; }

.a11y-links body > :not(.a11y) a:not(.btn) { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px; }

.a11y-font { --display: 'Schibsted Grotesk', system-ui, sans-serif; }
.a11y-font body > :not(.a11y) * { text-transform: none !important; letter-spacing: normal !important; font-style: normal !important; }

/* valorile din WCAG 1.4.12 (spațierea textului) */
.a11y-spacing body > :not(.a11y) :is(p, li, label, dd, dt, td, th, .c-val, .lead) {
  line-height: 1.8 !important; letter-spacing: .12em !important; word-spacing: .16em !important;
}
.a11y-spacing body > :not(.a11y) p { margin-bottom: 2em !important; }

.a11y-motion { scroll-behavior: auto !important; }
.a11y-motion *, .a11y-motion *::before, .a11y-motion *::after { transition-duration: .01ms !important; animation: none !important; }
.a11y-motion .reveal { opacity: 1 !important; transform: none !important; }

.a11y-cursor, .a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath d='M5 2.5l15 8.6-6.4 1.8-3.3 6.6z' fill='%2311161c' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}

/* ---------- butonul ---------- */
.a11y { position: fixed; right: 20px; bottom: 20px; z-index: 90; font-family: 'Schibsted Grotesk', system-ui, sans-serif; }
.a11y-btn {
  position: relative; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--accent-ink);
  background: var(--accent); box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 6.5px var(--accent-ink), 0 8px 24px -8px rgb(17 22 28 / .45);
  transition: background .2s, transform .2s var(--ease);
}
.a11y-btn svg { width: 30px; height: 30px; stroke-width: 2.4; }
.a11y-btn:hover { background: var(--accent-dark); box-shadow: inset 0 0 0 4px var(--accent-dark), inset 0 0 0 6.5px var(--accent-ink), 0 8px 24px -8px rgb(17 22 28 / .45); }
.a11y-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 50%; }
/* un punct mic: are setări pornite */
.a11y-btn.on::after { content: ""; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #1f9d55; border: 2.5px solid var(--paper); }

/* ---------- panoul ---------- */
.a11y-panel {
  position: absolute; right: 0; bottom: 74px; width: 360px;
  max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow), 0 24px 48px -24px rgb(17 22 28 / .35);
}
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.a11y-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; }
.a11y-x { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--tint); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.a11y-x svg { width: 20px; height: 20px; }
.a11y-x:hover { background: var(--line); }

.a11y-zoom-row { display: grid; grid-template-columns: 1fr 44px 56px 44px; align-items: center; gap: 6px; padding: 10px 10px 10px 14px; margin-bottom: 10px; background: var(--tint); border-radius: 12px; }
.a11y-zoom-row span { font-weight: 600; font-size: 15px; }
.a11y-zoom-row button { height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font: 700 16px/1 'Schibsted Grotesk', system-ui, sans-serif; cursor: pointer; }
.a11y-zoom-row button:hover:not(:disabled) { border-color: var(--ink); }
.a11y-zoom-row button:disabled { opacity: .4; cursor: default; }
.a11y-zoom-row output { text-align: center; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }

.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-opt {
  display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 92px; padding: 12px 8px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink);
  font: 600 14px/1.25 'Schibsted Grotesk', system-ui, sans-serif; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.a11y-opt svg { width: 26px; height: 26px; }
.a11y-opt:hover { border-color: var(--ink); }
.a11y-opt[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.a11y-opt:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 64px; grid-auto-flow: column; justify-content: center; gap: 10px; }

.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.a11y-reset { flex: none; white-space: nowrap; padding: 10px 14px; border: 0; border-radius: 99px; background: var(--tint); color: var(--ink); font: 600 14px/1 'Schibsted Grotesk', system-ui, sans-serif; cursor: pointer; }
.a11y-reset:hover { background: var(--line); }
.a11y-foot a { color: var(--accent); font-weight: 600; text-align: right; }

@media (max-width: 600px) {
  .a11y { right: 16px; bottom: 16px; }
  .a11y-btn { width: 54px; height: 54px; }
  .a11y-btn svg { width: 27px; height: 27px; }
  .a11y-panel { position: fixed; left: 16px; right: 16px; bottom: 82px; width: auto; }
}

@media print { .a11y { display: none !important; } }
