/**
 * Shree Maatha / SMADH — aligns appointment UI with main site tokens
 * (see service-page :root in Strapi renderers).
 * Load after appointment.min.css
 */
:root {
  --smadh-green: #163020;
  --smadh-ayurveda: #1b5e3f;
  --smadh-btn: #6ca368;
  --smadh-btn-hover: #5d8f59;
  --smadh-btn-border: #86c582;
  --smadh-accent: #c4a45c;
  --smadh-accent-soft: rgba(196, 164, 92, 0.18);
  --smadh-cream: #f7f4ee;
  --smadh-beige: #f6f6f6;
  --smadh-text: #2d3748;
  --smadh-text-muted: #4a5568;
  /* Hero / depth */
  --appt-hero-deep: #112a1c;
  --appt-hero-mid: #1b4d33;
  /* Wider than Tailwind 7xl (80rem) — `appointment.min.css` omits max-w-5xl–7xl so HTML caps were ignored */
  --appt-content-max: min(100%, 100rem);
}

/* Centered main column — real max-width (see :root --appt-content-max) */
#appointment-app-root > main {
  width: 100%;
  max-width: var(--appt-content-max);
  margin-left: auto;
  margin-right: auto;
}

#appointment-app-root main .appt-success-wrap {
  max-width: var(--appt-content-max);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Selection grids: 1 col → 2 (sm) → 3 (lg) so cards stay large (not 7–8 per row) */
.appt-grid-concerns,
.appt-grid-departments {
  display: grid;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .appt-grid-concerns,
  .appt-grid-departments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.125rem;
  }
}
@media (min-width: 1024px) {
  .appt-grid-concerns,
  .appt-grid-departments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* ── Page chrome ── */
.appt-page-bg {
  background: linear-gradient(
    180deg,
    var(--smadh-beige) 0%,
    var(--smadh-cream) 45%,
    #eef4ef 100%
  );
  color: var(--smadh-text);
}

.appt-hero {
  background: linear-gradient(
    135deg,
    var(--appt-hero-deep) 0%,
    var(--smadh-green) 38%,
    var(--smadh-ayurveda) 100%
  );
  position: relative;
  /* Vertical padding for this block (defined here so main-site Tailwind can’t strip utilities) */
  padding: 2.5rem 1rem 5rem;
}

@media (min-width: 640px) {
  .appt-hero {
    padding-top: 3rem;
    padding-bottom: 6rem;
  }
}

.appt-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 80% at 100% 0%, rgba(196, 164, 92, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 45% at 0% 100%, rgba(134, 195, 130, 0.12), transparent 50%);
  pointer-events: none;
}

.appt-hero-eyebrow {
  color: rgba(196, 164, 92, 0.95);
  letter-spacing: 0.2em;
}

.appt-hero-sub {
  color: rgba(231, 244, 232, 0.88);
}

