/* Accessibility menu (a11y.js). Shared by habayit-ks and the old pages on business-community-ks; the same file sits in both.
   The page options are classes on <html>: a11y-z1..z3 (text size), a11y-contrast, a11y-mono, a11y-links, a11y-still. */

/* ---- text size: zoom every top-level block except the menu itself, so the menu keeps its size ---- */
html.a11y-z1 body > :not(.a11y-root){zoom:1.15}
html.a11y-z2 body > :not(.a11y-root){zoom:1.3}
html.a11y-z3 body > :not(.a11y-root){zoom:1.5}

/* ---- grayscale: on the root element, where a filter does not break fixed or sticky positioning ---- */
html.a11y-mono{filter:grayscale(1)}

/* ---- high contrast: black on white. Covers the tokens of both sites (unused ones are harmless). ---- */
html.a11y-contrast{
  color-scheme:light;
  /* habayit-ks */
  --paper:#FFFFFF!important; --card:#FFFFFF!important; --ink:#000000!important; --muted:#1A1A1A!important; --line:#000000!important;
  --sun:#FEC93B!important; --sun-soft:#FFFFFF!important; --on-sun:#000000!important; --date-red:#8B1A00!important;
  --tomato:#8B1A00!important; --tomato-soft:#FFFFFF!important; --sky:#003A75!important; --sky-soft:#FFFFFF!important;
  --plum:#4F1A5A!important; --plum-soft:#FFFFFF!important; --rasp:#6E0D33!important; --rasp-soft:#FFFFFF!important;
  --on-accent:#FFFFFF!important; --ok:#0B5A2E!important; --ok-soft:#FFFFFF!important;
  --bar:#000000!important; --bar-ink:#FFFFFF!important; --bar-soft:#222222!important; --scrim:rgba(0,0,0,.7)!important;
  /* old pages */
  --bg:#FFFFFF!important; --surface:#FFFFFF!important; --surface-2:#FFFFFF!important; --faint:#1A1A1A!important;
  --accent:#004F3A!important; --accent-ink:#004F3A!important; --accent-soft:#FFFFFF!important;
  --warm:#6B4000!important; --warm-soft:#FFFFFF!important; --coral:#8B1A00!important; --coral-ink:#8B1A00!important; --sage:#FFFFFF!important;
}
html.a11y-contrast body{background:#FFFFFF!important;color:#000000!important}
html.a11y-contrast a:not(.a11y-link){text-decoration:underline!important;text-underline-offset:3px}
html.a11y-contrast input,html.a11y-contrast select,html.a11y-contrast textarea{background:#FFFFFF!important;color:#000000!important;border-color:#000000!important}
html.a11y-contrast :focus-visible{outline:3px solid #000000!important;outline-offset:3px!important;box-shadow:0 0 0 6px #FEC93B!important}
/* old pages: the submit button keeps dark text in dark mode, which would sit on the darkened accent */
html.a11y-contrast .submit{color:#FFFFFF!important}

/* ---- highlight links ---- */
html.a11y-links a{text-decoration:underline!important;text-decoration-thickness:2px!important;text-underline-offset:3px!important;
  background-color:#FFF3A0!important;color:#000000!important;outline:2px solid #000000;outline-offset:1px}

/* ---- stop animations ---- */
html.a11y-still *,html.a11y-still *::before,html.a11y-still *::after{
  animation:none!important;transition:none!important;scroll-behavior:auto!important}

/* ---- the menu itself: fixed light colors so it reads the same on every page and theme ---- */
.a11y-root{position:fixed;left:calc(16px + env(safe-area-inset-left,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px));
  z-index:45;direction:rtl;font:600 16px/1.3 "Rubik","Assistant","Arial Hebrew","Noto Sans Hebrew",Arial,sans-serif;
  display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.a11y-btn{width:54px;height:54px;border-radius:50%;border:3px solid #FFFFFF;background:#1F3A93;color:#FFFFFF;cursor:pointer;
  display:flex;align-items:center;justify-content:center;padding:0;box-shadow:0 4px 14px rgba(0,0,0,.3)}
.a11y-btn:hover{background:#162C73}
.a11y-root button:focus-visible,.a11y-root a:focus-visible{outline:3px solid #000000;outline-offset:2px;box-shadow:0 0 0 6px #FEC93B}
.a11y-panel{width:min(300px,calc(100vw - 32px));max-height:calc(100vh - 110px);overflow:auto;background:#FFFFFF;color:#000000;
  border:2px solid #000000;border-radius:14px;padding:12px;box-shadow:0 10px 30px rgba(0,0,0,.3);display:flex;flex-direction:column;gap:8px}
.a11y-panel[hidden]{display:none}
.a11y-head{display:flex;align-items:center;justify-content:space-between}
.a11y-title{font-size:19px;font-weight:800}
.a11y-close{width:44px;height:44px;border:0;background:transparent;color:#000000;font-size:20px;border-radius:10px;cursor:pointer}
.a11y-close:hover{background:#EEEEEE}
.a11y-opt{min-height:44px;width:100%;border:2px solid #000000;border-radius:10px;background:#FFFFFF;color:#000000;
  font:inherit;text-align:start;padding:8px 12px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}
.a11y-opt:hover{background:#F2F2F2}
.a11y-opt:disabled{opacity:.45;cursor:default}
.a11y-toggle::after{content:"";width:22px;height:22px;flex:none;border:2px solid #000000;border-radius:6px;background:#FFFFFF}
.a11y-toggle[aria-pressed="true"]{background:#1F3A93;color:#FFFFFF;border-color:#1F3A93}
.a11y-toggle[aria-pressed="true"]::after{content:"\2713";background:#FFFFFF;color:#1F3A93;border-color:#FFFFFF;
  font-weight:900;font-size:17px;line-height:18px;text-align:center}
.a11y-size{display:flex;align-items:center;gap:6px}
.a11y-size .a11y-step{flex:1;justify-content:center;text-align:center;padding:8px 6px}
.a11y-readout{min-width:46px;text-align:center;font-weight:800}
.a11y-reset{justify-content:center}
.a11y-link{color:#1F3A93;text-decoration:underline;text-align:center;padding:6px;font-weight:700}
.a11y-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media print{.a11y-root{display:none}}
/* phones: room under the last line of the page, so the button never sits on top of it */
@media (max-width:640px){body::after{content:"";display:block;height:82px}}
