/* Emergency Dentistry structure. Shared design-system.css owns scale and controls. */
.wdm-emergency-dentistry {
  --teal: var(--wd-teal, #003e51);
  --teal-dark: var(--wd-teal-dark, #002a38);
  --gold: var(--wd-gold, #d4a039);
  --emergency-ink: var(--wd-teal-dark);
  --emergency-body: var(--wd-ink);
  --emergency-line: var(--wd-line);
  --emergency-surface: var(--wd-surface);
  width: 100%; color: var(--emergency-body); background: #fff;
  font: 400 16px/1.68 var(--wd-font-body, Inter, sans-serif);
}
.wdm-emergency-dentistry *, .wdm-emergency-dentistry *::before, .wdm-emergency-dentistry *::after { box-sizing: border-box; }
.wdm-emergency-dentistry .shell { width: var(--shell); margin-inline: auto; min-width: 0; }
.wdm-emergency-dentistry > .section { padding-block: var(--wd-section-space); }
/* Shared location and closing CTA retain their own typography and layout. */
@scope (.wdm-emergency-dentistry) to (.walden-shared) {
:is(h1, h2, h3) {
  margin: 0 0 16px; color: var(--emergency-ink);
  font-family: "Playfair Display", Georgia, serif; font-weight: 600;
  letter-spacing: -.025em; text-wrap: balance; overflow-wrap: normal;
}
h1 { font-size: var(--wd-type-h1); line-height: 1.08; }
h2 { font-size: var(--wd-type-h2); line-height: 1.12; }
h3 { font-size: var(--wd-type-h3); line-height: 1.2; }
p { max-width: 60ch; margin: 0 0 16px; font-size: 16px; line-height: 1.68; }
:is(h2, h3) + p { margin-top: 0; }
p:last-child { margin-bottom: 0; }
.eyebrow {
  margin: 0 0 12px; color: var(--teal); font-size: 12px; font-weight: 700;
  line-height: 1.5; letter-spacing: .12em; text-transform: uppercase;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
/* Button dimensions, colors, focus, and pointer feedback come from the shared system. */
.text-link {
  color: var(--teal); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px;
}
:is(.action-row, .final-actions, .location-actions) .text-link {
  display: inline-flex; align-items: center; min-height: 44px; padding-block: 8px;
}
:is(a, summary):focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .text-link:hover { text-decoration-color: currentColor; }
}

/* The phone action stays ahead of photography at compact widths. */
#emergency-hero {
  display: block; height: auto; min-height: 0; padding: 0; background: #002a38; color: #fff;
}
.wd-hero-main {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center; min-height: 0;
}
#emergency-hero .hero-copy { min-width: 0; max-width: none; }
#emergency-hero h1 { color: #fff; margin-bottom: 20px; }
#emergency-hero .eyebrow { color: #f0c36d; }
#emergency-hero .hero-lead { font-size: 18px; line-height: 1.65; margin-bottom: 0; }
#emergency-hero .hero-support {
  margin: 0; color: #fff;
}
.wd-hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px;
}
#emergency-hero .emergency-directions { color: #f6cf7b; }
#emergency-hero .access-note { color: #dce8eb; margin: 18px 0 0; font-size: .8rem; }
#emergency-hero .hero-media { min-width: 0; width: 100%; margin: 0; }
#emergency-hero .hero-media img {
  width: 100%; max-height: 440px; aspect-ratio: 1.35; object-fit: cover; object-position: center; border-radius: var(--wd-radius-media);
}

/* Medical triage stays complete and comes before the concern categories. */
#urgent-access-and-safety { background: #fff; padding-top: 32px; }
.alert {
  margin: 0 0 48px; padding: 24px; border: 1px solid #edc9c3;
  border-radius: 8px; background: #fff7f5; color: #57201b;
}
.alert .alert-title { margin-bottom: 8px; }
.alert p { max-width: 90ch; }
.section-intro { max-width: 760px; margin-bottom: 32px; }
.issue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.issue-grid article {
  min-width: 0; padding: 24px; border: 1px solid var(--emergency-line); border-top: 3px solid var(--teal);
  border-radius: 8px; background: var(--emergency-surface);
}
.issue-grid h3 { margin-bottom: 8px; }
.inline-note { max-width: 90ch; margin: 32px 0 16px; padding-left: 0; border-left: 0; }
.wdm-urgent-call-note { max-width: 90ch; color: var(--teal-dark); font-weight: 600; }

