/* Native accessibility panel (כלי נגישות) — self-hosted supplement to the code-level
   IS 5568 work. Loaded on the storefront layouts and injected into mirror pages.
   Brand language = the new homepage (home.css): navy #15303e, cream #f7f2ee, terracotta
   #b76a50, Noto Sans Hebrew, 1.5px navy outlines, pill / 10px radii. */

.a11yp-float, .a11yp-panel {
  --a11yp-navy: #15303e; --a11yp-cream: #f7f2ee; --a11yp-terra: #b76a50; --a11yp-teal: #0f5568;
}

/* floating trigger — created by a11y-panel.js only when the page has no [data-a11yp-trigger] */
.a11yp-float {
  position: fixed; top: 50%; left: 0; transform: translateY(-50%); z-index: 2147483000;
  width: 48px; height: 52px; padding: 0 4px 0 0; border: 0; border-radius: 0 26px 26px 0;
  cursor: pointer; background: var(--a11yp-navy); color: var(--a11yp-cream);
  /* cream contour: keeps the tab visible on navy blocks (the fill already shows on cream) */
  box-shadow: 0 0 0 1px var(--a11yp-cream), 0 4px 14px rgba(21,48,62,.28); display: grid; place-items: center;
  transition: background .3s, width .3s;
}
.a11yp-float svg { width: 26px; height: 26px; display: block; }
.a11yp-float:hover { background: var(--a11yp-terra); width: 54px; }
.a11yp-float:focus-visible { outline: 2px solid var(--a11yp-terra); outline-offset: 3px; }

