/* ===== Accessibility Widget + WCAG 2.2 Enhancements ===== */

/* Skip link — visually hidden until focused */
.a11y-skip-link {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #b45309; /* amber-700 */
  color: #fff;
  padding: 0.6rem 1.25rem;
  border-radius: 0 0 0.375rem 0.375rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: top 0.2s ease;
}
.a11y-skip-link:focus {
  top: 0;
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

/* Floating launcher button — 2.75rem (44px) on all viewports,
   the WCAG 2.5.5 minimum target size. */
#a11yLauncher {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;   /* 44px — WCAG 2.5.5 minimum */
  height: 2.75rem;  /* 44px */
  border-radius: 9999px;
  background: #b45309; /* amber-700 */
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px -6px rgba(120, 53, 15, 0.45);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
@media (min-width: 640px) {
  #a11yLauncher { right: 1.25rem; bottom: 1.25rem; }
}
#a11yLauncher:hover { background: #92400e; /* amber-800 */ transform: scale(1.06); }
#a11yLauncher:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}
#a11yLauncher i { font-size: 1.05rem; }

/* Panel */
#a11yPanel {
  position: fixed;
  right: 1rem;
  bottom: 4.75rem;
  z-index: 95;
  width: 19rem;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e7e5e4; /* stone-200 */
  border-radius: 0.75rem;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.25);
  font-family: 'Inter', sans-serif;
  color: #292524; /* stone-800 */
  display: none;
}
@media (min-width: 640px) {
  #a11yPanel { right: 1.25rem; bottom: 5.25rem; max-width: calc(100vw - 2.5rem); }
}
#a11yPanel.open { display: block; }
#a11yPanel:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

#a11yPanel .a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e7e5e4;
  background: #fafaf9; /* stone-50 */
  border-radius: 0.75rem 0.75rem 0 0;
}
#a11yPanel .a11y-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1c1917; /* stone-900 */
  margin: 0;
}
#a11yPanel .a11y-close {
  background: none;
  border: none;
  color: #78716c; /* stone-500 */
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem 0.4rem;
  border-radius: 0.25rem;
}
#a11yPanel .a11y-close:hover { color: #b45309; }
#a11yPanel .a11y-close:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }

#a11yPanel .a11y-body { padding: 0.5rem 1rem 1rem; }

#a11yPanel .a11y-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #78716c;
  margin: 0.75rem 0 0.4rem;
}

/* Toggle buttons */
#a11yPanel .a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
#a11yPanel .a11y-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  background: #fafaf9;
  color: #44403c; /* stone-700 */
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
#a11yPanel .a11y-btn:hover { background: #f5f5f4; border-color: #d6d3d1; }
#a11yPanel .a11y-btn:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }
#a11yPanel .a11y-btn i { color: #b45309; font-size: 0.85rem; width: 1rem; text-align: center; }
#a11yPanel .a11y-btn.active {
  background: #b45309;
  border-color: #b45309;
  color: #fff;
}
#a11yPanel .a11y-btn.active i { color: #fff; }

/* Size stepper row */
#a11yPanel .a11y-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
#a11yPanel .a11y-stepper .a11y-step-btn {
  flex: 1;
  padding: 0.5rem 0;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  background: #fafaf9;
  color: #44403c;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
#a11yPanel .a11y-step-btn:hover { background: #f5f5f4; }
#a11yPanel .a11y-step-btn:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }
#a11yPanel .a11y-stepper .a11y-size-val {
  font-size: 0.75rem;
  color: #78716c;
  min-width: 3rem;
  text-align: center;
}

#a11yPanel .a11y-reset {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.6rem;
  border: 1px solid #d6d3d1;
  border-radius: 0.5rem;
  background: #fff;
  color: #44403c;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
#a11yPanel .a11y-reset:hover { background: #f5f5f4; }
#a11yPanel .a11y-reset:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }

#a11yPanel .a11y-foot-note {
  margin-top: 0.75rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #a8a29e;
  text-align: center;
}

/* Accessibility statement link inside the widget */
#a11yPanel .a11y-statement-link {
  display: block;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: #fafaf9;
  border: 1px solid #e7e5e4;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: #b45309;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
