/* =====================================================================
   Accessibility Toolbar for OpenCart 3.x / Journal 3
   All selectors are namespaced with .acc- to avoid theme collisions.
   ===================================================================== */

/* ---------- Floating trigger button ---------- */
#acc-widget { position: fixed; bottom: 20px; z-index: 2147483600; font-family: Arial, Helvetica, sans-serif; }
#acc-widget.acc-pos-right { right: 20px; }
#acc-widget.acc-pos-left  { left: 20px; }

#acc-toggle {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.30); transition: transform .15s ease, box-shadow .15s ease;
  padding: 0;
}
#acc-toggle:hover  { transform: scale(1.06); }
#acc-toggle:focus  { outline: 3px solid #ffbf47; outline-offset: 2px; }
#acc-toggle svg    { width: 30px; height: 30px; display: block; }

/* ---------- Panel ---------- */
.acc-panel {
  position: fixed; bottom: 88px; width: 320px; max-width: calc(100vw - 24px);
  max-height: 78vh; overflow-y: auto; background: #ffffff; color: #1a1a1a;
  border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.28);
  padding: 16px; z-index: 2147483601; display: none;
  font-size: 14px; line-height: 1.4;
}
.acc-panel.acc-open { display: block; }
#acc-widget.acc-pos-right .acc-panel { right: 20px; }
#acc-widget.acc-pos-left  .acc-panel { left: 20px; }

