/*!
 * Resolve A11y — וידג'ט נגישות (תקן ת"י 5568). עיצוב ברירת מחדל.
 * כל הצבעים דרך משתני --ra-* (override per brand ב-:root של האתר).
 *   :root{ --ra-accent:#c3e85b; --ra-ink:#1a1714; }
 * הפילטרים (ניגודיות/אפור) מוחלים על תוכן העמוד דרך --ra-filter,
 * ולא על ה-body - כדי שהווידג'ט עצמו לעולם לא ייעלם/יסונן.
 */
:root {
  --ra-accent: #c3e85b;          /* מצב פעיל / מיקוד */
  --ra-ink: #1a1714;             /* כפתור הפתיחה / טקסט כהה */
  --ra-surface: #ffffff;         /* רקע הפאנל/אריחים */
  --ra-border: #e4e4e7;
  --ra-muted: #6b7280;
  --ra-text: #242424;
  --ra-radius: 18px;
  --ra-radius-tile: 12px;
  --ra-font: inherit;
  --ra-z: 9500;
  --ra-offset: 2rem;             /* מרחק מהפינה */
}

.ra-widget {
  position: fixed;
  bottom: var(--ra-offset);
  z-index: var(--ra-z);
  font-family: var(--ra-font);
}
.ra-widget.ra-right { right: var(--ra-offset); }
.ra-widget.ra-left  { left: var(--ra-offset); }

/* --- כפתור הפתיחה --- */
.ra-toggle {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--ra-ink);
  color: #fff;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .30);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.ra-toggle:hover { transform: scale(1.07); box-shadow: 0 14px 34px rgba(0, 0, 0, .38); }
.ra-toggle:active { transform: none; }
.ra-toggle:focus-visible { outline: 3px solid var(--ra-accent); outline-offset: 3px; }

/* --- הפאנל --- */
.ra-panel {
  position: absolute;
  bottom: 66px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--ra-surface);
  border: 1px solid var(--ra-border);
  border-radius: var(--ra-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
  padding: 16px;
}
.ra-right .ra-panel { right: 0; transform-origin: bottom right; }
.ra-left  .ra-panel { left: 0;  transform-origin: bottom left; }
.ra-panel[hidden] { display: none; }
.ra-panel:not([hidden]) { animation: ra-in .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes ra-in {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.ra-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ra-title { font-size: 16px; font-weight: 700; color: var(--ra-ink); margin: 0; }
.ra-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--ra-muted); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.ra-close:hover { background: rgba(0, 0, 0, .06); color: var(--ra-ink); }
.ra-close:focus-visible { outline: 2px solid var(--ra-ink); outline-offset: 1px; }

/* --- גריד אריחים --- */
.ra-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ra-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  min-height: 78px; padding: 10px 6px;
  border: 1px solid var(--ra-border); border-radius: var(--ra-radius-tile);
  background: var(--ra-surface); color: var(--ra-text);
  cursor: pointer; text-align: center;
  transition: background .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.ra-tile:hover { background: #fafafa; border-color: #d4d4d8; transform: translateY(-1px); }
.ra-tile:focus-visible { outline: 2px solid var(--ra-ink); outline-offset: 1px; }
.ra-tile__icon { width: 26px; height: 26px; color: var(--ra-ink); }
.ra-tile__icon svg { width: 100%; height: 100%; display: block; }
.ra-tile__label { font-size: 11.5px; line-height: 1.25; font-weight: 500; color: var(--ra-text); }
.ra-tile[aria-pressed="true"] {
  background: var(--ra-accent); border-color: var(--ra-accent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--ra-accent) 55%, transparent);
}
.ra-tile[aria-pressed="true"] .ra-tile__icon,
.ra-tile[aria-pressed="true"] .ra-tile__label { color: var(--ra-ink); }

/* --- פוטר הפאנל --- */
.ra-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ra-border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ra-reset {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--ra-muted);
  font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; padding: 4px 2px;
  transition: color .15s ease;
}
.ra-reset:hover { color: var(--ra-ink); }
.ra-reset:focus-visible { outline: 2px solid var(--ra-ink); outline-offset: 2px; border-radius: 4px; }
.ra-statement { font-size: 12px; color: var(--ra-muted); text-decoration: none; }
.ra-statement:hover { color: var(--ra-ink); text-decoration: underline; }

/* ============================================================
   מצבי תוכן - מוחלים על ילדי ה-body פרט לווידג'ט עצמו
   ============================================================ */
body.ra-filtered > *:not(.ra-widget) { filter: var(--ra-filter, none); }

body.ra-font-larger  { font-size: 112.5%; }
body.ra-font-smaller { font-size: 90%; }

body.ra-readable,
body.ra-readable :where(p, li, a, span, h1, h2, h3, h4, button, input, label, td, th, blockquote) {
  font-family: Arial, "Noto Sans Hebrew", Helvetica, sans-serif !important;
  line-height: 1.9 !important;
  letter-spacing: normal !important;
  word-spacing: .05em !important;
}

body.ra-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  outline: 1px dashed rgba(0, 0, 0, .55);
  outline-offset: 2px;
}

body.ra-bigcursor,
body.ra-bigcursor * {
  cursor: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l7 18 2.6-7.2L22 10 5 2z' fill='%23000' stroke='%23fff' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, auto !important;
}

body.ra-reading::after {
  content: '';
  position: fixed; left: 0; right: 0; top: var(--ra-reading-y, 50vh);
  height: 34px;
  background: rgba(255, 235, 100, .22);
  border-top: 2px solid rgba(214, 178, 0, .8);
  border-bottom: 2px solid rgba(214, 178, 0, .8);
  pointer-events: none; z-index: 9999; transition: top 50ms linear;
}

body.ra-noanim *,
body.ra-noanim *::before,
body.ra-noanim *::after {
  animation-duration: .001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001s !important;
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

@media (max-width: 768px) {
  .ra-widget { --ra-offset: 1rem; }
  .ra-panel { width: 296px; }
}
