/* Site-wide accessibility toolbar */

.hh-a11y-root {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 100000;
  font-family: "Heebo", system-ui, sans-serif;
}

body.hh-v2-sticky-wa-visible .hh-a11y-root {
  bottom: calc(4.5rem + env(safe-area-inset-bottom));
}

.hh-a11y-root__toggle {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hh-a11y-root__toggle:hover,
.hh-a11y-root__toggle:focus-visible {
  background: #c41e3a;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hh-a11y-root__panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.65rem);
  width: min(280px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  padding: 0.85rem;
  color: #1a1a1a;
}

.hh-a11y-root__panel[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.hh-a11y-root:not(.is-open) .hh-a11y-root__panel {
  display: none !important;
  visibility: hidden !important;
}

.hh-a11y-root__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.hh-a11y-root__close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.hh-a11y-root__actions {
  display: grid;
  gap: 0.45rem;
}

.hh-a11y-root__actions button {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f7f7f5;
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-align: right;
}

.hh-a11y-root__actions button:hover,
.hh-a11y-root__actions button.is-active {
  border-color: #c41e3a;
  color: #c41e3a;
}

.hh-a11y-root__stmt {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #666;
  text-decoration: underline;
}

body.hh-a11y-font-1 { font-size: 106%; }
body.hh-a11y-font-2 { font-size: 112%; }
body.hh-a11y-font-3 { font-size: 118%; }
body.hh-a11y-contrast { filter: contrast(1.25); }
body.hh-a11y-grayscale { filter: grayscale(1); }
body.hh-a11y-contrast.hh-a11y-grayscale { filter: contrast(1.25) grayscale(1); }
body.hh-a11y-readable { font-family: Arial, Helvetica, sans-serif !important; }
body.hh-a11y-readable * { font-family: inherit !important; }
body.hh-a11y-links a {
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

@media (max-width: 480px) {
  .hh-a11y-root {
    left: max(0.75rem, env(safe-area-inset-left));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}
