/* ============================================================
   accessibility.css
   רכיב הנגישות. עומד בפני עצמו ולא נשען על public.css או admin.css,
   כדי שיוכל לרוץ על כל עמוד במערכת בלי תלות בערכת הצבעים.
   ============================================================ */

/* ---------- קישור דילוג לתוכן (נחשף רק בניווט מקלדת) ---------- */
.a11y-skip{
  position:fixed; top:-100px; right:16px; z-index:2147483647;
  background:#12305c; color:#fff; padding:12px 20px; border-radius:0 0 10px 10px;
  font:600 15px/1 "Heebo",Arial,sans-serif; transition:top .18s ease;
}
.a11y-skip:focus{ top:0; outline:3px solid #ffd400; outline-offset:2px; }

/* ---------- הכפתור הצף ---------- */
.a11y-root{ font-family:"Heebo","Segoe UI",Arial,sans-serif; }

.a11y-toggle{
  position:fixed;
  bottom:15px;
  left:15px;
  width:40px;
  height:40px;
  z-index:2147483000;
  padding:0; margin:0;
  border:1px solid #ffffff;
  border-radius:50%;
  background:#12305c;
  color:#ffffff;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 8px rgba(0,0,0,.45);
  transition:transform .14s ease, background .14s ease;
}
.a11y-toggle:hover{ background:#1c4a8c; transform:scale(1.12); }
.a11y-toggle:focus-visible{ outline:3px solid #ffd400; outline-offset:3px; }
.a11y-toggle svg{ width:26px; height:26px; display:block; }

/* ---------- החלונית ---------- */
.a11y-panel{
  position:fixed;
  bottom:63px;
  left:15px;
  z-index:2147483001;
  width:302px;
  max-width:calc(100vw - 30px);
  max-height:min(78vh, 620px);
  overflow:auto;
  background:#ffffff;
  color:#16202c;
  border:1px solid #c6ced8;
  border-radius:14px;
  box-shadow:0 14px 44px rgba(0,0,0,.42);
  font-size:14px;
  line-height:1.5;
  direction:rtl;
  text-align:right;
}
.a11y-panel[hidden]{ display:none; }

.a11y-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:13px 15px;
  background:#12305c; color:#fff;
  border-radius:13px 13px 0 0;
  position:sticky; top:0; z-index:2;
}
.a11y-head h2{ margin:0; font-size:15.5px; font-weight:800; }
.a11y-close{
  width:30px; height:30px; flex-shrink:0;
  border:1px solid rgba(255,255,255,.5); border-radius:50%;
  background:transparent; color:#fff; cursor:pointer;
  font-size:19px; line-height:1; font-family:inherit;
}
.a11y-close:hover{ background:rgba(255,255,255,.15); }

.a11y-body{ padding:12px 14px 6px; }

.a11y-group{ margin-bottom:14px; }
.a11y-group-title{
  font-size:12px; font-weight:800; color:#5b6673;
  letter-spacing:.2px; margin:0 2px 7px;
  text-transform:none;
}

/* שורת מדרגה: פחות / ערך / יותר */
.a11y-stepper{
  display:flex; align-items:center; gap:8px;
  border:1px solid #d3dae2; border-radius:10px; padding:6px 8px; margin-bottom:8px;
  background:#f7f9fb;
}
.a11y-stepper .lbl{ flex:1; font-size:13.5px; font-weight:600; }
.a11y-stepper .val{
  min-width:44px; text-align:center; font-size:12.5px; font-weight:700; color:#12305c;
}
.a11y-step-btn{
  width:32px; height:32px; flex-shrink:0;
  border:1px solid #b9c4d0; border-radius:8px;
  background:#fff; color:#12305c; cursor:pointer;
  font-size:18px; font-weight:700; line-height:1; font-family:inherit;
}
.a11y-step-btn:hover{ background:#e8eff8; }
.a11y-step-btn:focus-visible,
.a11y-opt:focus-visible,
.a11y-close:focus-visible,
.a11y-reset:focus-visible,
.a11y-statement:focus-visible{ outline:3px solid #12305c; outline-offset:2px; }

/* אריחי הפעולות */
.a11y-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.a11y-opt{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px; min-height:70px; padding:9px 6px;
  border:1px solid #d3dae2; border-radius:10px;
  background:#f7f9fb; color:#16202c;
  font:600 12.5px/1.3 inherit; text-align:center; cursor:pointer;
}
.a11y-opt svg{ width:22px; height:22px; flex-shrink:0; color:#12305c; }
.a11y-opt:hover{ background:#e8eff8; border-color:#9fb2c6; }
.a11y-opt[aria-pressed="true"]{
  background:#12305c; border-color:#12305c; color:#fff;
}
.a11y-opt[aria-pressed="true"] svg{ color:#ffd400; }

.a11y-foot{
  display:flex; align-items:center; gap:8px;
  padding:10px 14px 14px; border-top:1px solid #e3e8ee; margin-top:4px;
}
.a11y-reset{
  flex:1; padding:10px; border:1px solid #b9c4d0; border-radius:9px;
  background:#fff; color:#16202c; font:700 13px inherit; cursor:pointer;
}
.a11y-reset:hover{ background:#f0f3f7; }
.a11y-statement{
  flex:1; padding:10px; border-radius:9px; text-align:center;
  background:#12305c; color:#fff; font:700 13px inherit; text-decoration:none;
  display:flex; align-items:center; justify-content:center;
  border:none; cursor:pointer; font-family:inherit;
}
.a11y-statement:hover{ background:#1c4a8c; }

/* הודעה מוקראת למסך קורא בלבד */
.a11y-sr{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* ============================================================
   מצבי התצוגה שהמשתמש מפעיל
   ============================================================ */

/* --- ניגודיות גבוהה: שחור-לבן-צהוב --- */
html.a11y-hc body, html.a11y-hc body *{
  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-hc body a, html.a11y-hc body a *{ color:#ffd400 !important; text-decoration:underline !important; }
html.a11y-hc body img{ filter:grayscale(1) contrast(1.35); }

/* --- רקע בהיר --- */
html.a11y-light body, html.a11y-light body *{
  background-color:#fff !important;
  background-image:none !important;
  color:#111 !important;
  border-color:#8a8a8a !important;
  text-shadow:none !important;
}
html.a11y-light body a, html.a11y-light body a *{ color:#0a3d91 !important; text-decoration:underline !important; }

/* --- ניגודיות הפוכה --- */
html.a11y-invert{ filter:invert(1) hue-rotate(180deg); background:#fff; }
/* מחזירים את הרכיב עצמו לצבעיו המקוריים */
html.a11y-invert .a11y-root,
html.a11y-invert .a11y-skip{ filter:invert(1) hue-rotate(180deg); }

/* --- גווני אפור --- */
html.a11y-gray{ filter:grayscale(1); }

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

/* --- הדגשת כותרות --- */
html.a11y-heads body :is(h1,h2,h3,h4,h5,h6){
  outline:2px solid #ffd400 !important;
  outline-offset:3px !important;
  background:rgba(255,212,0,.12) !important;
}

/* --- פונט קריא --- */
html.a11y-font body *:not(.a11y-root):not(.a11y-root *){
  font-family:Arial, "Segoe UI", Tahoma, sans-serif !important;
  font-weight:600 !important;
  font-style:normal !important;
}

/* --- ריווח שורות --- */
html.a11y-lh1 body *:not(.a11y-root):not(.a11y-root *){ line-height:1.9 !important; }
html.a11y-lh2 body *:not(.a11y-root):not(.a11y-root *){ line-height:2.4 !important; }

/* --- ריווח אותיות ומילים --- */
html.a11y-ls1 body *:not(.a11y-root):not(.a11y-root *){ letter-spacing:.06em !important; word-spacing:.14em !important; }
html.a11y-ls2 body *:not(.a11y-root):not(.a11y-root *){ letter-spacing:.12em !important; word-spacing:.3em !important; }

/* --- יישור טקסט לימין --- */
html.a11y-align body *:not(.a11y-root):not(.a11y-root *){ text-align:right !important; }

/* --- עצירת אנימציות --- */
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::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='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l14 11h-7l3.5 7.5-3 1.4L9 14.5 5 18z' fill='%23000' stroke='%23fff' stroke-width='1.4'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* --- מוקד מקלדת מודגש --- */
html.a11y-kb body :is(a,button,input,select,textarea,[tabindex]):focus{
  outline:4px solid #ffd400 !important;
  outline-offset:3px !important;
  box-shadow:0 0 0 7px rgba(18,48,92,.85) !important;
}

/* --- מדריך קריאה --- */
.a11y-guide{
  position:fixed; left:0; right:0; height:14px;
  background:rgba(255,212,0,.55);
  border-top:2px solid #12305c; border-bottom:2px solid #12305c;
  pointer-events:none; z-index:2147482000; display:none;
}
html.a11y-guide-on .a11y-guide{ display:block; }

/* --- מסכת קריאה --- */
.a11y-mask{ position:fixed; left:0; right:0; background:rgba(0,0,0,.82);
            pointer-events:none; z-index:2147482000; display:none; }
html.a11y-mask-on .a11y-mask{ display:block; }

/* ============================================================
   הרכיב עצמו תמיד שומר על צבעיו, גם במצבי הניגודיות
   (הסלקטורים כאן שווים בעוצמתם ומופיעים אחריהם, ולכן גוברים)
   ============================================================ */
html body .a11y-panel{ background:#fff !important; color:#16202c !important; border-color:#c6ced8 !important; }
html body .a11y-head{ background:#12305c !important; color:#fff !important; }
html body .a11y-head h2{ color:#fff !important; background:transparent !important; }
html body .a11y-close{ background:transparent !important; color:#fff !important; border-color:rgba(255,255,255,.5) !important; }
html body .a11y-group-title{ background:transparent !important; color:#5b6673 !important; }
html body .a11y-stepper{ background:#f7f9fb !important; color:#16202c !important; border-color:#d3dae2 !important; }
html body .a11y-stepper .lbl{ background:transparent !important; color:#16202c !important; }
html body .a11y-stepper .val{ background:transparent !important; color:#12305c !important; }
html body .a11y-step-btn{ background:#fff !important; color:#12305c !important; border-color:#b9c4d0 !important; }
html body .a11y-opt{ background:#f7f9fb !important; color:#16202c !important; border-color:#d3dae2 !important; }
html body .a11y-opt[aria-pressed="true"]{ background:#12305c !important; color:#fff !important; border-color:#12305c !important; }
html body .a11y-opt svg{ color:#12305c !important; }
html body .a11y-opt[aria-pressed="true"] svg{ color:#ffd400 !important; }
html body .a11y-foot{ background:#fff !important; border-color:#e3e8ee !important; }
html body .a11y-reset{ background:#fff !important; color:#16202c !important; border-color:#b9c4d0 !important; }
html body .a11y-statement{ background:#12305c !important; color:#fff !important; }
html body .a11y-toggle{ background:#12305c !important; color:#fff !important; border-color:#fff !important; }
html body .a11y-toggle svg{ color:#fff !important; }

/* ============================================================
   פופאפ הצהרת הנגישות
   ============================================================ */
.a11y-modal{ position:fixed; inset:0; z-index:2147483100; }
.a11y-modal[hidden]{ display:none; }

.a11y-modal-backdrop{
  position:absolute; inset:0;
  background:rgba(6,12,22,.72);
}

.a11y-modal-box{
  position:absolute;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  width:560px;
  max-width:calc(100vw - 28px);
  max-height:min(84vh, 760px);
  display:flex; flex-direction:column;
  background:#fff; color:#16202c;
  border:1px solid #c6ced8; border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
  direction:rtl; text-align:right;
  font:400 15px/1.7 "Heebo","Segoe UI",Arial,sans-serif;
  overflow:hidden;
}
.a11y-modal-box:focus{ outline:none; }

.a11y-modal-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:14px 18px; background:#12305c; color:#fff; flex-shrink:0;
}
.a11y-modal-head h2{ margin:0; font-size:18px; font-weight:800; }

/* אזור הגלילה */
.a11y-modal-body{
  padding:18px 22px 24px;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.a11y-modal-body h3{
  margin:20px 0 8px; font-size:16px; font-weight:800; color:#12305c;
}
.a11y-modal-body h3:first-child{ margin-top:0; }
.a11y-modal-body p{ margin:0 0 12px; }
.a11y-modal-body ul{ margin:0 0 14px; padding-right:22px; }
.a11y-modal-body li{ margin-bottom:5px; }
.a11y-modal-body a{ color:#0a3d91; text-decoration:underline; text-underline-offset:2px; }
.a11y-modal-body hr{ border:none; border-top:1px solid #e3e8ee; margin:18px 0; }

.a11y-features li{ font-weight:600; }
.a11y-contact{ list-style:none; padding:0; }
.a11y-contact li{ margin-bottom:6px; }

.a11y-statement-text{ border-top:1px solid #e3e8ee; margin-top:18px; padding-top:14px; }

@media (max-width:520px){
  .a11y-modal-box{ font-size:14.5px; border-radius:12px; }
  .a11y-modal-body{ padding:16px 16px 20px; }
}

/* הפופאפ שומר על צבעיו גם במצבי הניגודיות */
html body .a11y-modal-box{ background:#fff !important; color:#16202c !important; border-color:#c6ced8 !important; }
html body .a11y-modal-backdrop{ background:rgba(6,12,22,.72) !important; }
html body .a11y-modal-head{ background:#12305c !important; color:#fff !important; }
html body .a11y-modal-head h2{ background:transparent !important; color:#fff !important; }
html body .a11y-modal-body{ background:#fff !important; color:#16202c !important; }
html body .a11y-modal-body *{ background:transparent !important; color:#16202c !important; border-color:#e3e8ee !important; }
html body .a11y-modal-body h3{ color:#12305c !important; }
html body .a11y-modal-body a{ color:#0a3d91 !important; }
html body .a11y-statement{ background:#12305c !important; color:#fff !important; border:none !important; }
html.a11y-invert .a11y-modal{ filter:invert(1) hue-rotate(180deg); }
