/* TapReview · Israeli compliance layer: Hebrew typography, consent banner, accessibility preferences.
   Loaded last on reviewup-style.html and every page in /legal, so it overrides the base styles. */

/* ═══ Hebrew typography (israeli-ui-design-system) ═══
   Hebrew has no capitals and no tall ascenders, so tracking only hurts it: no letter-spacing on Hebrew.
   The Latin wordmark and the star rows keep theirs. Fallback fonts with Hebrew glyphs come before the generic family. */
body.ru {
  --font-display: "Rubik", system-ui, Arial, sans-serif;
  --font-body: "Assistant", system-ui, Arial, sans-serif;
}
body.ru *, body.ru *::before, body.ru *::after { letter-spacing: normal !important; }
body.ru .ru-brand span { letter-spacing: -.02em !important; }
body.ru [class*="stars"] { letter-spacing: 2px !important; }
/* 13px is the smallest readable Hebrew size */
body.ru .gallery-count { font-size: 13px; }
/* Long Hebrew prose reads better with taller lines and a touch of word spacing */
.lg-doc p, .lg-doc li, .lg-doc dd { line-height: 1.7; word-spacing: .05em; }
.lg-doc .lg-draft { margin-block: 0 24px; }

/* Numbers and prices keep their own direction inside Hebrew sentences */
.od-nowrap { unicode-bidi: isolate; }

/* ═══ Footer: business details now have seven rows ═══ */
.ru-footer-biz dd a { color: inherit; }