.appt-badge-suggested {
  background: linear-gradient(135deg, var(--smadh-accent) 0%, #d4b46a 100%);
  color: var(--smadh-green);
  font-weight: 800;
}

/* Match main-site CTA green (Tailwind `brand` was generic teal) */
.bg-brand {
  background-color: var(--smadh-btn) !important;
}
.text-brand {
  color: var(--smadh-btn) !important;
}
.border-brand {
  border-color: var(--smadh-btn) !important;
}
.bg-brand\/10 {
  background-color: rgba(108, 163, 104, 0.12) !important;
}
.ring-brand\/20 {
  --tw-ring-color: rgba(108, 163, 104, 0.22) !important;
}
.ring-brand\/25 {
  --tw-ring-color: rgba(108, 163, 104, 0.28) !important;
}
.hover\:border-brand:hover {
  border-color: var(--smadh-btn) !important;
}
.focus\:border-brand:focus {
  border-color: var(--smadh-btn) !important;
}
.focus\:ring-brand:focus {
  --tw-ring-color: var(--smadh-btn) !important;
}
.focus-within\:ring-brand:focus-within {
  --tw-ring-color: var(--smadh-btn) !important;
}

/* Softer card lift — forest-tinted shadow (replaces shadow-xl + emerald) */
.appt-card-shadow {
  box-shadow:
    0 20px 25px -5px rgba(22, 48, 32, 0.07),
    0 8px 10px -6px rgba(22, 48, 32, 0.06);
}

.appt-glass {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

/* Main flow panel — white into cream (replaces generic slate-50) */
.appt-flow-surface {
  background: linear-gradient(180deg, #fff 0%, rgba(247, 244, 238, 0.55) 55%, rgba(246, 246, 246, 0.35) 100%);
}

/* Step 7: sit on page gradient — no white shell above confirmation */
.appt-flow-surface--success {
  background: transparent;
}

.appt-summary-chip {
  border-color: rgba(134, 195, 130, 0.35);
  background: linear-gradient(90deg, rgba(108, 163, 104, 0.1) 0%, rgba(255, 255, 255, 0.92) 100%);
}

.appt-total-strip {
  background: linear-gradient(135deg, var(--smadh-green) 0%, #142a1f 100%);
  border: 1px solid rgba(196, 164, 92, 0.25);
}

.appt-total-strip .appt-total-label {
  color: rgba(196, 164, 92, 0.95);
}

/* Success step */
.appt-success-ring {
  background: linear-gradient(145deg, var(--smadh-accent-soft), rgba(108, 163, 104, 0.15));
}

.avatar-placeholder {
  background: linear-gradient(135deg, var(--smadh-green) 0%, var(--smadh-btn) 55%, var(--smadh-ayurveda) 100%) !important;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drag-active {
  border-color: var(--smadh-btn) !important;
  background-color: rgba(108, 163, 104, 0.08) !important;
}

/* Progress step labels — deep green instead of teal-800 */
.appt-step-label-active {
  color: var(--smadh-green);
}

/* Sticky bar — brand-tinted lift */
.appt-sticky-actions {
  box-shadow: 0 -10px 36px -14px rgba(22, 48, 32, 0.18);
  border-top-color: rgba(134, 195, 130, 0.35);
}

/* Optional footer strip on raw static page */
.appt-mini-footer {
  border-top: 1px solid rgba(22, 48, 32, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.appt-mini-footer a.text-brand-muted {
  color: var(--smadh-ayurveda);
}
.appt-mini-footer a:hover {
  color: var(--smadh-btn);
}

/* Tone down generic Tailwind “emerald” tints toward SMADH cream + sage */
.from-emerald-50\/80 {
  --tw-gradient-from: rgba(247, 244, 238, 0.92) var(--tw-gradient-from-position);
  --tw-gradient-to: rgba(236, 253, 245, 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.from-emerald-50\/90 {
  --tw-gradient-from: rgba(247, 244, 238, 0.96) var(--tw-gradient-from-position);
  --tw-gradient-to: rgba(236, 253, 245, 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.bg-emerald-50\/70 {
  background-color: rgba(108, 163, 104, 0.1) !important;
}

.bg-emerald-50\/40,
.hover\:bg-emerald-50\/40:hover {
  background-color: rgba(108, 163, 104, 0.07) !important;
}

.bg-emerald-50\/30 {
  background-color: rgba(108, 163, 104, 0.06) !important;
}

.border-emerald-100 {
  border-color: rgba(134, 195, 130, 0.45) !important;
}

.border-emerald-200\/60 {
  border-color: rgba(134, 195, 130, 0.5) !important;
}

.text-emerald-300\/90 {
  color: rgba(196, 164, 92, 0.92) !important;
}

/* Back pill: brand light sage (not deep forest) so it matches site CTAs */
.appt-back-btn {
  color: var(--smadh-btn) !important;
  border-color: rgba(134, 195, 130, 0.9) !important;
}

.appt-back-btn:hover {
  color: var(--smadh-btn-hover) !important;
  background-color: rgba(108, 163, 104, 0.1) !important;
}

/* Step: branch sidebar (left) + doctor grid (right) */
.appt-step-branch-doctor .appt-branch-doctor-split {
  box-shadow:
    0 1px 2px rgba(22, 48, 32, 0.05),
    0 8px 28px rgba(22, 48, 32, 0.06);
}
@media (min-width: 1024px) {
  .appt-step-branch-doctor .appt-doctor-panel {
    background: linear-gradient(
      145deg,
      #ffffff 0%,
      rgba(247, 244, 238, 0.55) 100%
    );
  }
}

.bg-emerald-50\/35 {
  background-color: rgba(108, 163, 104, 0.09) !important;
}

/* Doctor picker cards (step 3 grid) — horizontal layout */
.appt-doctor-card--grid:focus {
  outline: none;
}
.appt-doctor-card--grid:focus-visible {
  outline: 2px solid var(--smadh-btn);
  outline-offset: 2px;
}

/*
 * Injected site header (Strapi renderHeader) uses Tailwind `hidden` + `lg:flex` for desktop nav
 * and `lg:hidden` for the hamburger. appointment.min.css is purged from those utility strings
 * (not scanned from server-rendered header HTML), so .lg:flex / .lg:hidden never ship — desktop
 * nav stayed display:none. Restore the standard lg (1024px) behaviour here.
 */
@media (min-width: 1024px) {
  #main-header nav.lg\:flex {
    display: flex !important;
  }
  #main-header #mobile-menu-btn.lg\:hidden {
    display: none !important;
  }
  #mobile-menu-overlay.lg\:hidden {
    display: none !important;
  }
}

/*
 * Mobile: main site chrome is two fixed strips (topbar + #main-header). On the booking flow that
 * reads as “two headers” and stacks awkwardly with the appointment hero. Use a single nav bar here.
 */
@media (max-width: 1023px) {
  body.appt-page-bg .header-topbar {
    display: none !important;
  }
  body.appt-page-bg #main-header {
    top: 0 !important;
  }
  /* SSR wrapper offset (see appointment-booking-page.ts) — one bar ≈ h-20 */
  body.appt-page-bg .appointment-below-site-header {
    padding-top: 5.25rem !important;
  }
}

/*
 * Department icons: Font Awesome `font-size` must live here — not as Tailwind classes in JS.
 * Otherwise Tailwind purge drops `text-[…rem]` on `<i>` injected via x-html → big empty box, tiny glyph.
 */
.appt-dept-icon-slot {
  line-height: 0;
}
.appt-dept-icon-slot .appt-dept-fa-icon {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}
@media (min-width: 640px) {
  .appt-dept-icon-slot .appt-dept-fa-icon {
    font-size: clamp(2.25rem, 2.6vw, 3.5rem);
  }
}

/* Focus-area row icons: Font Awesome (alpine `apptFocusIcon`); fixed slot size */
.appt-focus-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.appt-focus-card-icon .appt-focus-fa-icon {
  font-size: clamp(1.65rem, 3.5vw, 2.35rem);
  line-height: 1;
  display: block;
}
@media (min-width: 640px) {
  .appt-focus-card-icon {
    width: 3rem;
    height: 3rem;
  }
  .appt-focus-card-icon .appt-focus-fa-icon {
    font-size: clamp(1.9rem, 2.2vw, 2.5rem);
  }
}

#appointment-app-root button.appt-focus-card {
  min-height: 4.5rem;
}
@media (min-width: 640px) {
  #appointment-app-root button.appt-focus-card {
    min-height: 5.25rem;
  }
}

#appointment-app-root button.appt-dept-card {
  min-height: 14rem;
}
@media (min-width: 640px) {
  #appointment-app-root button.appt-dept-card {
    min-height: 15.5rem;
  }
}
