/* Native accessibility panel (כלי נגישות) — self-hosted supplement to the code-level
   IS 5568 work. Loaded on the storefront layouts and injected into mirror pages. */

/* floating trigger — created by a11y-panel.js only when the page has no [data-a11yp-trigger] */
.a11yp-float {
  position: fixed; top: 50%; left: 0; transform: translateY(-50%); z-index: 2147483000;
  width: 44px; height: 44px; border: 0; border-radius: 0 10px 10px 0; cursor: pointer;
  background: #5b2be0; color: #fff; font-size: 22px; line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.35); display: grid; place-items: center;
}
.a11yp-float:focus-visible { outline: 3px solid #16559f; outline-offset: 2px; }

/* panel */
.a11yp-panel {
  position: fixed; top: 0; left: 0; height: 100%; width: 320px; max-width: 92vw;
  z-index: 2147483001; background: #fff; color: #22333b; direction: rtl;
  box-shadow: 4px 0 30px rgba(0,0,0,.25); display: none; flex-direction: column;
  font-family: Arial, "Segoe UI", system-ui, sans-serif; font-size: 15px;
}
.a11yp-panel.open { display: flex; }
.a11yp-head {
  background: #295348; color: #fff; padding: 14px 18px; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto;
}
.a11yp-close {
  border: 0; background: rgba(255,255,255,.15); color: #fff; width: 32px; height: 32px;
  border-radius: 50%; font-size: 16px; cursor: pointer; display: grid; place-items: center;
}
.a11yp-close:hover { background: rgba(255,255,255,.3); }
.a11yp-body { overflow-y: auto; padding: 14px; flex: 1 1 auto; }
.a11yp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a11yp-btn {
  border: 1.5px solid #d6d2c8; background: #faf9f6; color: #22333b; border-radius: 12px;
  padding: 12px 8px 10px; font-size: 13.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px;
  min-height: 74px; justify-content: center; text-align: center;
}
.a11yp-btn .ic { font-size: 21px; line-height: 1; }
.a11yp-btn:hover { border-color: #295348; }
.a11yp-btn[aria-pressed="true"] {
  background: #295348; border-color: #295348; color: #fff;
}
.a11yp-btn:focus-visible { outline: 3px solid #16559f; outline-offset: 2px; }
.a11yp-row { grid-column: 1 / -1; }
.a11yp-foot { padding: 10px 14px 14px; border-top: 1px solid #e7e3d9; flex: 0 0 auto; }
.a11yp-foot a { color: #295348; font-weight: 700; text-decoration: underline; }
.a11yp-reset {
  width: 100%; margin-top: 8px; border: 1.5px solid #5f021f; color: #5f021f; background: #fff;
  border-radius: 999px; padding: 9px; font-weight: 700; font-family: inherit; cursor: pointer; font-size: 14px;
}
.a11yp-reset:hover { background: rgba(95,2,31,.06); }
.a11yp-steps { display: flex; align-items: center; gap: 10px; justify-content: center; }
.a11yp-steps button {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #d6d2c8; background: #fff;
  font-size: 17px; font-weight: 700; cursor: pointer; color: #22333b;
}
.a11yp-steps button:hover { border-color: #295348; }
.a11yp-steps .val { min-width: 48px; text-align: center; font-weight: 700; }

/* ============ effect classes (html[data-a11yp-*]) ============ */
/* visual filters (grayscale / contrast / inverted dark) are composed by JS into --a11yp-filter
   and applied per direct body child, so position:fixed/sticky UI keeps working */
html[data-a11yp-filter] body > *:not(.a11yp-panel):not(.a11yp-float):not(.a11yp-guide) {
  filter: var(--a11yp-filter);
}
/* inverted-dark mode: counter-invert media so photos stay natural */
html[data-a11yp-invert] img, html[data-a11yp-invert] video, html[data-a11yp-invert] iframe,
html[data-a11yp-invert] [style*="background-image"] {
  filter: invert(1) hue-rotate(180deg);
}
/* link highlighting */
html[data-a11yp-links] a, html[data-a11yp-links] a * {
  text-decoration: underline !important; color: #0b0b8f !important;
  background-color: #ffec9e !important; -webkit-text-fill-color: #0b0b8f !important;
}
/* readable font */
html[data-a11yp-font] body, html[data-a11yp-font] body * {
  font-family: Arial, "Segoe UI", Tahoma, sans-serif !important;
  letter-spacing: 0.02em !important;
}
/* stop animations/transitions/smooth-scroll */
html[data-a11yp-motion] *, html[data-a11yp-motion] *::before, html[data-a11yp-motion] *::after {
  animation-play-state: paused !important; animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important; scroll-behavior: auto !important;
}
/* reading guide bar (follows the pointer) */
.a11yp-guide {
  position: fixed; left: 0; width: 100%; height: 0; z-index: 2147483002; pointer-events: none;
  border-top: 4px solid #f2b21b; box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.35);
}