/* ═══ Business marquee pause button (IS 5568 / WCAG 2.2.2: moving content can be paused) ═══ */
.ru-biz { position: relative; }
.ru-biz-toggle[hidden], [data-a11y-coord][hidden], [data-consent-li][hidden], [data-price-note][hidden] { display: none !important; }
.ru-biz-toggle {
  position: absolute; inset-inline-end: max(16px, calc((100vw - var(--wrap, 1200px)) / 2)); top: 50%; transform: translateY(-50%);
  z-index: 2; width: 40px; height: 40px; box-shadow: 0 2px 8px rgba(10, 10, 11, .12);
}
.ru-biz-toggle .od-icon { fill: currentColor; stroke: none; --od-icon-size: 16px; }
.ru-biz-toggle .ru-ico-play { display: none; }
.ru-biz.is-paused .ru-biz-toggle .ru-ico-pause { display: none; }
.ru-biz.is-paused .ru-biz-toggle .ru-ico-play { display: block; }
.ru-biz-toggle:focus-visible { outline: 3px solid var(--focus, #0a0a0b); outline-offset: 2px; }

/* ═══ Consent banner + preferences dialog (israeli-privacy-shield) ═══
   Accept and reject carry the same weight: same style, same size, side by side. */
.ilc-banner {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  padding: 16px; background: #fff; color: var(--ink, #0a0a0b);
  border-top: 1px solid var(--line, #e4e4e7); box-shadow: 0 -12px 32px rgba(10, 10, 11, .12);
}
.ilc-banner[hidden] { display: none; }
.ilc-banner-in { display: flex; align-items: center; gap: 16px 32px; max-width: var(--wrap, 1200px); margin-inline: auto; }
.ilc-banner-text { flex: 1 1 auto; min-width: 0; }
.ilc-banner-title { margin: 0 0 4px; font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.ilc-banner-text p:last-child { margin: 0; font-size: 15px; line-height: 1.6; }
.ilc-banner-actions, .ilc-dlg-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: none; }
.ilc-banner-actions { width: min(480px, 100%); }
.ilc-btn {
  min-height: 48px; padding: 8px 12px; border: 1.5px solid var(--ink, #0a0a0b); border-radius: 12px;
  background: #fff; color: var(--ink, #0a0a0b); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}
@media (hover: hover) { .ilc-btn:hover { background: var(--ink, #0a0a0b); color: #fff; } }
.ilc-btn:focus-visible { outline: 3px solid var(--focus, #0a0a0b); outline-offset: 2px; }
@media (max-width: 760px) {
  .ilc-banner { bottom: var(--mobile-bar-h, 0px); padding: 14px 16px; }
  body.lg .ilc-banner { bottom: 0; }
  .ilc-banner-in { flex-direction: column; align-items: stretch; gap: 12px; }
  .ilc-banner-actions { width: 100%; }
}

.ilc-dlg {
  width: min(560px, 100% - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px;
  background: #fff; color: var(--ink, #0a0a0b); box-shadow: 0 24px 64px rgba(10, 10, 11, .25); overflow: auto;
}
.ilc-dlg::backdrop { background: rgba(10, 10, 11, .55); }
.ilc-dlg-in { position: relative; display: grid; gap: 16px; padding: 32px; }
.ilc-dlg-close { position: absolute; top: 16px; inset-inline-end: 16px; }
.ilc-dlg h2 { margin: 0; padding-inline-end: 48px; font-size: 24px; }
.ilc-dlg-lead { margin: 0; color: var(--ink-2, #52525b); font-size: 15px; line-height: 1.6; }
.ilc-cats { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; }
.ilc-cat { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; padding: 14px 16px; border: 1px solid var(--line, #e4e4e7); border-radius: 14px; }
.ilc-cat input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink, #0a0a0b); }
.ilc-cat label { font-weight: 800; font-size: 16px; }
.ilc-cat-d { grid-column: 2; margin: 4px 0 0; color: var(--ink-2, #52525b); font-size: 14px; line-height: 1.55; }
.ilc-dlg-foot { margin: 0; font-size: 14px; }
@media (max-width: 480px) {
  .ilc-dlg-in { padding: 24px 20px; }
  .ilc-dlg-actions { grid-template-columns: minmax(0, 1fr); }
}

/* ═══ Accessibility preferences (wcag-accessibility-widget) ═══
   Physical left side, mirroring the WhatsApp button on the right. */
.a11y-btn {
  position: fixed; left: 24px; bottom: 24px; z-index: 36;
  display: grid; place-items: center; width: 52px; height: 52px; border: 2px solid #fff; border-radius: 50%;
  background: var(--ink, #0a0a0b); color: #fff; cursor: pointer; box-shadow: 0 8px 24px rgba(10, 10, 11, .22);
}
.a11y-btn.is-active { box-shadow: 0 0 0 3px var(--star, #fbbc04), 0 8px 24px rgba(10, 10, 11, .22); }
.a11y-btn:focus-visible { outline: 3px solid #0a0a0b; outline-offset: 5px; }
.a11y-panel {
  position: fixed; left: 24px; bottom: 88px; z-index: 61;
  width: min(340px, calc(100vw - 32px)); max-height: calc(100dvh - 120px); overflow: auto;
  padding: 20px; border: 1px solid var(--line, #e4e4e7); border-radius: 20px;
  background: #fff; color: #0a0a0b; box-shadow: 0 24px 64px rgba(10, 10, 11, .25);
  font-family: var(--font-body, Arial, sans-serif); font-size: 16px; line-height: 1.5;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.a11y-panel h2 { margin: 0; font-size: 20px; }
.a11y-group { margin-bottom: 12px; }
.a11y-group-title { margin: 0 0 8px; font-weight: 700; font-size: 15px; }
.a11y-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.a11y-size {
  min-height: 44px; padding: 6px 8px; border: 1.5px solid #a1a1aa; border-radius: 10px;
  background: #fff; color: #0a0a0b; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}
.a11y-size[aria-pressed="true"] { border-color: #0a0a0b; background: #0a0a0b; color: #fff; }
.a11y-switches { display: grid; gap: 2px; margin: 0 0 12px; padding: 0; list-style: none; }
.a11y-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px;
  padding: 6px 4px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
@media (hover: hover) { .a11y-switch:hover { background: #f4f4f5; } }
/* px sizes on purpose: the size modes scale the page, the offsets must stay in step with the track.
   Mirrored for RTL like the native switches: off = thumb on the right, on = thumb on the left. */
.a11y-track { position: relative; flex: none; width: 44px; height: 24px; border-radius: 999px; background: #71717a; }
.a11y-thumb {
  position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transform: translateX(23px); transition: transform 150ms ease-out;
}
.a11y-switch[aria-checked="true"] .a11y-track { background: #0a0a0b; }
.a11y-switch[aria-checked="true"] .a11y-thumb { transform: translateX(3px); }
.a11y-panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line, #e4e4e7); }
.a11y-reset { min-height: 44px; padding: 6px 14px; border: 1.5px solid #0a0a0b; border-radius: 10px; background: #fff; color: #0a0a0b; font: inherit; font-weight: 700; cursor: pointer; }
.a11y-note { margin: 10px 0 0; color: #52525b; font-size: 14px; }
.a11y-panel button:focus-visible, .a11y-panel a:focus-visible { outline: 3px solid #0a0a0b; outline-offset: 2px; }
@media (max-width: 760px) {
  .a11y-btn { left: 16px; bottom: calc(var(--mobile-bar-h, 0px) + 18px); width: 52px; height: 52px; }
  body.has-stickybuy .a11y-btn { bottom: calc(var(--mobile-bar-h, 0px) + 84px); }
  body.lg .a11y-btn { bottom: 16px; }
  .a11y-panel { left: 16px; bottom: calc(var(--mobile-bar-h, 0px) + 80px); max-height: calc(100dvh - var(--mobile-bar-h, 0px) - 120px); }
  body.lg .a11y-panel { bottom: 80px; }
}
@media print { .a11y-btn, .a11y-panel, .ilc-banner { display: none !important; } }

/* While the consent banner is open, the floating buttons move up so the banner never hides them */
html.ilc-banner-on .a11y-btn, html.ilc-banner-on .ru-wa-float { bottom: calc(var(--ilc-banner-h, 0px) + 16px); }
@media (max-width: 760px) {
  html.ilc-banner-on .a11y-btn, html.ilc-banner-on .ru-wa-float { bottom: calc(var(--mobile-bar-h, 0px) + var(--ilc-banner-h, 0px) + 12px); }
  html.ilc-banner-on body.lg .a11y-btn { bottom: calc(var(--ilc-banner-h, 0px) + 12px); }
}

/* ─── Mode: keyboard focus highlight ─── */
html { --a11y-mark: #c00000; }
html.a11y-keyboard *:focus, html.a11y-keyboard *:focus-visible { outline: 3px solid var(--a11y-mark) !important; outline-offset: 3px !important; }

/* ─── Mode: stop animations (and the OS setting is honoured by the base styles already) ─── */
html.a11y-no-anim *, html.a11y-no-anim *::before, html.a11y-no-anim *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important;
  transition-duration: .001ms !important; transition-delay: 0s !important;
}
html.a11y-no-anim { scroll-behavior: auto !important; }
html.a11y-no-anim .ru-biz-track { animation: none !important; }

/* ─── Mode: display size. zoom scales px-based layouts too, the way browser zoom does ─── */
html.a11y-font-lg { zoom: 1.2; }
html.a11y-font-xl { zoom: 1.4; }

/* ─── Mode: high contrast. Recolours; never uses filter (it would break every fixed element) ─── */
html.a11y-contrast { --a11y-mark: #ff5252; background-color: #000 !important; }
html.a11y-contrast body,
html.a11y-contrast body *:not(img):not(video):not(picture):not(svg):not(path):not(rect):not(circle):not(polygon):not(i) {
  background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important;
  text-shadow: none !important; box-shadow: none !important;
}
html.a11y-contrast a, html.a11y-contrast a * { color: #ff0 !important; }
html.a11y-contrast input, html.a11y-contrast textarea, html.a11y-contrast select, html.a11y-contrast button { border: 1px solid #fff !important; }
html.a11y-contrast ::placeholder { color: #d9d9d9 !important; opacity: 1; }
html.a11y-contrast .a11y-track { background-color: #000 !important; box-shadow: 0 0 0 1px #fff !important; }
html.a11y-contrast .a11y-thumb { background-color: #fff !important; }
html.a11y-contrast .a11y-switch[aria-checked="true"] .a11y-track { background-color: #ff0 !important; }
html.a11y-contrast .a11y-switch[aria-checked="true"] .a11y-thumb { background-color: #000 !important; }
html.a11y-contrast .a11y-size[aria-pressed="true"] { background-color: #ff0 !important; color: #000 !important; }

/* ─── Mode: readable font (simple selectors only inside :not, so older engines keep the rule) ─── */
html.a11y-readable body *:not(i):not(svg):not(code):not(pre):not([class*="icon"]) { font-family: Arial, Helvetica, sans-serif !important; }

/* ─── Mode: mark headings / links ─── */
html.a11y-headings h1, html.a11y-headings h2, html.a11y-headings h3, html.a11y-headings h4 { outline: 2px dashed var(--a11y-mark) !important; outline-offset: 6px; }
html.a11y-links a, html.a11y-links button:not([role="switch"]):not(#a11y-btn) { outline: 2px solid #2563eb !important; text-decoration: underline !important; }
