/* ADA accessibility widget (from the live site). */
/* ================================================
   ADA Accessibility Widget — CSS
   Paste into: Website Settings > Custom CSS
   Shows on desktop only (1025px and up)
   ================================================ */

#ada-trigger {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2147483647;
  width: 46px;
  height: 46px;
  background: #005fcc;
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-size: 22px;
  box-shadow: 2px 2px 14px rgba(0,0,0,0.3);
  transition: width 0.2s, background 0.2s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#ada-trigger:hover { background: #0047a3; width: 52px; }
#ada-trigger:focus-visible { outline: 3px solid #ffdd57; outline-offset: 2px; }

#ada-skip {
  position: fixed;
  top: -999px;
  left: 8px;
  z-index: 2147483647;
  background: #005fcc;
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
#ada-skip:focus { top: 0; outline: 3px solid #ffdd57; }

#ada-panel {
  position: fixed;
  left: -310px;
  top: 0;
  height: 100vh;
  width: 290px;
  background: #fff;
  color: #111;
  z-index: 2147483646;
  box-shadow: 4px 0 32px rgba(0,0,0,0.2);
  overflow-y: auto;
  transition: left 0.28s cubic-bezier(.4,0,.2,1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  box-sizing: border-box;
}
#ada-panel.ada-open { left: 0; }
#ada-panel * { box-sizing: border-box; }

#ada-panel-head {
  background: #005fcc;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#ada-panel-head h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  padding: 0;
  color: #fff;
  line-height: 1.3;
  border: none;
  background: none;
  text-transform: none;
  letter-spacing: normal;
}
#ada-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  border-radius: 4px;
  box-shadow: none;
  transition: background 0.15s;
}
#ada-close:hover { background: rgba(255,255,255,0.2); }
#ada-close:focus-visible { outline: 2px solid #ffdd57; }

#ada-panel .ada-sec {
  padding: 14px 16px;
  border-bottom: 1px solid #ebebeb;
  margin: 0;
  background: none;
}
#ada-panel .ada-sec-title {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin: 0 0 10px 0;
  padding: 0;
  border: none;
  background: none;
  line-height: 1.4;
}
#ada-panel .ada-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  list-style: none;
}
#ada-panel .ada-btn {
  background: #f5f5f7;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #222;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  line-height: 1.3;
  width: 100%;
  margin: 0;
  box-shadow: none;
  text-decoration: none;
  font-family: inherit;
  outline: none;
}
#ada-panel .ada-btn .ada-ico { font-size: 18px; line-height: 1; display: block; }
#ada-panel .ada-btn:hover { background: #deeaff; border-color: #005fcc; }
#ada-panel .ada-btn:focus-visible { outline: 3px solid #005fcc; outline-offset: 2px; }
#ada-panel .ada-btn.ada-on { background: #005fcc; color: #fff; border-color: #005fcc; }

#ada-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}
#ada-size-row button {
  width: 36px;
  height: 36px;
  background: #f5f5f7;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  color: #111;
  flex-shrink: 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  box-shadow: none;
  outline: none;
}
#ada-size-row button:hover { background: #005fcc; color: #fff; border-color: #005fcc; }
#ada-size-row button:focus-visible { outline: 3px solid #005fcc; }
#ada-size-val {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  background: #f5f5f7;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 6px 0;
  color: #111;
  margin: 0;
}

#ada-lh-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}
#ada-lh-row input[type=range] {
  flex: 1;
  accent-color: #005fcc;
  cursor: pointer;
}
#ada-lh-val {
  font-size: 12px;
  font-weight: 700;
  color: #111;
  background: #f5f5f7;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 4px 8px;
  min-width: 46px;
  text-align: center;
}

#ada-reset {
  width: 100%;
  padding: 10px;
  background: #fff8e1;
  border: 2px solid #ffc107;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #7a5500;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  display: block;
  text-align: center;
  box-shadow: none;
  outline: none;
  margin: 0;
}
#ada-reset:hover { background: #ffe082; }
#ada-reset:focus-visible { outline: 3px solid #ffc107; }

#ada-panel .ada-note {
  font-size: 10px;
  color: #aaa;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

#ada-reading-line {
  position: fixed;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(220,50,50,0.6);
  box-shadow: 0 0 8px rgba(220,50,50,0.35);
  pointer-events: none;
  z-index: 2147483645;
  display: none;
}

/* Page-wide feature overrides */
html.ada-contrast-dark  { filter: contrast(1.6) brightness(0.88) !important; }
html.ada-contrast-light { filter: contrast(1.5) brightness(1.12) !important; }
html.ada-invert         { filter: invert(1) hue-rotate(180deg) !important; }
html.ada-grayscale      { filter: grayscale(1) !important; }
html.ada-protanopia     { filter: url('#ada-f-prot') !important; }
html.ada-deuteranopia   { filter: url('#ada-f-deut') !important; }
html.ada-tritanopia     { filter: url('#ada-f-trit') !important; }
html.ada-pause *,
html.ada-pause *::before,
html.ada-pause *::after { animation-play-state: paused !important; transition: none !important; }
html.ada-links a        { outline: 3px solid #cc0000 !important; background: rgba(200,0,0,0.08) !important; border-radius: 2px !important; }
html.ada-underline a    { text-decoration: underline !important; text-underline-offset: 3px !important; }
html.ada-spacing *      { letter-spacing: 0.12em !important; word-spacing: 0.2em !important; }

/* Desktop only: hide widget on tablet and mobile */
@media (max-width: 1024px) {
  #ada-trigger,
  #ada-panel,
  #ada-skip,
  #ada-reading-line {
    display: none !important;
  }
}
