:root {
  --primaryBackground: #005dab;
  --access-line-height: 1.5;
}

body {
  margin: 0;
  font-family: "Roboto Condensed", sans-serif;
  line-height: var(--access-line-height) !important;
}

#accessibility-content {
  font-size: 100%;
  line-height: 1.5;
}

/* overlay */
#accessibility-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 998;
}

/* button */
#accessibility-trigger {
  position: fixed;
  bottom: 75px;
  left: 1.5%;
  width: 55px;
  height: 55px;
  background: var(--primaryBackground)
    url("/wp-content/images/accessibility_v2.png") center/60% no-repeat;
  border: none;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.25s ease;
}

#accessibility-trigger:hover {
  transform: scale(1.05);
}

/* panel */
#accessibility-panel {
  position: fixed;
  bottom: 50px;
  left: 30px;
  width: 420px;
  height: 500px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.96);
  transition: 0.25s ease;
  z-index: 9999;
}
#accessibility-panel.show {
  opacity: 1;
  transform: scale(1);
}

/* prevent scaling */
#accessibility-panel,
#accessibility-panel * {
  font-size: initial !important;
  line-height: normal !important;
}

/* header */
.accessibility-header {
  background: var(--primaryBackground);
  color: #fff;
  padding: 18px;
  text-align: center;
  font-size: 22px;
  position: relative;
}
.accessibility-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 22px;
  cursor: pointer;
}

/* body */
.accessibility-body {
  flex: 1;
  padding: 20px 50px;
  overflow-y: auto;
}
.accessibility-section {
  margin-bottom: 24px;
}

#accessibility-panel .accessibility-section > label {
  font-size: 20px !important;
  font-weight: 700;
  display: block;
  margin-bottom: 12px;
}

.accessibility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.accessibility-toggle {
  padding: 14px;
  border-radius: 14px;
  border: none;
  background: #f2f2f2;
  font-size: 16px;
  cursor: pointer;
}
.accessibility-toggle.active {
  background: var(--primaryBackground);
  color: #fff;
}

/* sliders */
.accessibility-control {
  margin-bottom: 22px;
}
.ctrl-label {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  margin-bottom: 8px;
}
.accessibility-slider {
  width: 100%;
}

/* footer */
.accessibility-footer {
  background: var(--primaryBackground);
  padding: 8px;
  display: flex;
  justify-content: center;
}
#accessibility-reset {
  background: #fff;
  border: none;
  padding: 10px 36px;
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
}

/* visual modes */
html.high-contrast {
  filter: contrast(1.4);
}
html.inverted {
  filter: invert(1) hue-rotate(180deg);
}
html.monochrome {
  filter: grayscale(1);
}

/* reading tools */
.reading-guide {
  position: fixed;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primaryBackground);
  pointer-events: none;
  z-index: 8000;
}
.reading-mask {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8000;
}
.hidden {
  display: none !important;
}
@media (max-width: 768px) {
  #accessibility-panel {
    width: 91% !important;
    left: 20px;
    bottom: 20px;
    border-radius: 0;
    max-width: none;
  }
}
