/* ═══════════════════════════════════════════════════════════════════════
   VEYA — תפריט נגישות (הגדרות תצוגה)
   ═══════════════════════════════════════════════════════════════════════

   קובץ אחד לכל המשטחים: האפליקציה (app.html), דף המוזמן, האתר והדפים
   המשפטיים. ההגדרות נשמרות כ-data-a11y-* על <html> (veya-a11y.js),
   והכללים כאן מגיבים להן. אין כאן תחליף לנגישות שבקוד עצמו (מקלדת,
   קורא מסך, תוויות) — זו שכבת העדפות אישיות מעליה.

   למה ``zoom`` ולא font-size: הממשק כתוב ב-px (מערכת העיצוב: "יחידה
   אחת: px"), ולכן הגדלת גופן הבסיס לא הייתה מגדילה כלום. zoom מגדיל
   הכול יחד, כמו הגדלה בדפדפן — טקסט, פקדים ואזורי מגע — בלי לשבור
   פריסה.
   ═══════════════════════════════════════════════════════════════════════ */

/* ---- גודל טקסט ---- */
html[data-a11y-text='1'] {
  --va11y-zoom: 1.15;
}
html[data-a11y-text='2'] {
  --va11y-zoom: 1.3;
}
html[data-a11y-text] body {
  zoom: var(--va11y-zoom);
}

/* ---- ניגודיות גבוהה ----
   משטחים בהירים: טקסט משני כהה יותר וקווים ברורים יותר. אותם שמות
   טוקנים באפליקציה ובאתר, ולכן כלל אחד מכסה את שניהם. */
html[data-a11y-contrast] {
  --body: #2b2620;
  --muted: #3d372d;
  --faint: #554d40;
  --line: #9a8d71;
  --line-2: #b2a588;
  --gold-deep: #66511d;
  --gold-on-tint: #66511d;
  --green: #1d6a3f;
  --green-on-tint: #1d6a3f;
  --error: #8a3a35;
  --error-on-tint: #8a3a35;
}
/* משטחים כהים (התחברות, דף המוזמן, באנר ה-Cookies, אזורים כהים באתר)
   מגדירים את הטוקנים מחדש מקומית — שם הכיוון הפוך: טקסט בהיר יותר. */
html[data-a11y-contrast] :is(.auth-marketing, .auth-panel, .verify-page, .confirm-card, .hub-sheet,
  .onboard-card, .cookie-banner, .join-card, .on-dark, .site-footer) {
  --body: #f1ebde;
  --muted: #e2d9c7;
  --faint: #cfc5b1;
  --line: #6e6553;
  --line-2: #7d735f;
  --gold-deep: #f0d98f;
}
html[data-a11y-contrast] ::placeholder {
  color: #5a5245;
  opacity: 1;
}
html[data-a11y-contrast] :is(input, select, textarea) {
  border-color: #8a7d62;
}

