/*
 * BotPilot accessibility widget (ported from The Maze's standalone widget).
 * Preferences only: toggles classes on <html>. The class list here, in the
 * <head> bootstrap (build.py A11Y_BOOTSTRAP) and in a11y.js applyPrefs() must match.
 */
:root { --bpa-accent: #117a3f; --bpa-fill: #25d366; --bpa-on-fill: #0b141a; }
html.a11y-text-115 { font-size: 115%; }
html.a11y-text-130 { font-size: 130%; }
html.a11y-text-150 { font-size: 150%; }
html.a11y-text-115 :is(p,li,td,th,dd,dt,label,input,textarea,select,button,figcaption,blockquote) { font-size: 1.15em !important; }
html.a11y-text-130 :is(p,li,td,th,dd,dt,label,input,textarea,select,button,figcaption,blockquote) { font-size: 1.30em !important; }
html.a11y-text-150 :is(p,li,td,th,dd,dt,label,input,textarea,select,button,figcaption,blockquote) { font-size: 1.50em !important; }
html.a11y-lines-16 :is(p,li,dd,blockquote,a,span) { line-height: 1.6 !important; }
html.a11y-lines-20 :is(p,li,dd,blockquote,a,span) { line-height: 2.0 !important; }
html.a11y-contrast-high body,
html.a11y-contrast-high body *:not(#bp-a11y-trigger):not(#bp-a11y-trigger *):not(#bp-a11y-panel):not(#bp-a11y-panel *) {
  background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important;
}
html.a11y-contrast-high a, html.a11y-contrast-high a * { color: #ffff00 !important; text-decoration: underline !important; }
html.a11y-contrast-invert { filter: invert(1) hue-rotate(180deg); }
html.a11y-contrast-invert :is(img, video, picture, iframe) { filter: invert(1) hue-rotate(180deg); }
html.a11y-contrast-mono { filter: grayscale(1); }
html.a11y-font body,
html.a11y-font body :is(p,li,a,span,h1,h2,h3,h4,h5,h6,button,input,textarea,label,td,th,dd,dt,strong,summary) {
  font-family: Arial, "Segoe UI", Tahoma, "Helvetica Neue", sans-serif !important; letter-spacing: .01em !important;
}
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 2px !important; box-shadow: inset 0 0 0 1px currentColor; }
html.a11y-headings :is(h1,h2,h3,h4,h5,h6) { outline: 2px dashed var(--bpa-accent) !important; outline-offset: 3px !important; }
html.a11y-focus :is(a,button,input,select,textarea,summary,[tabindex]):focus { outline: 3px solid var(--bpa-accent) !important; outline-offset: 2px !important; box-shadow: 0 0 0 6px rgb(37 211 102 / .45) !important; }
html.a11y-reduce-motion *, html.a11y-reduce-motion *::before, html.a11y-reduce-motion *::after {
  animation-duration: .001s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important;
}
html.a11y-cursor-big, html.a11y-cursor-big * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l14 8-6 1.5L16 19l-3 1-3-7.5L5 15z' fill='white' stroke='black' stroke-width='1.2'/%3E%3C/svg%3E") 4 4, auto !important; }
html.a11y-cursor-black, html.a11y-cursor-black * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l14 8-6 1.5L16 19l-3 1-3-7.5L5 15z' fill='black' stroke='white' stroke-width='1.2'/%3E%3C/svg%3E") 3 3, auto !important; }

/* Trigger sits bottom-LEFT; the cookie button sits bottom-right. --bp-cc-offset lifts it above the cookie banner on narrow screens. */
#bp-a11y-trigger {
  position: fixed; left: 16px; right: auto; bottom: calc(16px + var(--bp-cc-offset, 0px) + env(safe-area-inset-bottom)); z-index: 2147483000;
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid #fff; background: var(--bpa-fill); color: var(--bpa-on-fill);
  cursor: pointer; padding: 0; box-shadow: 0 3px 12px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center;
  transition: bottom 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
#bp-a11y-trigger:hover { filter: brightness(1.06); }
#bp-a11y-trigger:focus-visible { outline: 3px solid #0b141a; outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }
#bp-a11y-trigger svg { width: 30px; height: 30px; }
#bp-a11y-panel {
  position: fixed; left: 16px; right: auto; bottom: calc(80px + var(--bp-cc-offset, 0px) + env(safe-area-inset-bottom)); z-index: 2147483000;
  width: 330px; max-width: calc(100vw - 24px); max-height: min(80vh, calc(100vh - 100px - var(--bp-cc-offset, 0px))); overflow: auto;
  background: #fff; color: #111; border: 2px solid var(--bpa-accent); border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.4);
  padding: 14px; direction: rtl; font-family: Assistant, Arial, "Segoe UI", Tahoma, sans-serif; font-size: 15px; line-height: 1.4;
}
#bp-a11y-panel[hidden] { display: none; }
#bp-a11y-panel h2 { font-size: 18px !important; margin: 0 0 10px; color: #111; font-family: inherit !important; }
#bp-a11y-panel .bpa-close { position: absolute; inset-inline-end: 10px; top: 10px; width: 32px; height: 32px; border: none; background: #eee; border-radius: 8px; cursor: pointer; font-size: 18px !important; line-height: 1; color: #111; }
#bp-a11y-panel .bpa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#bp-a11y-panel .bpa-btn { font-size: 14px !important; font-family: inherit !important; text-align: center; padding: 10px 6px; border: 1px solid #c8c8c8; border-radius: 10px; background: #f7f7f7; color: #111; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; justify-content: center; }
#bp-a11y-panel .bpa-btn:hover { background: #ececec; }
#bp-a11y-panel :is(button, a):focus-visible { outline: 3px solid #0b141a; outline-offset: 2px; }
#bp-a11y-panel .bpa-btn[aria-pressed="true"], #bp-a11y-panel .bpa-btn.bpa-on { background: var(--bpa-accent); color: #fff; border-color: var(--bpa-accent); }
#bp-a11y-panel .bpa-btn .bpa-ico { font-size: 20px !important; }
#bp-a11y-panel .bpa-btn .bpa-val { font-size: 12px !important; opacity: .9; }
#bp-a11y-panel .bpa-reset { grid-column: 1 / -1; margin-top: 4px; background: #111; color: #fff; border-color: #111; min-height: 48px; }
#bp-a11y-panel .bpa-reset:hover { background: #2a2a2a; }
#bp-a11y-panel .bpa-note { grid-column: 1 / -1; font-size: 12px !important; color: #555; margin: 8px 0 0; text-align: center; }
#bp-a11y-panel .bpa-note a { color: #0f6e38; }
html.a11y-contrast-invert #bp-a11y-trigger, html.a11y-contrast-invert #bp-a11y-panel { filter: invert(1) hue-rotate(180deg); }
#bp-a11y-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { #bp-a11y-trigger { transition: none; } }
@media print { html[class*="a11y-"] { filter: none !important; } html[class*="a11y-text-"] { font-size: 100% !important; } #bp-a11y-trigger, #bp-a11y-panel { display: none !important; } }
