/*
  KOL's accessibility menu, as ion's (ion.co.il): a round button in the bottom-left corner opens a panel of choices
  that stay in this browser. Each choice is a class on <html> (a11y.js); the rules below are what they do to the page.
  Outside every other rule's reach on purpose: !important where a page sets the same thing.
*/

/* ---------------------------------------------------------------- skip link */
.a11y-skip {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 2147483000;
  padding: 12px 18px;
  border-radius: 12px;
  background: #1d4ed8;
  color: #fff;
  font: 600 15px Inter, Heebo, system-ui, sans-serif;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.a11y-skip:focus { transform: none; outline: 3px solid #f59e0b; outline-offset: 2px; }

/* ---------------------------------------------------------------- the button and the panel */
.a11y-tab {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 2147482000;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 6px 20px rgba(10, 13, 18, .28);
  cursor: pointer;
}
.a11y-tab:hover { background: #1e40af; }
.a11y-tab svg { display: block; width: 26px; height: 26px; }
.a11y-tab:focus-visible,
.a11y-panel :is(button, a):focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
@media (max-width: 640px) {
  .a11y-tab { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; }
  .a11y-tab svg { width: 22px; height: 22px; }
}
.a11y-panel {
  position: fixed;
  left: 16px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 2147482001;
  box-sizing: border-box;
  width: min(344px, calc(100vw - 32px));
  max-height: calc(100svh - 96px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, .08), 0 24px 60px -12px rgba(10, 13, 18, .38);
  font-family: Inter, Heebo, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  text-align: start;
  direction: rtl;
}
.a11y-panel[hidden] { display: none; }
@media (max-width: 480px) {
  .a11y-panel { left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 80svh; }
}
.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.a11y-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; color: #1d4ed8; }
.a11y-title svg { width: 22px; height: 22px; }
.a11y-close { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 20px; background: #f3f4f6; color: #111827; cursor: pointer; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-item {
  min-height: 72px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  color: #111827;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.a11y-item svg { width: 22px; height: 22px; }
.a11y-item:hover { background: #eef2ff; }
.a11y-item[aria-pressed="true"] { border-color: #1d4ed8; background: #1d4ed8; color: #fff; }
.a11y-item:disabled { color: #6b7280; cursor: default; }
.a11y-size { grid-column: 1 / -1; text-align: center; font-size: 13px; color: #374151; }
.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.a11y-reset { min-height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 20px; background: #fff; color: #111827; font: inherit; font-weight: 600; cursor: pointer; }
.a11y-link { min-height: 40px; display: flex; align-items: center; padding: 0 4px; color: #1d4ed8; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media print { .a11y-tab, .a11y-panel, .a11y-skip { display: none !important; } }

/* ---------------------------------------------------------------- what the choices do */
/* Text size: the pages are written in pixels, so they're magnified as a whole (they scroll; nothing is cut). */
html.kol-a11y-text-s .a11y-zoom { zoom: .9; }
html.kol-a11y-text1 .a11y-zoom { zoom: 1.12; }
html.kol-a11y-text2 .a11y-zoom { zoom: 1.25; }
html.kol-a11y-text3 .a11y-zoom { zoom: 1.5; }

/* Contrast and grey: a filter on the root element (which leaves fixed parts where they are). */
html.kol-a11y-contrast { filter: contrast(1.45) saturate(1.15); }
html.kol-a11y-gray { filter: grayscale(1); }
html.kol-a11y-contrast.kol-a11y-gray { filter: grayscale(1) contrast(1.45); }

/* Links: underlined and marked, whatever their own style. */
html.kol-a11y-links :is(a[href], [role="link"]) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
  background-color: rgba(250, 204, 21, .38) !important;
  outline: 2px solid #ca8a04 !important;
  outline-offset: 1px;
}

/* A readable font. */
html.kol-a11y-font body :not(svg, svg *) { font-family: Arial, Heebo, "Segoe UI", system-ui, sans-serif !important; }

/* No animation or transition (and the films stop, a11y.js). */
html.kol-a11y-still *,
html.kol-a11y-still *::before,
html.kol-a11y-still *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  animation-delay: 0s !important;
  transition-duration: .01ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}

/* A big cursor: a 48 px arrow, black with a white edge. */
html.kol-a11y-cursor,
html.kol-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='M7 4v34l9-8.6L22.5 44l6.5-3-6.4-13.6H34Z' fill='%23111111' stroke='%23ffffff' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 7 4, auto !important;
}

/* Text spacing (WCAG 1.4.12). */
html.kol-a11y-spacing body :not(svg, svg *) { letter-spacing: .06em !important; word-spacing: .16em !important; }
html.kol-a11y-spacing :is(p, li, dd, dt, blockquote, label) { line-height: 1.8 !important; }

/* Where the keyboard is: a thick amber ring on whatever has focus. */
html.kol-a11y-focus :focus-visible {
  outline: 3px solid #f59e0b !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, .3) !important;
}