#emergency-visit { background: var(--teal-dark); color: #deebee; }
#emergency-visit :is(h2, h3) { color: #fff; }
#emergency-visit .eyebrow { color: #f0c36d; }
.process-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding: 0; margin: 0; list-style: none; }
.process-list li { min-width: 0; padding: 24px 0 0; border-top: 1px solid #ffffff55; }
.process-list li::before { content: none; }
.step-number {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  margin-bottom: 16px; border: 1px solid #f0c36d70; border-radius: 50%;
  color: #f0c36d; font-weight: 600; font-variant-numeric: tabular-nums;
}
.process-list h3 { margin: 0 0 12px; }
.care-note { max-width: 90ch; margin: 32px 0 0; color: #c7dade; }

/* Provider and review form one calm, coordinated trust region. */
#emergency-provider, #patient-reviews { background: var(--emergency-surface); }
#emergency-provider { padding-bottom: 48px; }
#patient-reviews { padding-top: 0; }
.provider-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: center; }
.provider-photo { max-width: 448px; }
.provider-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 15%; border-radius: 12px; }
.provider-copy > .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.reviews-layout {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: center;
  padding-top: 48px; border-top: 1px solid var(--emergency-line);
}
.review-card { padding: 32px; border-radius: 12px; background: #fff; }
.review-card blockquote { margin: 0 0 24px; color: var(--emergency-ink); font: 600 clamp(22px, 2vw, 28px)/1.4 "Playfair Display", Georgia, serif; }
.review-card figcaption { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 16px; }
.review-card figcaption a { color: var(--teal); text-underline-offset: 4px; }
:is(.financial-grid, .faq-grid) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
:is(.provider-grid, .reviews-layout, .financial-grid, .faq-grid) > * { min-width: 0; }
.financial-card { padding: 32px; border: 1px solid var(--emergency-line); border-radius: 12px; background: var(--emergency-surface); }
.financial-card .text-link { display: inline-flex; min-height: 44px; align-items: center; }
.factor-list { margin: 24px 0 0; padding: 0; list-style: none; }
.factor-list li { position: relative; padding: 16px 0; border-top: 1px solid var(--emergency-line); }
.factor-list li::before { content: none; }
#emergency-faqs { background: var(--wd-surface-soft); }
.faq-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.faq-list { border-top: 1px solid var(--emergency-line); }
.faq-list details { border-bottom: 1px solid var(--emergency-line); }
.faq-list summary {
  display: block; position: relative; min-height: 56px; padding: 24px 40px 24px 0;
  color: var(--emergency-ink); font: 600 17px/1.5 var(--wd-font-body, Inter, sans-serif);
  list-style: none; cursor: pointer; touch-action: manipulation;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 20px; font-size: 24px; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 16px 24px 0; }

} /* End page-only content scope. */

