/* assets/a11y.css — רכיב הנגישות (כפתור + פאנל + מצבי תצוגה). משותף ל-gamingpc ול-cserv.
 *
 * ניגודיות וגווני אפור: בלי filter על body (הוא הופך את body ל-containing block ומוציא אלמנטים fixed —
 * הכפתור, הפאנל, תפריטים — מחוץ למסך). במקום זה: שכבה שקופה אחת (.a11y-shade) ב-position:fixed עם
 * backdrop-filter, מעל תוכן הדף ומתחת לרכיב הנגישות. השכבה לא עוטפת שום אלמנט ולא מקבלת לחיצות.
 * הרכיב עצמו (כפתור ופאנל) מעליה, ולכן אינו מסונן.
 */

/* ── שכבות ─────────────────────────────────────────────────────── */
.a11y-shade{position:fixed;inset:0;z-index:2147483000;pointer-events:none;display:none;
  -webkit-backdrop-filter:var(--a11y-g,grayscale(0)) var(--a11y-c,contrast(1));backdrop-filter:var(--a11y-g,grayscale(0)) var(--a11y-c,contrast(1))}
html.a11y-gray .a11y-shade,html.a11y-contrast .a11y-shade{display:block}
html.a11y-gray .a11y-shade{--a11y-g:grayscale(1)}
html.a11y-contrast .a11y-shade{--a11y-c:contrast(1.5)}
#a11yBtn,#a11yPanel{z-index:2147483001}

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

/* ── כפתור (נשאר .float-btn .float-access: מיקום, גודל וצבע מהעיצוב הקיים) ─ */
#a11yBtn{min-width:44px;min-height:44px;padding:0}
#a11yBtn svg{width:26px;height:26px;display:block;pointer-events:none}
#a11yBtn:focus-visible,.a11y-panel button:focus-visible,.a11y-panel a:focus-visible{outline:3px solid #ffbf47;outline-offset:3px;box-shadow:0 0 0 6px #0b0c0c}
#a11yBtn[aria-expanded="true"]{box-shadow:0 0 0 3px #fff,0 0 0 6px #0b0c0c}

/* ── פאנל לא מודאלי ─────────────────────────────────────────────── */
.a11y-panel{position:fixed;left:16px;bottom:84px;z-index:2147483001;width:288px;max-width:calc(100vw - 32px);max-height:calc(100vh - 100px);overflow:auto;
  background:#fff;color:#0b0c0c;border:2px solid #0b0c0c;border-radius:12px;padding:14px;box-shadow:0 10px 30px rgba(0,0,0,.35);
  font:400 15px/1.5 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;direction:rtl;text-align:right}
.a11y-panel[hidden]{display:none}
.a11y-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px}
.a11y-panel h2{margin:0;font-size:17px;font-weight:700;color:#0b0c0c}
.a11y-close{min-width:44px;min-height:44px;border:2px solid #0b0c0c;border-radius:8px;background:#fff;color:#0b0c0c;font-size:20px;line-height:1;cursor:pointer}
.a11y-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.a11y-opt{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:44px;padding:8px 12px;border:2px solid #0b0c0c;border-radius:8px;
  background:#fff;color:#0b0c0c;font:inherit;font-weight:600;cursor:pointer;text-align:right}
.a11y-opt .a11y-state{font-size:13px;font-weight:700;padding:2px 8px;border-radius:999px;border:1px solid #0b0c0c;white-space:nowrap}
.a11y-opt[aria-pressed="true"]{background:#0b0c0c;color:#fff}
.a11y-opt[aria-pressed="true"] .a11y-state{background:#ffbf47;color:#0b0c0c;border-color:#ffbf47}
.a11y-opt[aria-disabled="true"]{opacity:.6;cursor:not-allowed}
.a11y-reset{width:100%;min-height:44px;margin-top:10px;border:2px solid #0b0c0c;border-radius:8px;background:#f3f2f1;color:#0b0c0c;font:inherit;font-weight:700;cursor:pointer}
.a11y-note{margin:10px 0 0;font-size:13px;color:#2b2b2b}
.a11y-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* מסך צר: הפאנל ברוחב המסך, מעוגן לתחתית, תמיד בתוכו */
@media (max-width:480px){
  .a11y-panel{left:8px;right:8px;bottom:8px;width:auto;max-width:none;max-height:calc(100vh - 16px)}
  @supports (height:100dvh){.a11y-panel{max-height:calc(100dvh - 16px)}}
}

/* עגלה וקופה במובייל: כפתור הנגישות והוואטסאפ בסוף העמוד (כמו תיקון העגלה ב-mobile.css),
   אבל relative + z-index כדי שהכפתור יישאר מעל שכבת הניגודיות/האפור ולא יסונן. */
@media (max-width:768px){
  body:has(.cart-layout) #a11yBtn,body:has(.checkout-layout) #a11yBtn{position:relative;z-index:2147483001;order:99;align-self:flex-start;margin:0 14px 14px;flex:none;inset:auto}
  body:has(.cart-layout) .float-wa,body:has(.checkout-layout) .float-wa{position:static;order:99;align-self:flex-start;margin:14px 14px 8px;flex:none}
}

@media (prefers-reduced-motion:reduce){#a11yBtn{transition:none}}