.acc-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.acc-panel-head h2 { font-size: 17px; margin: 0; font-weight: 700; color: #111; }
.acc-close { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: #444; padding: 4px 8px; border-radius: 6px; }
.acc-close:hover { background: #eee; }
.acc-close:focus { outline: 3px solid #ffbf47; }

.acc-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; margin: 14px 0 6px; font-weight: 700; }

.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acc-grid.acc-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.acc-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: #f3f4f6; border: 2px solid transparent; border-radius: 10px;
  padding: 10px 6px; cursor: pointer; font-size: 12px; color: #1f2937; text-align: center;
  min-height: 64px; transition: background .12s ease, border-color .12s ease;
}
.acc-btn:hover  { background: #e5e7eb; }
.acc-btn:focus  { outline: 3px solid #ffbf47; outline-offset: 1px; }
.acc-btn .acc-ico { font-size: 20px; line-height: 1; }
.acc-btn.acc-active { background: #dbeafe; border-color: #2563eb; color: #1e3a8a; font-weight: 700; }

.acc-stepper { display: flex; align-items: center; justify-content: space-between; background: #f3f4f6; border-radius: 10px; padding: 6px 8px; }
.acc-stepper button { width: 34px; height: 34px; border: none; border-radius: 8px; background: #2563eb; color: #fff; font-size: 18px; cursor: pointer; line-height: 1; }
.acc-stepper button:hover { background: #1d4ed8; }
.acc-stepper button:focus { outline: 3px solid #ffbf47; }
.acc-stepper .acc-step-label { font-size: 13px; font-weight: 700; color: #111; }

.acc-reset { width: 100%; margin-top: 16px; background: #ef4444; color: #fff; border: none; border-radius: 10px; padding: 11px; font-size: 14px; font-weight: 700; cursor: pointer; }
.acc-reset:hover { background: #dc2626; }
.acc-reset:focus { outline: 3px solid #ffbf47; }

.acc-footnote { margin-top: 10px; font-size: 11px; color: #9ca3af; text-align: center; }

/* =====================================================================
   STATEFUL CLASSES applied to <html>  (prefix html.acc-…)
   ===================================================================== */

/* ----- Readability: link highlight ----- */
html.acc-highlight-links a:not(.acc-btn):not(.acc-close):not(#acc-toggle) {
  text-decoration: underline !important;
  outline: 2px solid #ffbf00 !important;
  outline-offset: 1px !important;
  background: #fff8d6 !important;
  color: #00309c !important;
}

/* ----- Readability: legible / dyslexia-friendly font ----- */
html.acc-readable-font body, html.acc-readable-font body *:not(.acc-ico):not(i):not(.fa):not([class^="fa-"]):not([class*=" fa-"]) {
  font-family: "Heebo", "Rubik", "Assistant", "Trebuchet MS", "Arial Hebrew", Verdana, Tahoma, Arial, sans-serif !important;
}

/* ----- Readability: big cursor ----- */
html.acc-big-cursor, html.acc-big-cursor * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><polygon points="6,4 6,40 16,30 23,44 29,41 22,28 36,28" fill="black" stroke="white" stroke-width="2"/></svg>') 4 4, auto !important;
}

/* ----- Spacing ----- */
html.acc-line-1 body *:not(.acc-panel):not(.acc-panel *) { line-height: 1.6 !important; }
html.acc-line-2 body *:not(.acc-panel):not(.acc-panel *) { line-height: 2.0 !important; }
html.acc-line-3 body *:not(.acc-panel):not(.acc-panel *) { line-height: 2.6 !important; }
html.acc-letter-1 body *:not(.acc-panel):not(.acc-panel *) { letter-spacing: .06em !important; }
html.acc-letter-2 body *:not(.acc-panel):not(.acc-panel *) { letter-spacing: .12em !important; word-spacing: .14em !important; }
html.acc-letter-3 body *:not(.acc-panel):not(.acc-panel *) { letter-spacing: .2em !important; word-spacing: .25em !important; }

/* ----- Motion: pause animations ----- */
html.acc-no-motion *, html.acc-no-motion *::before, html.acc-no-motion *::after {
  animation-duration: .001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001s !important;
  scroll-behavior: auto !important;
}

/* ----- Contrast: high contrast ----- */
html.acc-contrast-high body,
html.acc-contrast-high body *:not(#acc-widget):not(#acc-widget *):not(.acc-panel):not(.acc-panel *) {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.acc-contrast-high body a:not(.acc-btn):not(.acc-close):not(#acc-toggle) { color: #ffff00 !important; }
html.acc-contrast-high body button:not(.acc-btn):not(.acc-close):not(#acc-toggle):not(.acc-reset),
html.acc-contrast-high body input, html.acc-contrast-high body select, html.acc-contrast-high body textarea {
  background-color: #000 !important; color: #fff !important; border: 1px solid #fff !important;
}
html.acc-contrast-high body img { opacity: .85; }

/* ----- Contrast: dark mode ----- */
html.acc-dark body,
html.acc-dark body *:not(#acc-widget):not(#acc-widget *):not(.acc-panel):not(.acc-panel *) {
  background-color: #121212 !important;
  color: #e6e6e6 !important;
  border-color: #2a2a2a !important;
}
html.acc-dark body a:not(.acc-btn):not(.acc-close):not(#acc-toggle) { color: #69b1ff !important; }
html.acc-dark body input, html.acc-dark body select, html.acc-dark body textarea {
  background-color: #1e1e1e !important; color: #e6e6e6 !important; border-color: #3a3a3a !important;
}

/* ----- Reading guide bar (created by JS) ----- */
#acc-reading-guide {
  position: fixed; left: 0; width: 100%; height: 14px; background: rgba(255,196,0,.55);
  border-top: 2px solid #b8860b; border-bottom: 2px solid #b8860b;
  pointer-events: none; z-index: 2147483590; display: none;
}
html.acc-reading-guide #acc-reading-guide { display: block; }

/* ----- Reading mask (created by JS) ----- */
#acc-reading-mask { position: fixed; left: 0; width: 100%; background: rgba(0,0,0,.78); pointer-events: none; z-index: 2147483589; display: none; }
#acc-reading-mask-top { top: 0; }
#acc-reading-mask-bottom { bottom: 0; }
html.acc-reading-mask #acc-reading-mask-top,
html.acc-reading-mask #acc-reading-mask-bottom { display: block; }

/* =====================================================================
   RTL (Hebrew) support
   ===================================================================== */
.acc-panel.acc-rtl { direction: rtl; text-align: right;
  font-family: "Heebo", "Rubik", "Assistant", "Arial Hebrew", Arial, sans-serif; }
.acc-panel.acc-rtl .acc-panel-head { flex-direction: row-reverse; }
.acc-panel.acc-rtl .acc-group-title { text-align: right; }
#acc-widget[dir="rtl"] #acc-toggle s