/* ===================================================
   Accessibility Widget  —  Park Medical
   =================================================== */

/* ---------- Floating trigger button ---------- */
.a11y-trigger {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: transparent;
  color: #D7A67B;        /* icon renders in accent colour */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s;
  padding: 0;
}
.a11y-trigger:hover {
  color: #2A2220;
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}
/* The SVG already contains the circle — fill the full button area */
.a11y-trigger svg {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

/* ---------- Panel ---------- */
.a11y-panel {
  position: fixed;
  bottom: 94px;
  right: 28px;
  z-index: 99999;
  width: 296px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 20px;
  transform: translateY(14px) scale(0.95);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.18s ease;
}
.a11y-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* ---------- Panel header ---------- */
.a11y-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.a11y-panel__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2A2220;
  margin: 0;
}
.a11y-panel__close {
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.a11y-panel__close:hover { color: #2A2220; }

/* ---------- Font size row ---------- */
.a11y-size-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f6f4f2;
  border-radius: 10px;
  margin-bottom: 12px;
}
.a11y-size-label {
  font-size: 12px;
  color: #666;
  flex: 1;
  white-space: nowrap;
}
.a11y-size-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  color: #2A2220;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
}
.a11y-size-btn:hover {
  background: #f0ebe7;
  border-color: #D7A67B;
}
.a11y-size-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.a11y-size-value {
  font-size: 12px;
  font-weight: 700;
  color: #2A2220;
  min-width: 36px;
  text-align: center;
}

/* ---------- Toggle grid ---------- */
.a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.a11y-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 11px 6px 9px;
  border-radius: 10px;
  border: 1.5px solid #e8e3e0;
  background: #f6f4f2;
  cursor: pointer;
  color: #2A2220;
  font-size: 11px;
  text-align: center;
  font-weight: 500;
  line-height: 1.3;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.a11y-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.a11y-btn:hover {
  background: #efe9e4;
  border-color: #D7A67B;
}
.a11y-btn.is-active {
  background: #2A2220;
  border-color: #2A2220;
  color: #fff;
}

/* ---------- Reset button ---------- */
.a11y-reset {
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1.5px solid #e0dbd8;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: #999;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.a11y-reset:hover {
  color: #2A2220;
  border-color: #2A2220;
}

/* ===================================================
   Body state modifier classes
   =================================================== */

/* High contrast */
html.a11y-contrast {
  filter: contrast(175%) !important;
}
html.a11y-grayscale {
  filter: grayscale(100%) !important;
}
html.a11y-contrast.a11y-grayscale {
  filter: grayscale(100%) contrast(175%) !important;
}

/* Highlight links */
html.a11y-links a {
  outline: 2px solid #D7A67B !important;
  outline-offset: 2px !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

/* Readable / dyslexia-friendly font */
html.a11y-font body,
html.a11y-font p,
html.a11y-font h1, html.a11y-font h2,
html.a11y-font h3, html.a11y-font h4,
html.a11y-font h5, html.a11y-font h6,
html.a11y-font a,
html.a11y-font li,
html.a11y-font span,
html.a11y-font label,
html.a11y-font button,
html.a11y-font input,
html.a11y-font textarea {
  font-family: Georgia, 'Times New Roman', serif !important;
  letter-spacing: 0.04em !important;
  line-height: 1.8 !important;
}

/* Stop animations */
html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Large cursor */
html.a11y-cursor,
html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Cpath d='M8 2 L8 28 L14 22 L19 32 L23 30 L18 20 L26 20 Z' fill='%23000' stroke='%23fff' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 2 2, auto !important;
}