/* panel */
.a11yp-panel {
  position: fixed; top: 0; left: 0; height: 100%; width: 340px; max-width: 92vw;
  z-index: 2147483001; background: var(--a11yp-cream); color: var(--a11yp-navy); direction: rtl;
  box-shadow: 6px 0 40px rgba(21,48,62,.28); display: none; flex-direction: column;
  font-family: 'Noto Sans Hebrew', Heebo, Arial, system-ui, sans-serif; font-size: 15px; line-height: 1.4;
}
.a11yp-panel.open { display: flex; }
.a11yp-panel *, .a11yp-panel *::before, .a11yp-panel *::after { box-sizing: border-box; }
.a11yp-head {
  background: radial-gradient(ellipse 70% 120% at 85% 0%, #25495c 0%, rgba(37,73,92,.45) 45%, rgba(21,48,62,0) 80%), var(--a11yp-navy);
  color: var(--a11yp-cream); padding: 26px 22px 22px; flex: 0 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.a11yp-head > span {
  font-size: 22px; font-weight: 700; line-height: 1.15; padding-bottom: 12px;
  background: linear-gradient(var(--a11yp-terra), var(--a11yp-terra)) 100% 100% / 34% 3px no-repeat;
}
[dir="ltr"] .a11yp-head > span, .a11yp-panel[style*="ltr"] .a11yp-head > span { background-position: 0 100%; }
.a11yp-close {
  flex: none; width: 40px; height: 40px; border: 1.5px solid rgba(247,242,238,.5); border-radius: 50%;
  background: transparent; color: var(--a11yp-cream); font-size: 15px; cursor: pointer;
  display: grid; place-items: center; transition: background .3s, color .3s;
}
.a11yp-close:hover { background: var(--a11yp-cream); color: var(--a11yp-navy); }
.a11yp-close:focus-visible { outline: 2px solid var(--a11yp-terra); outline-offset: 2px; }
.a11yp-body { overflow-y: auto; padding: 22px; flex: 1 1 auto; }
.a11yp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a11yp-btn {
  border: 1.5px solid var(--a11yp-navy); background: transparent; color: var(--a11yp-navy); border-radius: 10px;
  padding: 14px 8px 12px; font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-height: 84px; justify-content: center; text-align: center; transition: background .2s, color .2s;
}
.a11yp-btn .ic { font-size: 20px; font-weight: 700; line-height: 1; display: grid; place-items: center; height: 24px; }
.a11yp-btn .ic svg { width: 24px; height: 24px; display: block; }
.a11yp-btn:hover { background: rgba(21,48,62,.06); }
.a11yp-btn[aria-pressed="true"] { background: var(--a11yp-navy); border-color: var(--a11yp-navy); color: var(--a11yp-cream); }
.a11yp-btn:focus-visible { outline: 2px solid var(--a11yp-terra); outline-offset: 2px; }
.a11yp-row { grid-column: 1 / -1; padding: 4px 0 14px; margin-bottom: 4px; border-bottom: 1px solid rgba(21,48,62,.2); }
.a11yp-row > div:first-child { font-size: 15px; }
.a11yp-foot { padding: 16px 22px 22px; border-top: 2px solid var(--a11yp-navy); flex: 0 0 auto; }
.a11yp-foot a { color: var(--a11yp-terra); font-weight: 700; font-size: 14px; text-decoration: underline; }
.a11yp-reset {
  width: 100%; margin-top: 14px; min-height: 48px; border: 1.5px solid var(--a11yp-navy); color: var(--a11yp-navy);
  background: transparent; border-radius: 30px; padding: 0 20px; font-weight: 700; font-family: inherit;
  cursor: pointer; font-size: 15px; transition: background .3s, color .3s;
}
.a11yp-reset:hover { background: var(--a11yp-navy); color: var(--a11yp-cream); }
.a11yp-steps { display: flex; align-items: center; gap: 14px; justify-content: center; }
.a11yp-steps button {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--a11yp-navy); background: transparent;
  font-size: 18px; font-weight: 700; cursor: pointer; color: var(--a11yp-navy); font-family: inherit;
  transition: background .3s, color .3s;
}
.a11yp-steps button:hover { background: var(--a11yp-navy); color: var(--a11yp-cream); }
.a11yp-steps .val { min-width: 56px; text-align: center; font-weight: 700; font-size: 17px; }
@media (prefers-reduced-motion: reduce) { .a11yp-float, .a11yp-btn, .a11yp-reset, .a11yp-close, .a11yp-steps button { transition: none; } }

/* ============ effect classes (html[data-a11yp-*]) ============ */
/* visual filters (grayscale / contrast / inverted dark) are composed by JS into --a11yp-filter
   and applied per direct body child, so position:fixed/sticky UI keeps working */
html[data-a11yp-filter] body > *:not(.a11yp-panel):not(.a11yp-float):not(.a11yp-guide) {
  filter: var(--a11yp-filter);
}
/* inverted-dark mode: counter-invert media so photos stay natural */
html[data-a11yp-invert] img, html[data-a11yp-invert] video, html[data-a11yp-invert] iframe,
html[data-a11yp-invert] [style*="background-image"] {
  filter: invert(1) hue-rotate(180deg);
}
/* link highlighting */
html[data-a11yp-links] a, html[data-a11yp-links] a * {
  text-decoration: underline !important; color: #0b0b8f !important;
  background-color: #ffec9e !important; -webkit-text-fill-color: #0b0b8f !important;
}
/* readable font */
html[data-a11yp-font] body, html[data-a11yp-font] body * {
  font-family: Arial, "Segoe UI", Tahoma, sans-serif !important;
  letter-spacing: 0.02em !important;
}
/* stop animations/transitions/smooth-scroll */
html[data-a11yp-motion] *, html[data-a11yp-motion] *::before, html[data-a11yp-motion] *::after {
  animation-play-state: paused !important; animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important; scroll-behavior: auto !important;
}
/* reading guide bar (follows the pointer) */
.a11yp-guide {
  position: fixed; left: 0; width: 100%; height: 0; z-index: 2147483002; pointer-events: none;
  border-top: 4px solid #f2b21b; box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.35);
}
