:root {
  --eaa-contrast-filter: brightness(1);
  --eaa-color-filter: saturate(1);
  --eaa-gray-filter: grayscale(0);
}

/* The UI is duplicated into a shadow root at runtime. These host rules keep
   that isolated layer above even highly opinionated themes and builders. */
:host {
  all: initial !important;
  display: block !important;
  height: 0 !important;
  inset: 0 auto auto 0 !important;
  position: fixed !important;
  width: 0 !important;
  z-index: 2147483000 !important;
}
:host .eaa-widget { pointer-events: auto; }

html.eaa-line-height-1 body :where(p, li, dd, dt, blockquote, figcaption, label):not(#eaa-widget *) { line-height: 1.8 !important; }
html.eaa-line-height-2 body :where(p, li, dd, dt, blockquote, figcaption, label):not(#eaa-widget *) { line-height: 2.2 !important; }
html.eaa-text-spacing-1 body :where(p, li, dd, dt, blockquote, figcaption, label, h1, h2, h3, h4, h5, h6):not(#eaa-widget *) { letter-spacing: .08em !important; word-spacing: .16em !important; }
html.eaa-text-spacing-2 body :where(p, li, dd, dt, blockquote, figcaption, label, h1, h2, h3, h4, h5, h6):not(#eaa-widget *) { letter-spacing: .14em !important; word-spacing: .28em !important; }
html.eaa-text-align-1 body :where(p, li, dd, dt, blockquote, figcaption, h1, h2, h3, h4, h5, h6):not(#eaa-widget *) { text-align: left !important; }
html.eaa-text-align-2 body :where(p, dd, dt, blockquote, figcaption, h1, h2, h3, h4, h5, h6):not(#eaa-widget *) { text-align: center !important; }
html.eaa-readable-font body :where(*):not(#eaa-widget, #eaa-widget *) { font-family: Arial, Verdana, Tahoma, sans-serif !important; }

html.eaa-contrast-1 { --eaa-contrast-filter: contrast(1.25); }
html.eaa-contrast-2 { --eaa-contrast-filter: contrast(1.5); }
html.eaa-grayscale { --eaa-gray-filter: grayscale(1); }
html.eaa-saturation { --eaa-color-filter: saturate(1.8); }
html:is(.eaa-contrast-1, .eaa-contrast-2, .eaa-grayscale, .eaa-saturation) body > :not(#eaa-widget) {
  filter: var(--eaa-contrast-filter) var(--eaa-color-filter) var(--eaa-gray-filter) !important;
}
html.eaa-highlight-links body a:not(#eaa-widget *) { background: #ffea00 !important; color: #000 !important; outline: 3px solid #000 !important; text-decoration: underline !important; text-decoration-thickness: .15em !important; }
html.eaa-highlight-headings body :where(h1, h2, h3, h4, h5, h6):not(#eaa-widget *) { background: #ffea00 !important; color: #000 !important; outline: 3px solid #000 !important; }
html.eaa-hide-images body > :where(img, picture, video, canvas):not(#eaa-widget),
html.eaa-hide-images body > :not(#eaa-widget) :where(img, picture, video, canvas) { visibility: hidden !important; }

html.eaa-stop-animations *,
html.eaa-stop-animations *::before,
html.eaa-stop-animations *::after {
  animation-delay: -1ms !important;
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0s !important;
}

html.eaa-big-cursor body,
html.eaa-big-cursor body * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='56' viewBox='0 0 44 56'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='3' d='M3 2v42l11-10 8 19 8-4-8-18h16z'/%3E%3C/svg%3E") 3 2, auto !important;
}

html.eaa-strong-focus body :focus {
  outline: 4px solid #ff3b00 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 2px #fff !important;
}
.eaa-strong-focus-preview :focus {
  outline: 4px solid #ff3b00 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 2px #fff !important;
}

.eaa-widget,
.eaa-widget * { box-sizing: border-box; }
.eaa-widget {
  --eaa-accent: #005ea8;
  color: #17202a;
  direction: ltr;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  position: fixed;
  text-align: left;
  z-index: 2147483000;
}
.eaa-position-right { bottom: 24px; right: 24px; }
.eaa-position-left { bottom: 24px; left: 24px; }
.eaa-trigger {
  align-items: center;
  background: var(--eaa-accent);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .32);
  color: #fff;
  display: flex;
  height: 58px;
  justify-content: center;
  margin-left: auto;
  padding: 0;
  width: 58px;
}
.eaa-position-left .eaa-trigger { margin-left: 0; margin-right: auto; }
.eaa-trigger svg { fill: currentColor; overflow: visible; }
.eaa-trigger svg path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.eaa-trigger,
.eaa-close,
.eaa-control,
.eaa-reset { appearance: none; cursor: pointer; }
.eaa-trigger:hover { filter: brightness(.88); }
.eaa-trigger:focus-visible,
.eaa-panel button:focus-visible { outline: 4px solid #ffbf47; outline-offset: 3px; }
.eaa-panel {
  background: #fff;
  border: 1px solid #bbc4cc;
  border-radius: 14px;
  bottom: 70px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  color: #17202a;
  max-height: min(680px, calc(100vh - 110px));
  overflow: auto;
  padding: 0 16px 16px;
  position: absolute;
  text-transform: none;
  width: min(390px, calc(100vw - 32px));
}
.eaa-position-right .eaa-panel { right: 0; }
.eaa-position-left .eaa-panel { left: 0; }
.eaa-panel[hidden] { display: none !important; }
.eaa-header {
  align-items: center;
  background: var(--eaa-accent);
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin: 0 -16px;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.eaa-header h2 { color: inherit !important; font: 700 20px/1.25 Arial, Helvetica, sans-serif !important; margin: 0 !important; padding: 0 !important; }
.eaa-close { background: transparent; border: 0; color: #fff; font: 400 32px/1 Arial, sans-serif; height: 38px; padding: 0; width: 38px; }
.eaa-intro { color: #344454 !important; font: 400 15px/1.5 Arial, sans-serif !important; margin: 14px 0 !important; }
.eaa-controls { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.eaa-control {
  align-items: center;
  background: #f4f7f9;
  border: 2px solid #d3dbe2;
  border-radius: 9px;
  color: #17202a;
  display: flex;
  font: 600 14px/1.3 Arial, sans-serif;
  gap: 9px;
  min-height: 72px;
  padding: 9px;
  text-align: left;
  text-decoration: none;
  text-transform: none;
}
.eaa-control:hover { background: #e8eef3; border-color: #8495a5; }
.eaa-control.is-active { background: #e7f3ff; border-color: var(--eaa-accent); box-shadow: inset 0 0 0 1px var(--eaa-accent); }
.eaa-control-icon { align-items: center; color: var(--eaa-accent); display: flex; flex: 0 0 32px; font-size: 21px; font-weight: 700; justify-content: center; }
.eaa-control-copy { display: block; min-width: 0; }
.eaa-control-label { color: #17202a !important; display: block; font: 600 14px/1.25 Arial, sans-serif !important; }
.eaa-control-value { color: #536475 !important; display: block; font: 400 12px/1.3 Arial, sans-serif !important; margin-top: 3px; }
.eaa-reset { background: #fff; border: 2px solid var(--eaa-accent); border-radius: 8px; color: var(--eaa-accent); font: 700 14px/1.3 Arial, sans-serif; margin-top: 14px; padding: 11px 14px; width: 100%; }
.eaa-reset:hover { background: #eef7ff; }
.eaa-privacy { color: #536475 !important; font: 400 12px/1.4 Arial, sans-serif !important; margin: 10px 0 0 !important; text-align: center; }
.eaa-powered-by {
  align-items: center;
  border-top: 1px solid #dbe2e8;
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
  padding-top: 11px;
}
.eaa-powered-by > span { color: #687887 !important; font: 400 11px/1.2 Arial, sans-serif !important; letter-spacing: .04em; }
.eaa-powered-by a { border-radius: 4px; display: block; padding: 4px 6px; }
.eaa-powered-by a:hover { background: #eef4f8; }
#eaa-widget .eaa-powered-by img {
  background: transparent !important;
  clip: auto !important;
  clip-path: none !important;
  display: block !important;
  filter: none !important;
  height: 22px !important;
  mask: none !important;
  max-height: 22px !important;
  max-width: 132px !important;
  mix-blend-mode: normal !important;
  object-fit: contain !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  width: 132px !important;
}
.eaa-reading-guide { background: rgba(255, 234, 0, .36); border-bottom: 3px solid #111; border-top: 3px solid #111; display: none; height: 44px; left: 0; pointer-events: none; position: fixed; top: 0; width: 100vw; z-index: 2147482999; }
html.eaa-reading-guide-active .eaa-reading-guide { display: block; }
.eaa-sr-only { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

@media (max-width: 520px) {
  .eaa-position-right { bottom: 14px; right: 14px; }
  .eaa-position-left { bottom: 14px; left: 14px; }
  .eaa-panel { bottom: 66px; max-height: calc(100vh - 96px); width: calc(100vw - 28px); }
  .eaa-controls { grid-template-columns: 1fr; }
  .eaa-control { min-height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .eaa-widget *, .eaa-widget *::before, .eaa-widget *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media print {
  .eaa-widget { display: none !important; }
}
