/* ==========================================================================
   תפריט נגישות — כפתור צף + התאמות תצוגה. קוד מקומי בלבד (בלי תוסף חיצוני).
   ההתאמות פועלות דרך מחלקות על <html>, ונשמרות בדפדפן של הגולש.
   ========================================================================== */

.a11y-btn {
  position: fixed;
  inset-inline-start: auto;
  inset-inline-end: 16px;      /* ב-RTL: צד שמאל של המסך */
  inset-block-end: 16px;
  z-index: 9999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: #10557f;          /* לבן עליו — 7.9:1 */
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(3, 18, 30, .45);
  padding: 0;
}
.a11y-btn svg { width: 30px; height: 30px; }
.a11y-btn:hover { background: #0c405f; }
.a11y-btn:focus-visible { outline: 4px solid #e0a458; outline-offset: 3px; }

.a11y-panel {
  position: fixed;
  inset-inline-end: 16px;
  inset-block-end: 80px;
  z-index: 9999;
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100vh - 110px);
  overflow: auto;
  background: #ffffff;
  color: #0f2942;               /* 14.9:1 */
  border: 2px solid #10557f;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(3, 18, 30, .45);
  padding: 1rem;
  font-family: "Assistant", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
.a11y-panel[hidden] { display: none !important; }
.a11y-panel__title { margin: 0 0 .7rem; font-size: 1.1rem; font-weight: 800; }
.a11y-panel__group { margin: 0 0 .8rem; }
.a11y-panel__label { display: block; font-weight: 700; margin-block-end: .35rem; }
.a11y-panel__row { display: flex; gap: .4rem; }
.a11y-panel button {
  font: inherit;
  font-weight: 700;
  color: #0c405f;               /* על לבן — 10.3:1 */
  background: #ffffff;
  border: 2px solid #10557f;
  border-radius: 10px;
  padding: .45rem .6rem;
  cursor: pointer;
}
.a11y-panel__row button { flex: 1; }
.a11y-panel button[aria-pressed="true"] { background: #10557f; color: #ffffff; }
.a11y-panel button:focus-visible { outline: 3px solid #e0a458; outline-offset: 2px; }
.a11y-toggles { display: grid; gap: .4rem; }
.a11y-toggles button { text-align: start; width: 100%; }
.a11y-panel__footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-block-start: .6rem; padding-block-start: .6rem; border-block-start: 1px solid #d5dee7; }
.a11y-panel__footer a { color: #0c405f; font-weight: 700; }
.a11y-panel__footer a:focus-visible { outline: 3px solid #e0a458; outline-offset: 2px; }

/* ---------- התאמות ---------- */

/* הגדלת טקסט: 3 דרגות. גם rem (html) וגם הגודל הקבוע של body. */
html.a11y-text-1 { font-size: 112.5%; }
html.a11y-text-2 { font-size: 125%; }
html.a11y-text-3 { font-size: 140%; }
html.a11y-text-1 body { font-size: 19px; }
html.a11y-text-2 body { font-size: 21px; }
html.a11y-text-3 body { font-size: 24px; }

/* ניגודיות גבוהה: רקע שחור אחיד, טקסט ומסגרות חזקים, קישורים בצהוב */
html.a11y-contrast body { background: #000000 !important; background-image: none !important; color: #ffffff; }
html.a11y-contrast body::before { display: none !important; }
html.a11y-contrast .panel, html.a11y-contrast .card, html.a11y-contrast .biz-card, html.a11y-contrast .state,
html.a11y-contrast .plan, html.a11y-contrast .city, html.a11y-contrast .login__card, html.a11y-contrast .table-wrap {
  background: #ffffff !important; color: #000000 !important; border: 2px solid #000000 !important; box-shadow: none !important;
}
html.a11y-contrast .panel *, html.a11y-contrast .card *, html.a11y-contrast .biz-card *, html.a11y-contrast .plan *,
html.a11y-contrast .state *, html.a11y-contrast .city * { color: #000000 !important; }
html.a11y-contrast .topbar, html.a11y-contrast .masthead, html.a11y-contrast .hero, html.a11y-contrast .site-footer,
html.a11y-contrast .footer, html.a11y-contrast .join, html.a11y-contrast .biz__head, html.a11y-contrast .plans-hero {
  background: #000000 !important; color: #ffffff !important;
}
html.a11y-contrast .topbar *, html.a11y-contrast .masthead *, html.a11y-contrast .hero *, html.a11y-contrast .site-footer *,
html.a11y-contrast .footer *, html.a11y-contrast .join *, html.a11y-contrast .biz__head *, html.a11y-contrast .plans-hero * {
  color: #ffffff !important;
}
html.a11y-contrast a { color: #ffff00 !important; text-decoration: underline !important; }
html.a11y-contrast .panel a, html.a11y-contrast .card a, html.a11y-contrast .biz-card, html.a11y-contrast .plan a { color: #0000ee !important; }
html.a11y-contrast .btn, html.a11y-contrast .back-btn, html.a11y-contrast .topbar__cta, html.a11y-contrast .btn--small,
html.a11y-contrast .btn-small, html.a11y-contrast .action {
  background: #ffffff !important; color: #000000 !important; border: 2px solid #000000 !important; box-shadow: none !important;
}
html.a11y-contrast .btn *, html.a11y-contrast .action * { color: #000000 !important; }
html.a11y-contrast input, html.a11y-contrast select, html.a11y-contrast textarea {
  background: #ffffff !important; color: #000000 !important; border: 2px solid #000000 !important;
}
html.a11y-contrast :focus-visible { outline: 4px solid #ffff00 !important; outline-offset: 2px !important; }

/* הדגשת קישורים */
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; outline: 2px dashed currentColor; outline-offset: 2px; }

/* גופן קריא: גופן מערכת פשוט, ריווח מוגדל */
html.a11y-font body, html.a11y-font body * { font-family: Arial, "Segoe UI", sans-serif !important; letter-spacing: .02em; word-spacing: .08em; }
html.a11y-font body p, html.a11y-font body li { line-height: 1.9 !important; }

/* עצירת אנימציות ומעברים */
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

/* סמן גדול */
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M4 2l26 16-12 2 7 14-5 3-7-14-9 8z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 4 2, auto !important;
}

@media print { .a11y-btn, .a11y-panel { display: none !important; } }

/* תגיות וכיתובים צבעוניים במצב ניגודיות: שחור על לבן עם מסגרת, במקום טקסט על צבע */
html.a11y-contrast .biz__category, html.a11y-contrast .update__tag, html.a11y-contrast .plan-badge,
html.a11y-contrast .badge, html.a11y-contrast .biz-card__category, html.a11y-contrast .topbar__cta {
  background: #ffffff !important; color: #000000 !important; border: 2px solid #000000 !important;
}
html.a11y-contrast .back-btn__arrow { text-decoration: none !important; display: inline-block; }
html.a11y-contrast .biz-card--highlighted::before { background: #000000 !important; }

/* בנייד, בדפים עם סרגל שליחה דביק בתחתית (טופס ההרשמה) — הכפתור עולה מעליו */
@media (max-width: 560px) {
  body:has(.wizard-bar) .a11y-btn { inset-block-end: 92px; }
  body:has(.wizard-bar) .a11y-panel { inset-block-end: 156px; max-height: calc(100vh - 180px); }
}
