/* Fiva's own accessibility menu (2.11). The styles of public/a11y.js; landing/a11y.css
   is a byte-for-byte copy (lib/a11y-menu.test.ts checks). Everything is prefixed a11y-,
   and the modes only add classes to <html>, so nothing here touches a page until asked. */

.a11y-ui {
  --a11y-brass: #8F5A05;
  --a11y-ink: #1C170E;
  --a11y-muted: #5F5441;
  --a11y-surface: #FFFDF8;
  --a11y-soft: #F5EEDF;
  --a11y-line: rgba(40, 30, 15, .16);
  font-family: "Heebo", "Rubik", "Assistant", "Segoe UI", "Arial Hebrew", Arial, sans-serif;
}

/* The button: beside the WhatsApp button on the sales site, on the side of the
   booking page (its sheets keep their own buttons at the bottom). */
.a11y-btn {
  position: fixed;
  z-index: 2147483000;
  right: 16px;
  bottom: 16px;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--a11y-surface);
  background: var(--a11y-brass);
  color: var(--a11y-surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(60, 40, 10, .30);
}
.a11y-ui[data-side="left"] .a11y-btn { right: auto; left: 16px; }
.a11y-ui[data-place="side"] .a11y-btn { bottom: auto; top: 42%; width: 46px; height: 46px; right: 8px; }
.a11y-ui[data-place="side"][data-side="left"] .a11y-btn { right: auto; left: 8px; }
.a11y-btn svg { width: 28px; height: 28px; fill: currentColor; }

.a11y-panel {
  position: fixed;
  z-index: 2147483001;
  right: 16px;
  bottom: 80px;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100vh - 100px);
  overflow: auto;
  box-sizing: border-box;
  padding: 14px;
  background: var(--a11y-surface);
  color: var(--a11y-ink);
  border: 1px solid rgba(143, 90, 5, .40);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(60, 40, 10, .25);
  text-align: start;
}
.a11y-ui[data-side="left"] .a11y-panel { right: auto; left: 16px; }
.a11y-ui[data-place="side"] .a11y-panel { bottom: auto; top: 50%; transform: translateY(-50%); }
.a11y-panel[hidden] { display: none; }

.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; }
.a11y-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--a11y-ink); }
.a11y-x {
  width: 44px;
  height: 44px;
  margin: -8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--a11y-ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-grid button {
  min-height: 66px;
  padding: 8px 6px;
  border: 1px solid var(--a11y-line);
  border-radius: 12px;
  background: var(--a11y-soft);
  color: var(--a11y-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.a11y-grid button:hover { border-color: var(--a11y-brass); }
.a11y-grid button[aria-pressed="true"] { background: var(--a11y-brass); border-color: var(--a11y-brass); color: var(--a11y-surface); }
.a11y-grid svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.a11y-level { margin: 10px 2px 0; font-size: 14px; color: var(--a11y-muted); }
/* Empty until the size changes: no gap under the buttons, and still in the page for the screen reader. */
.a11y-ui .a11y-level:empty { margin: 0; }
.a11y-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.a11y-foot a { padding: 12px 2px; color: var(--a11y-brass); font-size: 14px; font-weight: 700; text-decoration: underline; }
.a11y-foot button {
  padding: 12px 4px;
  border: 0;
  background: none;
  color: var(--a11y-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.a11y-ui button:focus-visible, .a11y-ui a:focus-visible { outline: 3px solid var(--a11y-ink); outline-offset: 2px; }

/* ---- what the switches do ---- */

/* Text size. The sales site is set in rem, but its body is 18px: in rem it grows with the root. */
html.a11y-scaled body { font-size: 1.125rem; }
html.a11y-t1 { font-size: 112.5%; }
html.a11y-t2 { font-size: 125%; }
html.a11y-t3 { font-size: 140%; }
/* The booking page (react-native-web) is set in px: the whole app grows, and reflows to the width. */
html.a11y-z1 #root { zoom: 1.125; }
html.a11y-z2 #root { zoom: 1.25; }
html.a11y-z3 #root { zoom: 1.4; }

/* Contrast, inverted colours and greys are one filter on <html> (set by the script, so they combine).
   On the root element a filter keeps fixed elements fixed. Pictures are turned back, so they look right. */
html.a11y-negative img,
html.a11y-negative video,
html.a11y-negative picture,
html.a11y-negative [style*="background-image"],
html.a11y-negative .wa-float { filter: invert(1) hue-rotate(180deg); }

html.a11y-links a:not(.a11y-ui *),
html.a11y-links [role="link"]:not(.a11y-ui *) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  outline: 2px solid currentColor !important;
  outline-offset: 2px;
  border-radius: 4px;
}

/* A plain face. "ionicons" last: the booking page's icons are glyphs of that font, and a
   glyph Arial does not have falls through to it, so the icons stay icons. */
html.a11y-font body *:not(svg):not(svg *) {
  font-family: Arial, "Arial Hebrew", "Noto Sans Hebrew", Tahoma, sans-serif, ionicons !important;
  letter-spacing: normal !important;
}

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