/* ==========================================================================
   SFUP — Accessibility widget
   Include this file on every page. Works with assets/js/accessibility.js.
   ========================================================================== */

#a11y-widget {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 9999;
  font-family: "Karla", Arial, sans-serif;
}

#a11y-toggle {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  border: none;
  background: var(--navy, #16233f);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

#a11y-toggle:hover,
#a11y-toggle:focus-visible {
  background: var(--rust, #8b3a26);
}

#a11y-panel {
  position: absolute;
  right: 0;
  bottom: 3.8rem;
  width: 15.5rem;
  background: #fff;
  color: #18140f;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  padding: 0.9rem;
  display: none;
}

#a11y-panel.open {
  display: block;
}

#a11y-panel h2 {
  font-size: 0.85rem;
  text-transform: none;
  margin: 0 0 0.6rem;
  font-family: "Karla", Arial, sans-serif;
  font-weight: 700;
}

.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.a11y-row span {
  font-size: 0.85rem;
}

.a11y-btn-group {
  display: flex;
  gap: 0.35rem;
}

.a11y-btn {
  border: 1px solid #d8d2c4;
  background: #f6f1e4;
  color: #18140f;
  border-radius: 6px;
  width: 2rem;
  height: 2rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.a11y-btn:hover,
.a11y-btn:focus-visible {
  border-color: var(--rust, #8b3a26);
  color: var(--rust, #8b3a26);
}

.a11y-switch {
  position: relative;
  width: 2.6rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #d8d2c4;
  border: none;
  cursor: pointer;
}

.a11y-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.a11y-switch[aria-pressed="true"] {
  background: var(--rust, #8b3a26);
}

.a11y-switch[aria-pressed="true"]::after {
  transform: translateX(1.1rem);
}

#a11y-reset {
  width: 100%;
  margin-top: 0.2rem;
  border: none;
  background: transparent;
  color: var(--navy, #16233f);
  text-decoration: underline;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0;
}

/* Applied to <html> by the JS */
html.a11y-contrast {
  filter: contrast(1.12) saturate(1.05);
}

html.a11y-contrast body {
  background: #000 !important;
  color: #fff !important;
}

html.a11y-contrast img,
html.a11y-contrast video {
  filter: grayscale(0.15) contrast(1.05);
}

html.a11y-contrast a {
  color: #ffd166 !important;
}
