/* ==========================================================================
   Accessibility Widget – זקסי שטיפת רכב
   מנגנון נגישות (ת"י 5568 / WCAG 2.0 AA)
   ========================================================================== */

:root {
  --acc-main: #44bad8;
  --acc-dark: #333333;
  --acc-white: #ffffff;
  --acc-border: #e2e6e9;
}

/* --------------------------------------------------------------------------
   1. דילוג לתוכן הראשי
   -------------------------------------------------------------------------- */
.acc-skip-link {
  position: absolute;
  inset-inline-start: 50%;
  top: -100px;
  transform: translateX(50%);
  z-index: 100000;
  background-color: var(--acc-main);
  color: var(--acc-white);
  padding: 12px 24px;
  border-radius: 0 0 6px 6px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease-in-out;
}

.acc-skip-link:focus {
  top: 0;
  color: var(--acc-white);
  outline: 3px solid #000000;
}

/* --------------------------------------------------------------------------
   2. כפתור פתיחת התפריט
   -------------------------------------------------------------------------- */
.acc-toggle {
  position: fixed;
  inset-inline-start: 20px;
  bottom: 20px;
  z-index: 99998;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background-color: var(--acc-main);
  color: var(--acc-white);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.acc-toggle:hover,
.acc-toggle:focus {
  background-color: var(--acc-dark);
  transform: scale(1.06);
}

.acc-toggle:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 3px;
}

.acc-toggle svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   3. חלונית הנגישות
   -------------------------------------------------------------------------- */
.acc-panel {
  position: fixed;
  inset-inline-start: 20px;
  bottom: 88px;
  z-index: 99999;
  width: 320px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background-color: var(--acc-white);
  color: var(--acc-dark);
  border: 1px solid var(--acc-border);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  font-family: inherit;
  direction: rtl;
  text-align: right;
}

.acc-panel[hidden] {
  display: none;
}

.acc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background-color: var(--acc-main);
  color: var(--acc-white);
  border-radius: 10px 10px 0 0;
}

.acc-panel-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  color: var(--acc-white);
}

.acc-close {
  border: none;
  background: transparent;
  color: var(--acc-white);
  font-size: 26px;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}

.acc-close:hover,
.acc-close:focus {
  background-color: rgba(0, 0, 0, 0.2);
}

.acc-panel-body {
  padding: 12px;
}

.acc-group-title {
  margin: 10px 4px 6px;
  font-size: 13px;
  font-weight: 700;
  color: #6b6b6b;
  text-transform: none;
}

.acc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.acc-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 78px;
  padding: 8px 4px;
  border: 1px solid var(--acc-border);
  border-radius: 8px;
  background-color: #f7f9fa;
  color: var(--acc-dark);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.acc-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  pointer-events: none;
}

.acc-btn:hover {
  background-color: #e9f6fa;
  border-color: var(--acc-main);
}

.acc-btn:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 2px;
}

.acc-btn[aria-pressed="true"] {
  background-color: var(--acc-main);
  border-color: var(--acc-main);
  color: var(--acc-white);
}

.acc-font-size-value {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #6b6b6b;
  text-align: center;
}

