/* =============================================
   Accessibility Widget — Shared Styles
   Israeli Standard 5568 / WCAG 2.0 AA
   ============================================= */

/* Floating trigger button */
.a11y-trigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1565c0;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
}

.a11y-trigger:hover,
.a11y-trigger:focus-visible {
  background: #0d47a1;
  transform: scale(1.1);
  outline: 3px solid #ffab00;
  outline-offset: 2px;
}

/* Panel */
.a11y-panel {
  position: fixed;
  bottom: 88px;
  left: 20px;
  z-index: 99998;
  width: 300px;
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  color: #1a1a1a;
  border: 2px solid #1565c0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 0;
  display: none;
  font-family: Arial, Tahoma, sans-serif;
  direction: rtl;
}

.a11y-panel.a11y-open {
  display: block;
}

/* Panel header */
.a11y-panel-header {
  background: #1565c0;
  color: #fff;
  padding: 14px 18px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: bold;
}

.a11y-panel-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}

.a11y-panel-close:hover,
.a11y-panel-close:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  outline: 2px solid #ffab00;
}

/* Panel body */
.a11y-panel-body {
  padding: 12px 16px;
}

/* Option buttons */
.a11y-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-family: Arial, Tahoma, sans-serif;
  color: #1a1a1a;
  text-align: right;
  transition: background 0.15s, border-color 0.15s;
}

.a11y-option:hover {
  background: #e3f2fd;
  border-color: #90caf9;
}

.a11y-option:focus-visible {
  outline: 3px solid #ffab00;
  outline-offset: 1px;
}

/* Active state for toggled options */
.a11y-option.a11y-active {
  background: #bbdefb;
  border-color: #1565c0;
  font-weight: bold;
}

.a11y-option-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.a11y-option-label {
  flex: 1;
}

/* Divider */
.a11y-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 8px 0;
  border: none;
}

/* Reset button */
.a11y-reset {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  background: #ef5350;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  font-family: Arial, Tahoma, sans-serif;
}

.a11y-reset:hover {
  background: #c62828;
}

.a11y-reset:focus-visible {
  outline: 3px solid #ffab00;
  outline-offset: 2px;
}

/* Statement link */
.a11y-statement-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 8px;
  color: #1565c0;
  font-size: 14px;
  text-decoration: underline;
}

.a11y-statement-link:hover,
.a11y-statement-link:focus-visible {
  color: #0d47a1;
  outline: 2px solid #ffab00;
  border-radius: 4px;
}

/* =============================================
   Accessibility overrides applied to <html>
   ============================================= */

/* Font size increase levels */
html.a11y-font-1 { font-size: 120% !important; }
html.a11y-font-2 { font-size: 140% !important; }
html.a11y-font-3 { font-size: 160% !important; }

/* High contrast mode */
html.a11y-contrast * {
  background-color: #000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
}

html.a11y-contrast a {
  color: #00ffff !important;
}

html.a11y-contrast img {
  filter: contrast(1.5) !important;
}

/* Keep the widget itself readable in contrast mode */
html.a11y-contrast .a11y-panel,
html.a11y-contrast .a11y-panel * {
  background-color: #1a1a1a !important;
  color: #fff !important;
  border-color: #ffab00 !important;
}

html.a11y-contrast .a11y-panel-header {
  background-color: #0d47a1 !important;
}

html.a11y-contrast .a11y-option.a11y-active {
  background-color: #333 !important;
  border-color: #ffab00 !important;
}

html.a11y-contrast .a11y-trigger {
  background-color: #0d47a1 !important;
  border-color: #ffff00 !important;
}

/* Link highlighting */
html.a11y-links a {
  text-decoration: underline !important;
  outline: 2px solid currentColor !important;
  outline-offset: 2px !important;
}

/* Stop animations */
html.a11y-no-anim,
html.a11y-no-anim * {
  animation: none !important;
  transition: none !important;
}

/* Readable font */
html.a11y-readable-font,
html.a11y-readable-font * {
  font-family: Arial, Tahoma, sans-serif !important;
}

/* Big cursor */
html.a11y-big-cursor,
html.a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M4 4l16 40 6-16 16-6z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 4 4, auto !important;
}
