/* =========================================================
   Panoul „Setări de accesibilitate” + efectele fiecărui modul
   ========================================================= */

/* ---------- Efecte (clase puse pe <html> de a11y.js) ---------- */
html.a11y-readable body, html.a11y-readable body * {
  font-family: Verdana, Tahoma, "Trebuchet MS", Arial, sans-serif !important;
}
html.a11y-spacing .site, html.a11y-spacing .site * {
  letter-spacing: .12em !important;
  word-spacing: .16em !important;
}
html.a11y-spacing .site p { margin-bottom: 2em; }
html.a11y-bold .site, html.a11y-bold .site * { font-weight: 700 !important; }

html.a11y-align-left .site main * { text-align: left !important; }
html.a11y-align-center .site main * { text-align: center !important; }
html.a11y-align-right .site main * { text-align: right !important; }

html.a11y-hide-img .site img,
html.a11y-hide-img .site svg:not(.keep-svg),
html.a11y-hide-img .site iframe { visibility: hidden !important; }
html.a11y-hide-img .hero-media { background: var(--bg-alt); }

html.a11y-links .site a {
  text-decoration: underline !important;
  text-decoration-thickness: 3px !important;
  background: #ffea00 !important;
  color: #000 !important;
  outline: 1px solid #000;
}

html.a11y-highlight .site :is(h1, h2, h3, h4, p, li, dt, dd, td, th, figure, label, a, button, input, textarea, select):hover {
  outline: 3px dashed #b3122b !important;
  outline-offset: 2px;
}
html.a11y-highlight :focus-visible { outline-width: 5px !important; outline-offset: 4px !important; }

html.a11y-no-motion *, html.a11y-no-motion *::before, html.a11y-no-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !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 48 48'%3E%3Cpath d='M6 3 L6 40 L15 31 L21 45 L28 42 L22 28 L35 28 Z' fill='%23000' stroke='%23fff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}

.a11y-reading-line {
  position: fixed; left: 0; right: 0; height: 10px; margin-top: -5px;
  background: #f2c230; border-block: 2px solid #14274a;
  pointer-events: none; z-index: 9990; display: none;
}
html.a11y-line .a11y-reading-line { display: block; }
.a11y-mask-top, .a11y-mask-bottom {
  position: fixed; left: 0; right: 0; background: rgba(0, 0, 0, .62);
  pointer-events: none; z-index: 9989; display: none;
}
.a11y-mask-top { top: 0; }
.a11y-mask-bottom { bottom: 0; }
html.a11y-mask .a11y-mask-top, html.a11y-mask .a11y-mask-bottom { display: block; }

/* ---------- Butoane flotante (dreapta jos): accesibilitate + cookie-uri ---------- */
.float-btn {
  position: fixed; z-index: 9995;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  display: grid; place-items: center; cursor: pointer;
  background: #14274a; color: #fff;
  border: 2px solid #f2c230; border-radius: .9rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
}
.float-btn[hidden] { display: none; }
.float-btn:focus-visible { outline: 3px solid #f2c230; outline-offset: 3px; box-shadow: 0 0 0 6px #14274a; }
.a11y-fab { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); width: 3.5rem; height: 3.5rem; }
.a11y-fab svg { width: 1.9rem; height: 1.9rem; }
.a11y-badge {
  position: absolute; top: -.55rem; right: -.55rem; min-width: 1.5rem; height: 1.5rem; padding: 0 .3rem;
  border-radius: .75rem; background: #f2c230; color: #14274a; font: 700 .8rem/1.5rem system-ui, sans-serif; text-align: center;
  border: 2px solid #14274a;
}
.a11y-badge[hidden] { display: none; }
.consent-fab { bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)); width: 2.9rem; height: 2.9rem; right: calc(1.3rem + env(safe-area-inset-right, 0px)); background: #fff; color: #14274a; border-color: #14274a; }
.consent-fab svg { width: 1.6rem; height: 1.6rem; }