.acc-panel-foot {
  padding: 12px;
  border-top: 1px solid var(--acc-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acc-reset {
  border: 1px solid var(--acc-border);
  background-color: #f7f9fa;
  color: var(--acc-dark);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.acc-reset:hover {
  background-color: #e9f6fa;
  border-color: var(--acc-main);
}

.acc-statement-link {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #1f7f96;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   4. התאמות התצוגה שהמשתמש מפעיל
   -------------------------------------------------------------------------- */

/* ניגודיות גבוהה (כהה) */
html.acc-contrast-dark body,
html.acc-contrast-dark body *:not(.acc-panel):not(.acc-panel *):not(.acc-toggle):not(.acc-toggle *) {
  background-image: none !important;
  background-color: #000000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}

html.acc-contrast-dark body a,
html.acc-contrast-dark body a * {
  color: #4fd1ff !important;
}

/* אלמנטים דקורטיביים (pseudo elements) במצב ניגודיות */
html.acc-contrast-dark body *::before,
html.acc-contrast-dark body *::after {
  background-image: none !important;
  background-color: transparent !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}

html.acc-contrast-light body *::before,
html.acc-contrast-light body *::after {
  background-image: none !important;
  background-color: transparent !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

html.acc-contrast-dark body img,
html.acc-contrast-dark body video {
  background-color: transparent !important;
}

/* ניגודיות בהירה */
html.acc-contrast-light body,
html.acc-contrast-light body *:not(.acc-panel):not(.acc-panel *):not(.acc-toggle):not(.acc-toggle *) {
  background-image: none !important;
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

html.acc-contrast-light body a,
html.acc-contrast-light body a * {
  color: #0000cc !important;
}

/* גווני אפור */
html.acc-grayscale body {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
}

/* היפוך צבעים */
html.acc-invert body {
  filter: invert(100%);
  -webkit-filter: invert(100%);
}

html.acc-invert body img,
html.acc-invert body video,
html.acc-invert body .acc-panel,
html.acc-invert body .acc-toggle {
  filter: invert(100%);
  -webkit-filter: invert(100%);
}

/* הדגשת קישורים */
html.acc-underline-links body a:not(.acc-toggle):not(.acc-close) {
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

/* גופן קריא */
html.acc-readable-font body,
html.acc-readable-font body *:not(em[class*="bx"]):not(i[class*="bx"]) {
  font-family: Arial, "Segoe UI", Tahoma, sans-serif !important;
  letter-spacing: 0.4px;
}

/* ריווח שורות מוגדל */
html.acc-line-spacing body,
html.acc-line-spacing body p,
html.acc-line-spacing body li,
html.acc-line-spacing body span,
html.acc-line-spacing body a {
  line-height: 2 !important;
}

/* עצירת אנימציות */
html.acc-stop-animations body *,
html.acc-stop-animations body *::before,
html.acc-stop-animations body *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* הדגשת מיקוד המקלדת */
html.acc-highlight-focus body :is(a, button, input, select, textarea, [tabindex]):focus {
  outline: 4px solid #ff6a00 !important;
  outline-offset: 2px !important;
}

/* סמן עכבר גדול */
html.acc-big-cursor body,
html.acc-big-cursor body * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='58' height='58' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l14 9-6 1.5L16 20l-3 1-3-7.5L5 17z' fill='%23000' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E")
      4 4,
    auto !important;
}

/* העדפת מערכת: צמצום תנועה */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   5. מובייל
   -------------------------------------------------------------------------- */
@media (max-width: 575px) {
  .acc-toggle {
    width: 50px;
    height: 50px;
    inset-inline-start: 12px;
    bottom: 12px;
  }

  .acc-panel {
    inset-inline-start: 12px;
    inset-inline-end: 12px;
    bottom: 74px;
    width: auto;
  }

  .acc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   6. עמוד הצהרת הנגישות
   -------------------------------------------------------------------------- */
.accessibility-statement-area {
  padding: 60px 0;
}

.accessibility-statement-area .statement-wrap {
  background-color: var(--acc-white);
  border: 1px solid var(--acc-border);
  border-radius: 10px;
  padding: 30px;
  line-height: 1.9;
  font-size: 16px;
  color: #444444;
}

.accessibility-statement-area h1 {
  font-size: 26px;
  margin-bottom: 18px;
}

.accessibility-statement-area h2 {
  font-size: 20px;
  margin: 28px 0 10px;
  color: var(--acc-dark);
}

.accessibility-statement-area h3 {
  font-size: 17px;
  margin: 20px 0 6px;
  color: var(--acc-dark);
}

.accessibility-statement-area ul {
  padding-inline-start: 22px;
  margin-bottom: 14px;
  list-style: disc;
}

.accessibility-statement-area li {
  margin-bottom: 6px;
}

.accessibility-statement-area a {
  color: #1f7f96;
  text-decoration: underline;
}
