/* =====================================================
   EVENTOSS — accessibility.css
   תוסף נגישות מקומי | תקן ישראלי 5568 / WCAG 2.0 AA
   ===================================================== */

/* =====================================================
   מצבי נגישות — משפיעים על כל העמוד
   ===================================================== */

/* גודל טקסט */
html.a11y-text-1 body { font-size: 112% !important; }
html.a11y-text-2 body { font-size: 125% !important; }
html.a11y-text-3 body { font-size: 137% !important; }

/* ניגודיות גבוהה */
html.a11y-high-contrast body * {
  background-color: #000000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.a11y-high-contrast a {
  color: #00ffff !important;
  text-decoration: underline !important;
}
html.a11y-high-contrast img,
html.a11y-high-contrast video {
  filter: grayscale(100%) contrast(1.2) !important;
  opacity: 0.85 !important;
}

/* גווני אפור */
html.a11y-grayscale {
  filter: grayscale(100%) !important;
}

/* הדגשת קישורים */
html.a11y-highlight-links a {
  text-decoration: underline !important;
  text-underline-offset: 4px !important;
  background-color: rgba(255, 235, 59, 0.3) !important;
  outline: 2px dashed #e67e22 !important;
  border-radius: 3px !important;
  padding: 1px 3px !important;
}

/* פונט קריא */
html.a11y-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.03em !important;
  word-spacing: 0.05em !important;
}

/* =====================================================
   כפתור פתיחה — FAB
   ===================================================== */
#a11y-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1565c0;
  color: #ffffff;
  border: 3px solid #ffffff;
  cursor: pointer;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(21, 101, 192, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
  outline: none;
}
#a11y-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(21, 101, 192, 0.8);
}
#a11y-fab:focus-visible {
  outline: 3px solid #ffdd57;
  outline-offset: 4px;
}
#a11y-fab svg {
  width: 28px;
  height: 28px;
  display: block;
}

/* =====================================================
   פאנל הנגישות
   ===================================================== */
#a11y-panel {
  position: fixed;
  bottom: 90px;
  left: 24px;
  width: 272px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 999998;
  direction: rtl;
  font-family: inherit;
  overflow: hidden;
  display: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
#a11y-panel.a11y-panel--open {
  display: block;
  animation: a11yFadeUp 0.2s ease-out;
}
@keyframes a11yFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* כותרת הפאנל */
.a11y-header {
  background: #1565c0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  gap: 8px;
}
.a11y-header__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.a11y-header__close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #fff;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.a11y-header__close:hover   { background: rgba(255, 255, 255, 0.35); }
.a11y-header__close:focus-visible { outline: 2px solid #ffdd57; outline-offset: 2px; }

/* גוף הפאנל */
.a11y-body {
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.a11y-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin: 0;
}

/* שורת גודל טקסט */
.a11y-text-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.a11y-level-dots {
  display: flex;
  gap: 4px;
  flex: 1;
  padding-right: 2px;
}
.a11y-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  transition: background 0.2s;
}
.a11y-level-dot.a11y-dot--on {
  background: #1565c0;
}
.a11y-step-btn {
  width: 34px;
  height: 34px;
  border: 2px solid #d0d0d0;
  border-radius: 7px;
  background: #f5f7fa;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  padding: 0;
  color: #333;
  flex-shrink: 0;
  user-select: none;
}
.a11y-step-btn:hover {
  border-color: #1565c0;
  background: #e3f2fd;
  color: #1565c0;
}
.a11y-step-btn:focus-visible {
  outline: 2px solid #1565c0;
  outline-offset: 2px;
}
.a11y-step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* קו מפריד */
.a11y-divider {
  height: 1px;
  background: #eeeeee;
  margin: 1px 0;
}

/* כפתורי טוגל */
.a11y-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 2px solid #e2e6ea;
  border-radius: 9px;
  background: #f8f9fa;
  cursor: pointer;
  font-size: 13.5px;
  color: #333;
  text-align: right;
  width: 100%;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: inherit;
  position: relative;
}
.a11y-toggle-btn:hover {
  border-color: #1565c0;
  background: #e3f2fd;
}
.a11y-toggle-btn:focus-visible {
  outline: 2px solid #1565c0;
  outline-offset: 2px;
}
.a11y-toggle-btn[aria-pressed="true"] {
  border-color: #1565c0;
  background: #e3f2fd;
  color: #1565c0;
  font-weight: 600;
}
.a11y-toggle-btn[aria-pressed="true"]::before {
  content: '✓';
  position: absolute;
  left: 11px;
  color: #1565c0;
  font-size: 14px;
  font-weight: 800;
}
.a11y-btn-icon {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}
.a11y-btn-text {
  flex: 1;
}

/* פוטר — כפתור איפוס */
.a11y-footer {
  padding: 6px 12px 12px;
}
.a11y-reset-btn {
  width: 100%;
  padding: 9px 12px;
  background: #fff;
  color: #e53935;
  border: 2px solid #e53935;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.a11y-reset-btn:hover {
  background: #e53935;
  color: #fff;
}
.a11y-reset-btn:focus-visible {
  outline: 2px solid #e53935;
  outline-offset: 2px;
}

/* =====================================================
   עקיפות לווידג'ט עצמו במצב ניגודיות גבוהה
   ===================================================== */
html.a11y-high-contrast #a11y-fab {
  background-color: #000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
  box-shadow: none !important;
}
html.a11y-high-contrast #a11y-panel {
  border: 2px solid #ffff00 !important;
  background-color: #111 !important;
}
html.a11y-high-contrast .a11y-header {
  background-color: #000 !important;
  border-bottom: 2px solid #ffff00 !important;
  color: #ffff00 !important;
}
html.a11y-high-contrast .a11y-header__close {
  background-color: #222 !important;
  color: #ffff00 !important;
  border: 1px solid #ffff00 !important;
}
html.a11y-high-contrast .a11y-toggle-btn {
  background-color: #000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}
html.a11y-high-contrast .a11y-toggle-btn[aria-pressed="true"] {
  background-color: #ffff00 !important;
  color: #000 !important;
}
html.a11y-high-contrast .a11y-toggle-btn[aria-pressed="true"]::before {
  color: #000 !important;
}
html.a11y-high-contrast .a11y-step-btn {
  background-color: #000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}
html.a11y-high-contrast .a11y-step-btn:disabled {
  opacity: 0.3 !important;
}
html.a11y-high-contrast .a11y-section-label {
  color: #ffff00 !important;
  background-color: transparent !important;
}
html.a11y-high-contrast .a11y-level-dot {
  background: #444 !important;
}
html.a11y-high-contrast .a11y-level-dot.a11y-dot--on {
  background: #ffff00 !important;
}
html.a11y-high-contrast .a11y-divider {
  background: #ffff00 !important;
}
html.a11y-high-contrast .a11y-reset-btn {
  background-color: #000 !important;
  color: #ff6b6b !important;
  border-color: #ff6b6b !important;
}
html.a11y-high-contrast .a11y-reset-btn:hover {
  background-color: #ff6b6b !important;
  color: #000 !important;
}

/* מניעת הדגשת קישורים בתוך הווידג'ט עצמו */
html.a11y-highlight-links #a11y-panel a,
html.a11y-highlight-links #a11y-panel button,
html.a11y-highlight-links #a11y-fab {
  background-color: unset !important;
  outline: none !important;
  padding: unset !important;
}

/* ======================================================
   נגישות: Focus visible גלובלי (skip-link style)
   ====================================================== */
*:focus-visible {
  outline: 3px solid #1565c0;
  outline-offset: 3px;
}
