/* ==============================
   Accessibility Widget – AluMaster
   WCAG 2.2 / ת"י 5568
   ============================== */

#a11y-btn {
  position: fixed;
  bottom: 96px;
  left: 24px;
  width: 56px;
  height: 56px;
  background: #1a1a1a;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 997;
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  color: #fff;
  padding: 0;
}
#a11y-btn:hover { transform: scale(1.08); box-shadow: 0 6px 26px rgba(0,0,0,0.55); }
#a11y-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 50%; }

#a11y-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 290px;
  max-height: 88vh;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 40px rgba(0,0,0,0.22);
  z-index: 9998;
  overflow-y: auto;
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  font-family: 'Heebo', sans-serif;
  direction: rtl;
}
#a11y-panel.a11y-open { transform: translateY(0); }

#a11y-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 9997;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
#a11y-overlay.a11y-open { opacity: 1; pointer-events: auto; }

.a11y-header {
  background: #0f1b2d;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px 18px 0 0;
  position: sticky;
  top: 0;
  z-index: 1;
}
.a11y-header h2 {
  color: #c9a84c;
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
#a11y-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.8);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
#a11y-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
#a11y-close:focus-visible { outline: 2px solid #c9a84c; outline-offset: 2px; }

.a11y-body { padding: 16px; }

.a11y-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #888;
  margin: 16px 0 8px;
}
.a11y-group-label:first-child { margin-top: 0; }

.a11y-font-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.a11y-font-row span {
  flex: 1;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #333;
}
.a11y-icon-btn {
  width: 40px;
  height: 40px;
  background: #f4f6fb;
  border: 1px solid #dde2ee;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  color: #0f1b2d;
  font-family: 'Heebo', sans-serif;
}
.a11y-icon-btn:hover { background: #e8ecf6; border-color: #c9a84c; }
.a11y-icon-btn:focus-visible { outline: 2px solid #c9a84c; outline-offset: 2px; }

.a11y-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f9fc;
  border: 1px solid #eaeef4;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.a11y-toggle-row:hover { background: #eef1f8; }
.a11y-toggle-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.a11y-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.a11y-switch input { opacity: 0; width: 0; height: 0; }
.a11y-switch-track {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background 0.2s;
  cursor: pointer;
}
.a11y-switch-track::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  right: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.a11y-switch input:checked + .a11y-switch-track { background: #c9a84c; }
.a11y-switch input:checked + .a11y-switch-track::after { transform: translateX(-18px); }
.a11y-switch input:focus-visible + .a11y-switch-track { outline: 2px solid #c9a84c; outline-offset: 2px; border-radius: 24px; }

.a11y-reset {
  width: 100%;
  padding: 12px;
  background: #0f1b2d;
  color: #c9a84c;
  border: none;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 16px;
  font-family: 'Heebo', sans-serif;
  transition: background 0.15s;
}
.a11y-reset:hover { background: #16243a; }
.a11y-reset:focus-visible { outline: 2px solid #c9a84c; outline-offset: 2px; }

.a11y-footer {
  text-align: center;
  padding: 10px 16px 18px;
  font-size: 0.75rem;
  color: #999;
}
.a11y-footer a { color: #c9a84c; text-decoration: none; }

/* ==============================
   Global accessibility modifiers
   applied to <html> element
   ============================== */

html.a11y-font-lg  { font-size: 112% !important; }
html.a11y-font-xl  { font-size: 125% !important; }
html.a11y-font-xxl { font-size: 140% !important; }

html.a11y-grayscale  { filter: grayscale(100%); }
html.a11y-invert     { filter: invert(100%) hue-rotate(180deg); }

html.a11y-high-contrast {
  filter: contrast(180%);
}
html.a11y-high-contrast body {
  background: #000 !important;
  color: #fff !important;
}
html.a11y-high-contrast a { color: #ffff00 !important; }
html.a11y-high-contrast .btn-gold,
html.a11y-high-contrast .btn-submit { background: #ffff00 !important; color: #000 !important; }

html.a11y-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  outline: 1px dotted currentColor !important;
  outline-offset: 2px !important;
}

html.a11y-spacing * {
  letter-spacing: 0.1em !important;
  word-spacing: 0.15em !important;
  line-height: 2 !important;
}

html.a11y-no-anim *,
html.a11y-no-anim *::before,
html.a11y-no-anim *::after {
  animation: none !important;
  transition: none !important;
}

html.a11y-big-cursor,
html.a11y-big-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M8 4 L8 26 L14 20 L18 28 L21 27 L17 19 L24 19 Z' fill='black' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") 0 0, auto !important; }