/* ---- הדגשת קישורים ---- */
html[data-a11y-links] a:not(.btn):not(.skip-link) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
}
html[data-a11y-links] a.btn {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ---- גופן פשוט: בלי סריף מעוטר ובלי נטוי ---- */
html[data-a11y-font] body,
html[data-a11y-font] body *:not(svg):not(svg *) {
  font-family: 'Heebo', 'Assistant', system-ui, -apple-system, Arial, sans-serif !important;
  font-style: normal !important;
}

/* ---- עצירת אנימציות ----
   כמו prefers-reduced-motion, אבל לפי בחירה כאן. תוכן שמחכה ל"חשיפה
   בגלילה" באתר מוצג מיד — אסור שמידע יחכה לאנימציה שלא תרוץ. */
html[data-a11y-motion] *,
html[data-a11y-motion] *::before,
html[data-a11y-motion] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  animation-delay: 0ms !important;
  transition-duration: 0.01ms !important;
  transition-delay: 0ms !important;
  scroll-behavior: auto !important;
}
html[data-a11y-motion] :is(.reveal, .v-reveal) {
  opacity: 1 !important;
  transform: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   הכפתורים שפותחים את התפריט (באתר ובדפים המשפטיים; באפליקציה —
   App.css) והחלון עצמו.
   ═══════════════════════════════════════════════════════════════════════ */
.va11y-icon {
  display: block;
  flex-shrink: 0;
}
/* ---- כפתור הפתיחה באתר ובדפים המשפטיים ----
   רכיב אחד, קבוע לאורך כל הגלילה (veya-a11y.js יוצר אותו). קטן ושקט:
   גלולה כהה בצבעי הכותרת, אייקון זהב + "נגישות". יושב בפינה
   התחתונה בצד **הסוף** (שמאל ב-RTL) — הצד הנגדי לכפתור ה-CTA הצף של
   דף הבית (שיושב בצד ההתחלה), כך שהם לא נפגשים לעולם.
   באנר ה-Cookies: כל עוד הוא מוצג, הכפתור עולה מעליו (--va11y-lift). */
.va11y-fab {
  position: fixed;
  z-index: 90;
  inset-inline-end: clamp(12px, 2vw, 24px);
  bottom: calc(clamp(12px, 2vw, 24px) + env(safe-area-inset-bottom, 0px) + var(--va11y-lift, 0px));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px 0 12px;
  border: 1px solid rgba(228, 201, 107, 0.4);
  border-radius: 999px;
  background: rgba(23, 19, 13, 0.9);
  color: #f5efe2;
  font-family: 'Heebo', 'Assistant', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(23, 19, 13, 0.55);
}
.va11y-fab .va11y-icon {
  color: #e4c96b;
}
@media (hover: hover) {
  .va11y-fab:hover {
    border-color: #e4c96b;
    background: #17130d;
  }
}
.va11y-fab:focus-visible {
  outline: 2px solid #e4c96b !important;
  outline-offset: 3px;
}
.va11y-fab[aria-expanded='true'] {
  border-color: #e4c96b;
}
/* טלפון: עיגול 44px עם האייקון בלבד — השם נשאר לקורא המסך
   (aria-label), ולא תופס רוחב מעל התוכן. */
@media (max-width: 600px) {
  .va11y-fab {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
  }
  .va11y-fab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
@media print {
  .va11y-fab {
    display: none;
  }
}

/* ---- החלון ---- */
.va11y-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2400;
  background: rgba(20, 18, 14, 0.45);
}
.va11y-panel {
  position: fixed;
  z-index: 2401;
  /* מרכוז פיזי (left) בכוונה — לא תלוי בכיוון הכתיבה. */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc((100vw - 32px) / var(--va11y-zoom, 1)));
  /* יחידות dvh מוגדלות יחד עם ה-zoom — מחלקים בחזרה, אחרת בטקסט "גדול
     מאוד" החלון גבוה מהמסך והכותרת שלו נחתכת. */
  max-height: calc((100dvh - 32px) / var(--va11y-zoom, 1));
  overflow-y: auto;
  padding: 22px 22px 18px;
  border: 1px solid #e5dec9;
  border-radius: 18px;
  background: #fbf6ee;
  color: #2b2620;
  box-shadow: 0 24px 60px -24px rgba(20, 18, 14, 0.55);
  font-family: 'Heebo', 'Assistant', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-align: start;
}
.va11y-panel:focus {
  outline: none;
}
@media (max-width: 560px) {
  .va11y-panel {
    top: auto;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-height: calc(88dvh / var(--va11y-zoom, 1));
    border-radius: 18px 18px 0 0;
    padding-bottom: max(18px, env(safe-area-inset-bottom, 18px));
  }
}
.va11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.va11y-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #2b2620;
}
.va11y-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e5dec9;
  border-radius: 50%;
  background: #fff;
  color: #2b2620;
  font-size: 18px;
  cursor: pointer;
}
.va11y-sub {
  margin: 4px 0 16px;
  font-size: 13.5px;
  color: #5c5548;
}
.va11y-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2b2620;
}
.va11y-sizes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.va11y-size {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 64px;
  padding: 8px 6px;
  border: 1px solid #d9cfb7;
  border-radius: 12px;
  background: #fff;
  color: #2b2620;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.va11y-size-sample {
  font-weight: 700;
  line-height: 1;
}
.va11y-size[aria-pressed='true'] {
  border: 2px solid #896e29;
  background: #f6efdc;
}
.va11y-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.va11y-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid #d9cfb7;
  border-radius: 12px;
  background: #fff;
  color: #2b2620;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.va11y-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.va11y-toggle-name {
  font-weight: 600;
}
.va11y-toggle-hint {
  font-size: 13px;
  color: #5c5548;
}
/* המתג: מצב "פעיל" גם בצורה (הנקודה זזה) וגם במילה — לא רק בצבע. */
.va11y-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border: 1.5px solid #8a7d62;
  border-radius: 999px;
  background: #fff;
}
.va11y-switch::after {
  content: '';
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #8a7d62;
  transition: inset-inline-start 0.15s ease;
}
.va11y-toggle[aria-pressed='true'] {
  border-color: #896e29;
  background: #f6efdc;
}
.va11y-toggle[aria-pressed='true'] .va11y-switch {
  border-color: #6b5520;
  background: #896e29;
}
.va11y-toggle[aria-pressed='true'] .va11y-switch::after {
  inset-inline-start: 21px;
  background: #fff;
}
.va11y-state {
  font-size: 12.5px;
  font-weight: 600;
  color: #5c5548;
  min-width: 2.6em;
  text-align: center;
}
.va11y-toggle-end {
  display: flex;
  align-items: center;
  gap: 8px;
}
.va11y-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5dec9;
}
.va11y-reset {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #d9cfb7;
  border-radius: 10px;
  background: #fff;
  color: #2b2620;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.va11y-statement {
  color: #6b5520;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.va11y-panel :is(button, a):focus-visible {
  outline: 2px solid #6b5520 !important;
  outline-offset: 2px;
}
@media (hover: hover) {
  .va11y-size:hover,
  .va11y-toggle:hover,
  .va11y-reset:hover,
  .va11y-close:hover {
    border-color: #896e29;
  }
}
@media (prefers-reduced-motion: reduce) {
  .va11y-switch::after {
    transition: none;
  }
}
