:root {
  --moai-a11y-font-scale: 1;
  --moai-a11y-panel-bg: #ffffff;
  --moai-a11y-panel-text: #111111;
  --moai-a11y-border: #d7d7d7;
  --moai-a11y-accent: #0b5fff;
}

html {
  font-size: calc(100% * var(--moai-a11y-font-scale));
}

.moai-a11y-trigger {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99998;
  border: 0;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  padding: 4px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.moai-a11y-trigger-icon {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  fill: currentColor;
}

.moai-a11y-panel {
  position: fixed;
  right: 1rem;
  bottom: 4.5rem;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(80vh, 42rem);
  overflow: auto;
  z-index: 99999;
  background: var(--moai-a11y-panel-bg);
  color: var(--moai-a11y-panel-text);
  border: 1px solid var(--moai-a11y-border);
  border-radius: 0.75rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.28);
}

.moai-a11y-panel.is-open {
  animation: moai-a11y-slide-in 0.18s ease-out;
}

@keyframes moai-a11y-slide-in {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.moai-a11y-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--moai-a11y-border);
}

.moai-a11y-header h2 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.2;
}

.moai-a11y-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.7rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.moai-a11y-content {
  padding: 0.8rem 1rem 1rem;
}

.moai-a11y-group {
  margin-bottom: 0.95rem;
}

.moai-a11y-group-title {
  margin: 0 0 0.55rem;
  font-weight: 700;
}

.moai-a11y-group label,
.moai-a11y-group button {
  display: block;
  width: 100%;
  margin-bottom: 0.45rem;
}

.moai-a11y-group button {
  border: 1px solid var(--moai-a11y-border);
  background: #f8f8f8;
  color: inherit;
  text-align: left;
  border-radius: 0.4rem;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}

.moai-a11y-actions-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.moai-a11y-actions-inline button {
  text-align: center;
  margin-bottom: 0;
}

.moai-a11y-sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.moai-a11y-focus-boost :focus-visible,
.moai-a11y-trigger:focus-visible,
.moai-a11y-panel button:focus-visible,
.moai-a11y-panel input:focus-visible {
  outline: 3px solid var(--moai-a11y-accent) !important;
  outline-offset: 2px !important;
}

.moai-a11y-high-contrast {
  background: #000000;
  color: #ffffff;
}

.moai-a11y-high-contrast body,
.moai-a11y-high-contrast body *:not(img):not(video):not(svg):not(path):not(canvas):not(iframe) {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  background-image: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.moai-a11y-high-contrast a {
  color: #ffeb3b !important;
}

.moai-a11y-high-contrast a:visited {
  color: #ffd166 !important;
}

.moai-a11y-high-contrast img,
.moai-a11y-high-contrast video,
.moai-a11y-high-contrast svg,
.moai-a11y-high-contrast canvas,
.moai-a11y-high-contrast iframe {
  background: transparent !important;
}

.moai-a11y-high-contrast .wp-block-spacer {
  background: transparent !important;
  background-color: transparent !important;
  color: inherit !important;
  border-color: transparent !important;
}

.moai-a11y-high-contrast .moai-a11y-contrast-exempt,
.moai-a11y-high-contrast .moai-a11y-contrast-exempt * {
  background-color: revert !important;
  color: revert !important;
  border-color: revert !important;
  background-image: revert !important;
  box-shadow: revert !important;
  text-shadow: revert !important;
}

.moai-a11y-high-contrast .moai-a11y-contrast-preserve-image {
  background-color: var(--moai-a11y-preserved-bg-color) !important;
  background-image: var(--moai-a11y-preserved-bg-image) !important;
  background-position: var(--moai-a11y-preserved-bg-position) !important;
  background-size: var(--moai-a11y-preserved-bg-size) !important;
  background-repeat: var(--moai-a11y-preserved-bg-repeat) !important;
  background-attachment: var(--moai-a11y-preserved-bg-attachment) !important;
}

.moai-a11y-readable-font .ma_exclude,
.moai-a11y-readable-font .ma_exclude * {
  font-family: revert !important;
  letter-spacing: revert !important;
  word-spacing: revert !important;
  line-height: revert !important;
}

.moai-a11y-highlight-links .ma_exclude a {
  text-decoration: revert !important;
  text-underline-offset: revert !important;
  text-decoration-thickness: revert !important;
}

.moai-a11y-underline-headings .ma_exclude h1,
.moai-a11y-underline-headings .ma_exclude h2,
.moai-a11y-underline-headings .ma_exclude h3,
.moai-a11y-underline-headings .ma_exclude h4,
.moai-a11y-underline-headings .ma_exclude h5,
.moai-a11y-underline-headings .ma_exclude h6 {
  text-decoration: revert !important;
  text-underline-offset: revert !important;
}

.moai-a11y-focus-boost .ma_exclude :focus-visible {
  outline: revert !important;
  outline-offset: revert !important;
}

.moai-a11y-readable-font,
.moai-a11y-readable-font body,
.moai-a11y-readable-font input,
.moai-a11y-readable-font button,
.moai-a11y-readable-font textarea,
.moai-a11y-readable-font select {
  font-family: Arial, Verdana, Tahoma, sans-serif !important;
  letter-spacing: 0.02em;
  word-spacing: 0.08em;
  line-height: 1.55;
}

.moai-a11y-highlight-links a {
  text-decoration: underline !important;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.13em;
}

.moai-a11y-underline-headings h1,
.moai-a11y-underline-headings h2,
.moai-a11y-underline-headings h3,
.moai-a11y-underline-headings h4,
.moai-a11y-underline-headings h5,
.moai-a11y-underline-headings h6 {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.moai-a11y-reduce-motion *,
.moai-a11y-reduce-motion *::before,
.moai-a11y-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

@media (max-width: 640px) {
  .moai-a11y-trigger {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .moai-a11y-panel {
    right: 0.75rem;
    bottom: 4.25rem;
  }
}