/* ---------- Panoul de accesibilitate ---------- */
.a11y-overlay { position: fixed; inset: 0; background: rgba(10, 18, 36, .5); z-index: 9996; }
.a11y-overlay[hidden], .a11y-panel[hidden] { display: none; }
.a11y-panel {
  --p-ink: #14274a; --p-gold: #f2c230; --p-text: #16202e; --p-muted: #465267; --p-line: #d3dae6; --p-soft: #f4f6fa;
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9997;
  width: min(25rem, 100%); display: flex; flex-direction: column;
  background: #fff; color: var(--p-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.4; letter-spacing: normal; word-spacing: normal; text-align: left;
  box-shadow: -12px 0 32px rgba(0,0,0,.28);
}
html.a11y-readable .a11y-panel, html.a11y-readable .a11y-panel * { font-family: Verdana, Tahoma, sans-serif !important; }
.a11y-panel h2 { font-family: inherit; margin: 0; }
.a11y-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--p-ink); color: #fff; border-bottom: 4px solid var(--p-gold);
  padding: calc(.9rem + env(safe-area-inset-top, 0px)) 1rem .9rem 1.25rem;
}
.a11y-bar h2 { font-size: 1.3rem; color: #fff; display: flex; align-items: center; gap: .6rem; }
.a11y-bar h2 svg { width: 1.5rem; height: 1.5rem; }
.a11y-close {
  width: 2.75rem; height: 2.75rem; border: 2px solid rgba(255,255,255,.6); border-radius: .6rem;
  background: transparent; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.a11y-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1rem 1.25rem 1.25rem; }
.a11y-intro { margin: 0 0 1rem; color: var(--p-muted); font-size: .95rem; }

.a11y-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.a11y-tile {
  display: flex; align-items: center; gap: .6rem; min-height: 3.5rem; width: 100%;
  padding: .55rem .7rem; text-align: left; cursor: pointer;
  font: inherit; font-size: .93rem; color: var(--p-text);
  background: var(--p-soft); border: 2px solid var(--p-line); border-radius: .6rem;
}
.a11y-tile:hover { border-color: var(--p-ink); }
.a11y-tile svg { width: 1.3rem; height: 1.3rem; flex: none; }
.a11y-tile .lbl { flex: 1; }
.a11y-tile .sub { display: block; font-size: .78rem; color: var(--p-muted); }
.a11y-tile[aria-pressed="true"] { background: var(--p-ink); border-color: var(--p-ink); color: #fff; }
.a11y-tile[aria-pressed="true"] .sub { color: #dfe6f3; }
.a11y-tile[aria-pressed="true"]::after {
  content: ""; width: .55rem; height: .95rem; flex: none; margin-right: .2rem;
  border: solid var(--p-gold); border-width: 0 3px 3px 0; transform: rotate(45deg) translateY(-2px);
}

.a11y-range {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .5rem .5rem .5rem .8rem; border: 2px solid var(--p-line); border-radius: .6rem; background: var(--p-soft);
}
.a11y-range .lbl { font-weight: 600; font-size: .95rem; }
.a11y-range .ctrl { display: flex; align-items: center; gap: .35rem; }
.a11y-range button {
  width: 2.6rem; height: 2.6rem; border-radius: .5rem; cursor: pointer;
  border: 2px solid var(--p-ink); background: #fff; color: var(--p-ink); font-size: 1.35rem; font-weight: 700; line-height: 1;
}
.a11y-range button:disabled { opacity: .35; cursor: not-allowed; }
.a11y-range output { min-width: 4.6rem; text-align: center; font-weight: 700; font-size: .9rem; }

.a11y-jump { margin-top: 1rem; }
.a11y-jump label { display: block; font-weight: 600; margin-bottom: .35rem; }
.a11y-select { width: 100%; font: inherit; padding: .7rem; border: 2px solid var(--p-line); border-radius: .6rem; background: #fff; color: var(--p-text); }

.a11y-foot {
  display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center;
  padding: .9rem 1.25rem calc(.9rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--p-line); background: var(--p-soft);
}
.a11y-reset {
  min-height: 3rem; border: 2px solid var(--p-ink); border-radius: .6rem; cursor: pointer;
  background: var(--p-gold); color: var(--p-ink); font: inherit; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.a11y-reset svg { width: 1.2rem; height: 1.2rem; }
.a11y-hide-btn { background: none; border: 0; color: var(--p-ink); font: inherit; font-size: .88rem; text-decoration: underline; cursor: pointer; padding: .5rem; }
.a11y-note { font-size: .82rem; color: var(--p-muted); margin: 1rem 0 0; }
.a11y-panel :focus-visible { outline: 3px solid var(--p-gold); outline-offset: 2px; box-shadow: 0 0 0 6px var(--p-ink); }
@media (max-width: 22em) { .a11y-tiles { grid-template-columns: 1fr; } }

/* ---------- Popup consimțământ ---------- */
.consent-backdrop { position: fixed; inset: 0; z-index: 9998; background: rgba(10, 18, 36, .55); display: grid; place-items: center; padding: 1rem; }
.consent-backdrop[hidden] { display: none; }
.consent {
  width: min(34rem, 100%);
  max-height: calc(100vh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background: #fff; color: #16202e; border-top: 6px solid #f2c230; border-radius: .75rem;
  box-shadow: 0 20px 48px rgba(0,0,0,.35);
  padding: 1.5rem 1.6rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5; text-align: left;
}
.consent h2 { font-family: inherit; font-size: 1.3rem; margin: 0; color: #16202e; }
.consent h2:focus, .consent h2:focus-visible { outline: none; box-shadow: none; }
.consent-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .7rem; }
.consent-close { width: 2.75rem; height: 2.75rem; flex: none; border: 2px solid #14274a; border-radius: .5rem; background: #fff; color: #14274a; font-size: 1.4rem; cursor: pointer; }
.consent p { margin: 0 0 1rem; font-size: .98rem; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.consent-actions button {
  min-height: 2.9rem; font: inherit; font-weight: 700; border-radius: .5rem; cursor: pointer;
  border: 2px solid #14274a; padding: .5rem .8rem;
}
.consent-actions .c-primary { background: #14274a; color: #fff; }
.consent-actions .c-secondary { background: #fff; color: #14274a; grid-column: 1 / -1; }
.consent-actions [hidden] { display: none; }
.consent-prefs { border: 0; padding: 0; margin: 0 0 1rem; }
.consent-prefs[hidden] { display: none; }
.consent-cat { border: 1px solid #c9d3e1; border-radius: .5rem; padding: .75rem .9rem; margin: 0 0 .6rem; }
.consent-cat label { display: flex; gap: .7rem; align-items: flex-start; font-weight: 700; cursor: pointer; }
.consent-cat input { width: 1.35rem; height: 1.35rem; margin-top: .15rem; flex: none; accent-color: #14274a; }
.consent-cat .desc { display: block; font-weight: 400; font-size: .92rem; color: #465267; margin-top: .2rem; }
.consent-links { font-size: .92rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1rem 0 0 !important; }
.consent-links a { color: #1d4fa3; }
.consent :focus-visible { outline: 3px solid #f2c230; outline-offset: 2px; box-shadow: 0 0 0 6px #14274a; }

html.a11y-color-high .consent, html.a11y-color-high .a11y-panel { outline: 3px solid #fff; }
