/* Floating actions and the accessibility panel.
   Markup is injected by js/a11y.js; this is only its appearance. */

/* inset-inline-END, so in this RTL layout the buttons sit bottom-left.
   inline-start is the right edge here, which is exactly where every Hebrew
   heading begins — the buttons were landing on top of the text. */
.fabs{position:fixed;z-index:90;
  inset-inline-end:max(14px,env(safe-area-inset-right,0px));
  bottom:calc(14px + env(safe-area-inset-bottom,0px));
  display:flex;flex-direction:column;gap:9px}
.fab{width:50px;height:50px;border-radius:50%;border:1px solid var(--line);
  background:var(--surface);color:var(--ink-soft);box-shadow:var(--shadow-2);
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  text-decoration:none;transition:transform .14s ease,background .14s ease}
.fab svg{width:25px;height:25px}
.fab:hover{transform:translateY(-2px)}
/* WhatsApp's darker brand green: #25D366 with a white glyph is only
   1.98:1, under the 3:1 that non-text contrast requires. */
.fab-wa{background:#128C7E;border-color:#128C7E;color:#fff;order:3}
.fab-wa:hover{background:#0E6F63}
.fab-a11y{background:var(--accent);border-color:var(--accent);color:var(--on-accent);order:2}
.fab-a11y:hover{background:var(--accent-deep)}
.fab-top{order:1}

/* The author rule below sets display:grid, which beats the browser default
   [hidden]{display:none} on specificity — without this the panel is open on
   every page load. This is required, not belt-and-braces. */
.a11y-panel[hidden]{display:none}
.a11y-panel{position:fixed;z-index:95;
  inset-inline-end:max(14px,env(safe-area-inset-right,0px));
  bottom:calc(78px + env(safe-area-inset-bottom,0px));
  width:min(290px,calc(100vw - 28px));
  background:var(--surface);border:1px solid var(--line);border-radius:6px;
  box-shadow:var(--shadow-3);padding:14px;display:grid;gap:7px}
.a11y-head{display:flex;align-items:center;gap:10px;margin-bottom:3px}
.a11y-head h2{font-size:15px;font-weight:700}
.a11y-x{margin-inline-start:auto;background:none;border:0;cursor:pointer;
  color:var(--ink-faint);font-size:15px;width:30px;height:30px;border-radius:4px}
.a11y-x:hover{background:var(--surface-2);color:var(--ink)}

.a11y-row{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:500}
.a11y-step{margin-inline-start:auto;display:flex;align-items:center;gap:2px;
  border:1px solid var(--line);border-radius:4px;overflow:hidden}
.a11y-step button{width:34px;height:34px;border:0;background:transparent;cursor:pointer;
  font-size:17px;color:var(--ink-soft)}
.a11y-step button:hover{background:var(--surface-2);color:var(--ink)}
.a11y-step b{min-width:50px;text-align:center;font-size:13px;
  font-variant-numeric:tabular-nums}

.a11y-opt{text-align:start;padding:10px 12px;border:1px solid var(--line);
  border-radius:4px;background:var(--surface);cursor:pointer;font-size:14px;
  font-weight:500;min-height:42px}
.a11y-opt:hover{border-color:var(--line-strong)}
.a11y-opt[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);
  color:var(--on-accent);font-weight:600}
.a11y-reset{padding:9px;border:0;background:var(--surface-2);border-radius:4px;
  cursor:pointer;font-size:13.5px;color:var(--ink-soft);min-height:38px}
.a11y-reset:hover{background:var(--surface-3);color:var(--ink)}
.a11y-link{text-align:center;font-size:13px;color:var(--accent-ink);padding-top:3px}

/* ---- the modes themselves ---- */
/* Raised contrast: push text to the extremes and firm up every border,
   rather than inverting, which breaks product photography. */
.a11y-contrast{
  --ink:#000; --ink-soft:#1A1A1A; --ink-faint:#333;
  --bg:#FFF; --surface:#FFF; --surface-2:#F0F0F0; --surface-3:#E4E4E4;
  --line:#000; --line-strong:#000;
  --accent:#005F6B; --accent-deep:#00454E; --accent-ink:#00343B; --accent-soft:#DFF2F4;
}
.a11y-contrast img{filter:contrast(1.08)}

.a11y-links a{text-decoration:underline!important;text-underline-offset:2px}
.a11y-links a:focus-visible{outline:3px solid var(--accent)}

.a11y-nomotion *,.a11y-nomotion *::before,.a11y-nomotion *::after{
  animation-duration:.001ms!important;animation-iteration-count:1!important;
  transition-duration:.001ms!important;scroll-behavior:auto!important}

@media (max-width:620px){
  .fab{width:46px;height:46px}
  .fab svg{width:23px;height:23px}
}
@media print{.fabs,.a11y-panel{display:none}}
