/* ── Accessibility toolbar + site-wide accessibility helpers (IS 5568 / WCAG 2.0 AA support) ── */

/* Skip link — visible when focused with the keyboard */
.dg-skip { position: fixed; top: 10px; left: 10px; z-index: 2147483001; padding: 12px 18px; background: #1F3B5C; color: #fff !important;
  font: 700 15px/1.2 Arial, "Noto Sans Hebrew", sans-serif; border-radius: 8px; text-decoration: none; transform: translateY(-160%); transition: transform .2s ease; }
[dir="rtl"] .dg-skip { left: auto; right: 10px; }
.dg-skip:focus { transform: none; outline: 3px solid #ffbf00; outline-offset: 2px; }

/* Always-visible keyboard focus */
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }

/* Floating button — bottom right */
.dg-a11y { position: fixed; right: 20px; bottom: 20px; z-index: 2147483000; font: 15px/1.4 Arial, "Noto Sans Hebrew", sans-serif; color: #111; }
.dg-a11y *, .dg-a11y *::before { box-sizing: border-box; }
.dg-a11y-btn { width: 58px; height: 58px; border-radius: 50%; border: 3px solid #fff; background: #1F3B5C; color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.28); transition: transform .2s ease, background .2s ease; }
.dg-a11y-btn:hover { transform: scale(1.06); background: #173049; }
.dg-a11y-btn:focus-visible { outline: 3px solid #ffbf00; outline-offset: 3px; }
.dg-a11y-btn svg { width: 32px; height: 32px; display: block; }

/* Panel */
.dg-a11y-panel { position: absolute; right: 0; bottom: 72px; width: min(360px, calc(100vw - 40px)); max-height: min(640px, calc(100vh - 120px)); overflow-y: auto;
  background: #fff; color: #111; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35); border: 1px solid #d5d9e0; }
.dg-a11y-panel[hidden] { display: none !important; }
.dg-a11y-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; background: #1F3B5C; color: #fff; border-radius: 16px 16px 0 0; }
.dg-a11y-head h2 { margin: 0; font: 700 17px/1.2 Arial, "Noto Sans Hebrew", sans-serif; color: #fff; letter-spacing: 0; text-transform: none; }
.dg-a11y-close { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: transparent; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.dg-a11y-close:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }
.dg-a11y-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.dg-a11y-size { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #d5d9e0; border-radius: 12px; }
.dg-a11y-size span { font-weight: 700; }
.dg-a11y-size output { min-width: 48px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.dg-a11y-size button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #b9c0cb; background: #f4f6f9; color: #111; font: 700 16px/1 Arial, sans-serif; cursor: pointer; }
.dg-a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dg-a11y-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px; padding: 10px 8px; text-align: center;
  border: 1px solid #d5d9e0; border-radius: 12px; background: #f7f8fa; color: #111; font: 600 13.5px/1.25 Arial, "Noto Sans Hebrew", sans-serif; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.dg-a11y-opt:hover { border-color: #1F3B5C; }
.dg-a11y-opt[aria-pressed="true"] { background: #1F3B5C; border-color: #1F3B5C; color: #fff; }
.dg-a11y-opt .dg-ic { font-size: 20px; line-height: 1; }
.dg-a11y-size button:focus-visible, .dg-a11y-opt:focus-visible, .dg-a11y-reset:focus-visible, .dg-a11y-links a:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }
.dg-a11y-reset { width: 100%; padding: 12px; border-radius: 12px; border: 2px solid #1F3B5C; background: #fff; color: #1F3B5C; font: 700 14px/1 Arial, "Noto Sans Hebrew", sans-serif; cursor: pointer; }
.dg-a11y-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.dg-a11y-links a { color: #1F3B5C; font-weight: 700; text-decoration: underline; }
@media (max-width: 480px) { .dg-a11y { right: 14px; bottom: 14px; } .dg-a11y-btn { width: 52px; height: 52px; } }

/* Pause / play button for auto-playing videos (WCAG 2.2.2) */
.dg-video-toggle { position: absolute; left: 18px; bottom: 18px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; cursor: pointer; font: 700 14px/1 Arial, sans-serif; }
[dir="rtl"] .dg-video-toggle { left: auto; right: 18px; }
.dg-video-toggle:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }

/* ===== Modes (classes on <html>) — the toolbar itself is never affected ===== */
html.a11y-contrast-dark body :not(.dg-a11y):not(.dg-a11y *):not(img):not(video):not(svg):not(svg *) {
  background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important; text-shadow: none !important; box-shadow: none !important; }
html.a11y-contrast-dark body { background: #000 !important; }
html.a11y-contrast-dark body a:not(.dg-a11y *), html.a11y-contrast-dark body a:not(.dg-a11y *) * { color: #ffe600 !important; }
html.a11y-contrast-light body :not(.dg-a11y):not(.dg-a11y *):not(img):not(video):not(svg):not(svg *) {
  background-color: #fff !important; background-image: none !important; color: #000 !important; border-color: #000 !important; text-shadow: none !important; }
html.a11y-contrast-light body { background: #fff !important; }
html.a11y-contrast-light body a:not(.dg-a11y *), html.a11y-contrast-light body a:not(.dg-a11y *) * { color: #0000c8 !important; }
html.a11y-gray body > *:not(.dg-a11y):not(.dg-skip) { filter: grayscale(1) !important; }
html.a11y-links body a:not(.dg-a11y *) { text-decoration: underline !important; text-underline-offset: 3px; outline: 2px solid #ffbf00 !important; outline-offset: 1px; background-color: #fff6c7 !important; color: #000 !important; }
html.a11y-links body a:not(.dg-a11y *) * { color: #000 !important; }
html.a11y-headings body :is(h1,h2,h3,h4,h5,h6):not(.dg-a11y *) { outline: 2px dashed #1a73e8 !important; outline-offset: 4px; }
html.a11y-readable body :not(.dg-a11y *):not(i):not([class*="icon"]) { font-family: Arial, "Noto Sans Hebrew", "Helvetica Neue", sans-serif !important; letter-spacing: normal; }
html.a11y-spacing body :not(.dg-a11y *) { line-height: 1.9 !important; letter-spacing: 0.08em !important; word-spacing: 0.16em !important; }
html.a11y-no-motion *, html.a11y-no-motion *::before, html.a11y-no-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-no-motion .geo-shape { transform: none !important; }
html.a11y-cursor, html.a11y-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'><path d='M6 3 L6 40 L15 31 L22 46 L29 43 L22 28 L35 28 Z' fill='black' stroke='white' stroke-width='3' stroke-linejoin='round'/></svg>") 6 3, auto !important; }
html.a11y-focus body *:focus { outline: 4px solid #ffbf00 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #000 !important; }
html.a11y-hide-img body img:not(.dg-a11y *):not(.header-logo-img), html.a11y-hide-img body video, html.a11y-hide-img body [style*="background-image"] { visibility: hidden !important; }
html.a11y-contrast-dark .header-logo-img { filter: invert(1) !important; }
.dg-a11y-opt:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 60px; }
.dg-a11y-opt .dg-ic { font-size: 22px; }
/* Hover label next to the floating accessibility button (2026-09-30) */
.dg-a11y-btn { position: relative; }
.dg-a11y-tip { position: absolute; right: calc(100% + 12px); top: 50%; transform: translate(6px, -50%); white-space: nowrap;
  background: #1F3B5C; color: #fff; font: 600 14px/1 Arial, "Noto Sans Hebrew", sans-serif; letter-spacing: .02em; padding: 10px 14px; border-radius: 999px;
  box-shadow: 0 8px 22px -8px rgba(0,0,0,.4); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility .2s; }
.dg-a11y-tip::after { content: ""; position: absolute; left: 100%; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-left-color: #1F3B5C; }
.dg-a11y-btn:hover .dg-a11y-tip, .dg-a11y-btn:focus-visible .dg-a11y-tip { opacity: 1; visibility: visible; transform: translate(0, -50%); }
.dg-a11y-btn[aria-expanded="true"] .dg-a11y-tip { display: none; }
@media (prefers-reduced-motion: reduce) { .dg-a11y-tip { transition: none; } }