#a11yPanel .a11y-statement-link:hover { background: #f5f5f4; border-color: #d6d3d1; }
#a11yPanel .a11y-statement-link:focus-visible { outline: 2px solid #fbbf24; outline-offset: 2px; }

/* ===== Applied accessibility states (toggled on <html>) ===== */

/* High contrast */
html.a11y-contrast {
  filter: contrast(1.35) saturate(1.1);
}
html.a11y-contrast body { background: #fff !important; }
html.a11y-contrast a { text-decoration: underline; }
html.a11y-contrast :focus-visible { outline: 3px solid #000 !important; outline-offset: 2px !important; }

/* Grayscale */
html.a11y-grayscale { filter: grayscale(1); }

/* Readable font — swap serif display for sans, increase legibility */
html.a11y-readable .font-display,
html.a11y-readable .font-sans {
  font-family: 'Inter', 'Arial', sans-serif !important;
  letter-spacing: 0.01em !important;
}

/* Highlight links */
html.a11y-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
html.a11y-links a:focus-visible { outline: 3px solid #b45309 !important; outline-offset: 2px !important; }

/* Reduce motion */
html.a11y-motion * {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Text spacing */
html.a11y-spacing body {
  letter-spacing: 0.08em;
  word-spacing: 0.12em;
  line-height: 1.7 !important;
}
html.a11y-spacing p { line-height: 1.8 !important; }

/* Bigger text — compounding on the 1.1rem (17.6px) baseline */
html.a11y-text-lg { font-size: 1.3rem; }   /* 118% of baseline ≈ 20.8px */
html.a11y-text-xl { font-size: 1.5rem; }    /* 136% of baseline ≈ 24px  */

/* Global focus-visible baseline */
:focus-visible {
  outline: 3px solid #b45309;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Respect prefers-reduced-motion at OS level */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ===== Root font size — 1.1rem (17.6px) default for legibility =====
   All rem-based utilities scale proportionally. This is the permanent
   baseline; the accessibility widget's Large (118%) / X-Large (136%)
   steps compound on top of it. */
html { font-size: 17.6px; }

/* ===== Mobile overflow safeguard =====
   Prevents long nowrap pricing/label text from creating
   horizontal scroll on small viewports, which was pushing
   the floating accessibility launcher off-screen.
   NOTE: overflow-x: clip (not hidden) — `hidden` creates a
   scroll container that breaks position: sticky on the nav. */
html, body { overflow-x: clip; max-width: 100%; }
body { position: relative; }
img, video, canvas, svg, table { max-width: 100%; }

/* Skip link: hidden off-screen until focused by keyboard navigation */
.a11y-skip-link {
  position: fixed !important;
  top: 1rem !important;
  left: 1rem !important;
  z-index: 100000 !important;
  background: #b45309 !important;
  color: #ffffff !important;
  padding: 0.65rem 1.25rem !important;
  border-radius: 0.375rem !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3) !important;
  transform: translateY(-250%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.a11y-skip-link:focus,
.a11y-skip-link:focus-visible {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  outline: 3px solid #fef3c7 !important;
  outline-offset: 2px !important;
}



/* ===== Vagaro Booking Modal ===== */
.booking-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: flex-start; justify-content: center;
  background: rgba(28, 25, 23, 0.7); /* stone-900/70 */
  padding: 1rem;
  overflow-y: auto;
}
.booking-overlay.open { display: flex; }
.booking-modal {
  position: relative;
  width: 100%; max-width: 32rem;
  margin-top: 4rem;
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 25px 60px -15px rgba(0,0,0,0.4);
  overflow: hidden;
}
.booking-close {
  position: absolute; top: 0.6rem; right: 0.6rem; z-index: 2;
  width: 2.5rem; height: 2.5rem; border-radius: 9999px;
  background: #fff; border: 1px solid #e7e5e4; color: #44403c;
  cursor: pointer; font-size: 1.05rem;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.2);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.booking-close:hover { background: #b45309; color: #fff; border-color: #b45309; }
.booking-close:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.booking-iframe {
  width: 100%; height: 75vh; border: 0; display: block;
}
@media (max-width: 640px) {
  .booking-modal { margin-top: 1rem; }
  .booking-iframe { height: 80vh; }
}
