/* ==========================================================================
   ADA & Section 508 Accessibility Styles
   US Compliance & Universal Design
   ========================================================================== */

/* Accessibility Trigger Button */
.a11y-trigger {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  background: var(--navy-primary, #182859);
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(14, 26, 58, 0.35);
  transition: all 0.25s ease;
}

.a11y-trigger:hover,
.a11y-trigger:focus-visible {
  transform: scale(1.05);
  background: var(--blue-brand, #00689c);
  outline: 3px solid #ffffff;
}

.a11y-trigger i {
  font-size: 1.15rem;
}

/* Accessibility Modal Dialog */
.a11y-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 58, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.a11y-modal-backdrop.active {
  display: flex;
}

.a11y-modal {
  background: #ffffff;
  color: #1a202c;
  width: min(520px, 95vw);
  max-height: 90vh;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid #d6e5ef;
}

.a11y-modal-header {
  padding: 1.25rem 1.5rem;
  background: #182859;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.a11y-modal-header h3 {
  color: #ffffff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.a11y-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.a11y-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.a11y-modal-body {
  padding: 1.5rem;
}

.a11y-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.8rem;
}

.a11y-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.a11y-card-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.a11y-card-btn:hover {
  border-color: #00689c;
  background: #f0f7fc;
}

.a11y-card-btn.active {
  border-color: #00689c;
  background: #e1f0fa;
  box-shadow: 0 0 0 2px #00689c;
}

.a11y-card-btn i {
  font-size: 1.2rem;
  color: #00689c;
}

.a11y-card-btn strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.a11y-card-btn span {
  font-size: 0.75rem;
  color: #64748b;
}

.a11y-modal-footer {
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.a11y-reset-btn {
  background: none;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.a11y-reset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ==========================================================================
   Active Accessibility Modes (Applied to <body> or <html>)
   ========================================================================== */

/* Font Size Scales */
body.a11y-text-md {
  font-size: 1.15rem !important;
}
body.a11y-text-lg {
  font-size: 1.3rem !important;
}
body.a11y-text-xl {
  font-size: 1.45rem !important;
}

/* High Contrast Mode */
body.a11y-high-contrast {
  background-color: #000000 !important;
  color: #ffffff !important;
}
body.a11y-high-contrast section,
body.a11y-high-contrast header,
body.a11y-high-contrast footer,
body.a11y-high-contrast .service-card,
body.a11y-high-contrast .doctor-card,
body.a11y-high-contrast .review-card,
body.a11y-high-contrast .blog-card,
body.a11y-high-contrast .topbar {
  background-color: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}
body.a11y-high-contrast h1,
body.a11y-high-contrast h2,
body.a11y-high-contrast h3,
body.a11y-high-contrast h4,
body.a11y-high-contrast strong,
body.a11y-high-contrast b,
body.a11y-high-contrast p,
body.a11y-high-contrast span {
  color: #ffffff !important;
}
body.a11y-high-contrast a {
  color: #ffff00 !important;
  text-decoration: underline !important;
}

/* High Contrast Light */
body.a11y-contrast-light {
  background-color: #ffffff !important;
  color: #000000 !important;
}
body.a11y-contrast-light * {
  color: #000000 !important;
  border-color: #000000 !important;
}
body.a11y-contrast-light a {
  color: #0000ee !important;
  text-decoration: underline !important;
}

/* Dyslexia Friendly Font */
body.a11y-dyslexic,
body.a11y-dyslexic * {
  font-family: 'Comic Sans MS', 'Arial', sans-serif !important;
  letter-spacing: 0.05em !important;
  word-spacing: 0.1em !important;
}

/* Highlight Links */
body.a11y-highlight-links a {
  background-color: #fef08a !important;
  color: #000000 !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
  padding: 0 3px !important;
  border-radius: 3px !important;
}

/* Large Cursor */
body.a11y-big-cursor,
body.a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='%2300689c' stroke='white' stroke-width='2'%3E%3Cpath d='M3 3l7 18 3-7 7-3L3 3z'/%3E%3C/svg%3E"), auto !important;
}

/* Stop Animations */
body.a11y-stop-anim,
body.a11y-stop-anim * {
  animation: none !important;
  transition: none !important;
}

/* Invert Colors */
body.a11y-invert {
  filter: invert(1) hue-rotate(180deg) !important;
}
body.a11y-invert img,
body.a11y-invert video {
  filter: invert(1) hue-rotate(180deg) !important;
}

/* Reading Guide Bar */
#a11y-reading-guide {
  display: none;
  position: fixed;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(2, 158, 219, 0.7);
  box-shadow: 0 0 10px rgba(2, 158, 219, 0.5);
  pointer-events: none;
  z-index: 10000;
}
body.a11y-guide #a11y-reading-guide {
  display: block;
}

/* ==========================================================================
   Cookie & Privacy Consent Banner
   ========================================================================== */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(14, 26, 58, 0.96);
  color: #ffffff;
  padding: 1.25rem 0;
  z-index: 9990;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
  display: none;
}

.consent-banner.active {
  display: block;
}

.consent-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.consent-text {
  max-width: 780px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.consent-text a {
  color: var(--blue-sky, #029edb);
  text-decoration: underline;
}

.consent-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-consent {
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-consent-accept {
  background: #029edb;
  color: #ffffff;
}

.btn-consent-accept:hover {
  background: #0081b5;
}

.btn-consent-necessary {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-consent-necessary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-consent-pref {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}
