/* Israeli accessibility — תקנות שוויון זכויות לאנשים עם מוגבלות
   (התאמות נגישות לשירות) התשע"ג-2013.
   WCAG 2.1 AA-leaning runtime preferences, persisted in localStorage. */

/* ── Floating launcher button ──────────────────────────────────── */
#a11y-launcher {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0a66c2;
  color: white;
  border: 3px solid white;
  font-size: 26px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
#a11y-launcher:hover,
#a11y-launcher:focus {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  outline: 3px solid #ffd60a;
}
@media print {
  #a11y-launcher, #a11y-panel, #cookie-banner { display: none !important; }
}

/* ── Panel ──────────────────────────────────────────────────────── */
#a11y-panel {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 76px;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 100px);
  background: white;
  color: #111;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 9998;
  overflow-y: auto;
  display: none;
  font-family: system-ui, sans-serif;
}
#a11y-panel[aria-hidden="false"] { display: block; }
#a11y-panel header {
  background: #0a66c2;
  color: white;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 12px 12px 0 0;
}
#a11y-panel header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
#a11y-close {
  background: transparent;
  border: 1px solid white;
  color: white;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  font-size: 18px;
  cursor: pointer;
}
#a11y-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#a11y-panel li button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: white;
  border: 0;
  border-bottom: 1px solid #eee;
  text-align: start;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  color: #111;
}
#a11y-panel li button:hover,
#a11y-panel li button:focus {
  background: #f0f7ff;
  outline: 2px solid #0a66c2;
  outline-offset: -2px;
}
#a11y-panel li button.active {
  background: #d4edda;
  font-weight: 700;
}
#a11y-panel li button.active::after {
  content: " ✓";
  color: #155724;
  margin-inline-start: auto;
}
#a11y-panel .a11y-icon { font-size: 20px; min-width: 24px; text-align: center; }
#a11y-panel .a11y-reset {
  background: #fee2e2 !important;
  color: #991b1b !important;
  font-weight: 700;
}
#a11y-panel footer {
  padding: 10px 14px;
  font-size: 12px;
  color: #555;
  border-top: 1px solid #eee;
  background: #fafafa;
}
#a11y-panel footer a { color: #0a66c2; }

/* ── Body classes applied by the JS toggles ──────────────────── */

html.acc-text-110 body { font-size: 110% !important; }
html.acc-text-125 body { font-size: 125% !important; }
html.acc-text-150 body { font-size: 150% !important; }

html.acc-readable-font body,
html.acc-readable-font body * {
  font-family: Arial, Verdana, "Helvetica Neue", sans-serif !important;
  letter-spacing: 0.02em !important;
}

html.acc-high-contrast body,
html.acc-high-contrast body * {
  background: black !important;
  color: #ffeb00 !important;
  border-color: #ffeb00 !important;
}
html.acc-high-contrast body a,
html.acc-high-contrast body a * { color: #00e0ff !important; text-decoration: underline !important; }
html.acc-high-contrast body img { filter: grayscale(50%) contrast(1.2) !important; }

html.acc-grayscale body { filter: grayscale(100%) !important; }
html.acc-invert body { filter: invert(100%) hue-rotate(180deg) !important; }
html.acc-invert body img,
html.acc-invert body video { filter: invert(100%) hue-rotate(180deg) !important; }

html.acc-highlight-links body a {
  text-decoration: underline !important;
  font-weight: 700 !important;
  background: #fff79a !important;
  color: #002b80 !important;
  padding: 0 2px;
}

html.acc-no-animations *,
html.acc-no-animations *::before,
html.acc-no-animations *::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}

html.acc-cursor-large *,
html.acc-cursor-large body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M0 0 L0 24 L7 17 L11 27 L15 25 L11 16 L20 16 Z' fill='black' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") 0 0, default !important;
}

/* Skip-link — first focusable element on the page */
.a11y-skiplink {
  position: absolute;
  top: -40px;
  inset-inline-start: 0;
  background: #0a66c2;
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 700;
}
.a11y-skiplink:focus { top: 0; }

/* ── Cookie banner ────────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  background: #1e293b;
  color: white;
  padding: 14px 16px 14px 16px;
  z-index: 9997;
  font-size: 14px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: center;
  font-family: system-ui, sans-serif;
}
#cookie-banner[hidden] { display: none !important; }
#cookie-banner p { margin: 0; flex: 1 1 280px; max-width: 720px; line-height: 1.5; }
#cookie-banner a { color: #93c5fd; text-decoration: underline; }
#cookie-banner button {
  padding: 8px 18px;
  border-radius: 6px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
#cookie-accept { background: #16a34a; color: white; }
#cookie-accept:hover { background: #15803d; }
#cookie-decline { background: transparent; color: #cbd5e1; border: 1px solid #475569; }
#cookie-decline:hover { background: #334155; }