/* Keep the shared CTA grid intact; related services are a secondary row. */
.wdm-emergency-dentistry .emergency-cta-note { flex-basis: 100%; }
.wdm-emergency-dentistry .emergency-related-services { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 32px; padding-top: 24px; border-top: 1px solid #ffffff40; color: #deebee; font-size: 16px; }
.wdm-emergency-dentistry .emergency-related-services a { display: inline-flex; min-height: 44px; align-items: center; color: #fff; text-decoration-color: var(--gold); text-underline-offset: 5px; }
.wdm-emergency-dentistry #final-cta .text-link { min-height: 44px; }

/* Urgent content, including the injected location, must never wait for a reveal. */
.wdm-emergency-dentistry :is([data-wd-reveal], .wd-reveal-pending) { opacity: 1 !important; transform: none !important; transition: none !important; animation: none !important; }
.wdm-emergency-dentistry .emergency-call-bar { display: none; }
@media (max-width: 1100px) {
  .wdm-emergency-dentistry .process-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wdm-emergency-dentistry :is(.provider-grid, .reviews-layout, .financial-grid, .faq-grid) { gap: 40px; }
}
@media (max-width: 900px) {
  /* Match the compact service-hero spacing used by Same-Day Crowns. */
  .wdm-emergency-dentistry #emergency-hero .hero-main { grid-template-columns: 1fr; padding-block: 24px; gap: 20px; }
  .wdm-emergency-dentistry #emergency-hero .hero-media { max-width: 540px; }
  .wdm-emergency-dentistry #emergency-hero .hero-media img { max-height: 260px; }
  .wdm-emergency-dentistry :is(.provider-grid, .reviews-layout, .financial-grid, .faq-grid) { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 767px) {
  .wdm-emergency-dentistry #urgent-access-and-safety { padding-top: 24px; }
  .wdm-emergency-dentistry .alert { padding: 16px; margin-bottom: 32px; }
  .wdm-emergency-dentistry .issue-grid { grid-template-columns: 1fr; gap: 16px; }
  .wdm-emergency-dentistry .issue-grid article { padding: 24px; }
  .wdm-emergency-dentistry :is(.review-card, .financial-card) { padding: 24px; }
  .wdm-emergency-dentistry .reviews-layout { padding-top: 32px; }
  .wdm-emergency-dentistry #emergency-provider { padding-bottom: 32px; }
  body.emergency-call-page { padding-bottom: var(--emergency-call-clearance, calc(80px + env(safe-area-inset-bottom, 0px))); }
}
/* JS controls visibility; keeping geometry here preserves focus across resizing. */
  .wdm-emergency-dentistry .emergency-call-bar {
    display: block; position: fixed; z-index: 90; bottom: 0; left: 0; right: 0;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    border-top: 1px solid #cad8db; background: #fff; color: var(--emergency-ink); box-shadow: 0 -4px 20px #002a380a;
    opacity: 0; transform: translateY(8px); transition: opacity 160ms ease-out, transform 160ms ease-out;
  }
  .wdm-emergency-dentistry .emergency-call-bar[hidden] { display: none; }
  .wdm-emergency-dentistry .emergency-call-bar.is-visible { opacity: 1; transform: translateY(0); }
  .wdm-emergency-dentistry .emergency-call-bar__inner { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px 16px; max-width: 720px; margin-inline: auto; }
  .wdm-emergency-dentistry .emergency-call-bar__inner > span { min-width: 0; font-size: 16px; font-weight: 600; }
  .wdm-emergency-dentistry .emergency-call-bar .button.button-gold { width: auto; flex: 0 0 auto; padding-inline: 16px; white-space: nowrap; }
  @supports (backdrop-filter: blur(12px)) {
    .wdm-emergency-dentistry .emergency-call-bar { background: #fffffff2; backdrop-filter: blur(12px); }
  }
@media (max-width: 640px) {
  .wdm-emergency-dentistry #emergency-hero .hero-main { padding-block: 18px; gap: 14px; }
  .wdm-emergency-dentistry #emergency-hero .hero-media img { max-height: 170px; }
  .wdm-emergency-dentistry .process-list { grid-template-columns: 1fr; gap: 24px; }
  .wdm-emergency-dentistry .process-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 16px; }
  .wdm-emergency-dentistry .process-list .step-number { grid-row: 1 / 3; margin: 0; }
  .wdm-emergency-dentistry .process-list p { grid-column: 2; }
}
@media (max-width: 340px) {
  .wdm-emergency-dentistry .emergency-call-bar__inner { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more), (forced-colors: active) {
  .wdm-emergency-dentistry .emergency-call-bar { background: #fff; backdrop-filter: none; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wdm-emergency-dentistry .emergency-call-bar { transform: none; transition: none !important; }
}
html[data-wd-input="keyboard"] .wdm-emergency-dentistry .emergency-call-bar { transform: none; transition: none; }
@media print {
  .wdm-emergency-dentistry .emergency-call-bar { display: none !important; }
  body.emergency-call-page { padding-bottom: 0; }
}
