/* Mango Doctors – component layer. Plain CSS so it works with the Tailwind build or the CDN fallback. */
:root {
  /* CoWIN-style teal pair from the reference: dark band #085D5D, main band #097E7E */
  --ink: #085D5D; --brand: #097E7E; --haldi: #CFE8E8; --paper: #F6F6F6; --line: #DCE3E3; --muted: #5B6B6B;
  --text: #1E2B2B; --tint: #EAF5F5;
  --allo: #097E7E; --homeo: #2D6CA8; --ayur: #9A6312;
  --shadow: 0 1px 2px rgba(8, 93, 93, .06), 0 2px 8px rgba(8, 93, 93, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { border-radius: 0 !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 7.5rem; touch-action: manipulation; overscroll-behavior: none; }
body { font-family: 'Hind', system-ui, sans-serif; line-height: 1.6; color: var(--text); }
h1, h2, h3, .font-display { font-family: 'Hind', system-ui, sans-serif; letter-spacing: -0.005em; color: var(--ink); line-height: 1.2; }
.hero-band h1, .hero-band h2 { color: #fff; }
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 3px solid #F5B400; outline-offset: 2px; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.drawer a, .tabbar a, .site-header a:not(.underline) { text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; color: var(--ink); padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }
#main { outline: none; min-height: 60vh; }

/* Route-change progress bar */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: #FFFFFF; box-shadow: 0 0 6px rgba(255,255,255,.7); z-index: 60; opacity: 0; transition: width .3s var(--ease), opacity .2s; }
#progress.is-loading { opacity: 1; }

/* Header: CoWIN-style dark strip over the teal band */
.topstrip { background: var(--ink); color: rgba(255,255,255,.88); }
.mainband { background: var(--brand); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.btn-header { display: inline-flex; align-items: center; padding: .45rem 1rem; color: #fff; border: 1.5px solid rgba(255,255,255,.85); font-weight: 600; font-size: .92rem; transition: background-color .15s, color .15s; }
.btn-header:hover { background: #fff; color: var(--brand); }
.mobile-link.is-active { color: var(--brand); font-weight: 600; box-shadow: inset 4px 0 0 var(--brand); }

/* Logo: a white square with a teal plus */
.logo-mark { width: 28px; height: 28px; background: #fff; position: relative; display: inline-block; }
.logo-mark::before, .logo-mark::after { content: ''; position: absolute; background: var(--brand); }
.logo-mark::before { left: 10px; top: 4px; width: 6px; height: 18px; }
.logo-mark::after { left: 4px; top: 10px; width: 18px; height: 6px; }

.nav-link { position: relative; color: rgba(255,255,255,.92); height: 100%; display: flex; align-items: center; padding: 0 .9rem; }
.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-link.is-active { box-shadow: inset 0 -4px 0 #fff; font-weight: 600; color: #fff; }

/* Buttons */
.btn-primary, .btn-outline, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1.1rem; font-weight: 600; line-height: 1.2; transition: background-color .15s, color .15s, border-color .15s; cursor: pointer; text-align: center; }
.btn-primary { background: var(--brand); color: #fff; border: 2px solid var(--brand); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-outline { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255,255,255,.85); }
.btn-ghost:hover { background: #fff; color: var(--brand); }
button[disabled], .btn-primary[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* Hero */
.hero-band { background: linear-gradient(180deg, var(--brand) 0, var(--brand) 100%); }
.hero-title { font-size: clamp(2.2rem, 6vw, 3.8rem); line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.shadow-card { box-shadow: 0 4px 16px rgba(0,0,0,.14); }
.card { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.sys-block { display: block; padding: 1.5rem; background: #fff; color: var(--text); border-top: 5px solid var(--sys); box-shadow: 0 4px 14px rgba(0,0,0,.12); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.sys-block:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.sys-block-title { display: block; font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1.2; }
.sys-block-allo { --sys: var(--allo); }
.sys-block-homeo { --sys: var(--homeo); }
.sys-block-ayur { --sys: var(--ayur); }

/* Page title band under the header: white with a teal rule, like CoWIN's section headers */
.page-band { background: #fff; border-bottom: 1px solid var(--line); box-shadow: inset 0 3px 0 var(--tint); }

/* Suggestions */
.suggest { position: absolute; left: 0; right: 0; top: 100%; background: #fff; color: var(--text); border: 1px solid var(--line); border-top: 0; box-shadow: 0 8px 20px rgba(0,0,0,.15); z-index: 30; max-height: 22rem; overflow: auto; }
.suggest li a { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.suggest li a:hover, .suggest li a.is-active { background: var(--tint); }

/* Locality grid */
.loc-link { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .9rem 1rem; background: #fff; }
.loc-link:hover { background: var(--brand); color: #fff; }
.loc-link:hover .text-muted { color: rgba(255,255,255,.7); }

/* Listing rows: the coloured left rule encodes the medical system */
.listing-row { display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem 1.25rem; border-left: 5px solid var(--sys, var(--allo)); }
@media (min-width: 640px) { .listing-row { flex-direction: row; align-items: center; } }
.listing-row:hover { background: #FAFDFD; }
.row-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sys-allo { --sys: var(--allo); }
.sys-homeo { --sys: var(--homeo); }
.sys-ayur { --sys: var(--ayur); }
.sys-tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: .05rem .45rem; color: #fff; background: var(--sys, var(--allo)); }

.profile-head { border-left: 8px solid var(--sys); padding-left: 1.25rem; }

/* Forms */
.label { display: block; font-weight: 600; margin-bottom: .35rem; }
.field { width: 100%; background: #fff; border: 1px solid #C9D3D3; padding: .6rem .75rem; color: var(--ink); font: inherit; }
.field:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(9,126,126,.18); }
.field.is-invalid { border-color: #B42318; }
.field-error { color: #B42318; font-size: .9rem; margin-top: .3rem; min-height: 0; }
.field-error:empty { display: none; }
.form-status:empty { display: none; }
.form-status { padding: .6rem .8rem; border-left: 4px solid #B42318; background: #FEF3F2; }
.form-status.is-ok { border-color: var(--brand); background: var(--tint); }
.check { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2rem; }

/* Segmented radio group */
.seg { display: flex; flex-wrap: wrap; border: 1px solid var(--brand); background: #fff; }
.seg-item { flex: 1 1 auto; position: relative; }
.seg-item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-item span { display: block; padding: .5rem .7rem; text-align: center; cursor: pointer; border-right: 1px solid var(--line); }
.seg-item:last-child span { border-right: 0; }
.seg-item input:checked + span { background: var(--brand); color: #fff; }
.seg-item input:checked + span small { color: rgba(255,255,255,.75); }
.seg-item input:focus-visible + span { outline: 3px solid #F5B400; outline-offset: -3px; }
aside .seg { flex-direction: column; }
aside .seg-item span { border-right: 0; border-bottom: 1px solid var(--line); text-align: left; }
aside .seg-item:last-child span { border-bottom: 0; }

/* Pagination */
.page-link { min-width: 2.5rem; padding: .45rem .7rem; text-align: center; border: 2px solid var(--line); background: #fff; }
.page-link:hover { border-color: var(--brand); color: var(--brand); }
.page-link.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Booking widget */
.day-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 4.4rem; overflow-x: auto; border: 1px solid var(--brand); scrollbar-width: thin; }
.day-btn { padding: .5rem .25rem; text-align: center; border-right: 1px solid var(--line); background: #fff; line-height: 1.2; }
.day-btn:last-child { border-right: 0; }
.day-btn .num { display: block; font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.day-btn[aria-pressed="true"] { background: var(--brand); color: #fff; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: 0; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.slot-btn { padding: .5rem .25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; font-size: .92rem; }
.slot-btn:hover:not([disabled]) { background: var(--tint); color: var(--brand); }
.slot-btn[aria-pressed="true"] { background: var(--brand); color: #fff; font-weight: 700; }
.slot-btn[disabled] { color: #A6ADB3; text-decoration: line-through; background: #FAFAFA; cursor: not-allowed; }

/* Account */
.booking-row { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-left: 5px solid var(--line); }
.booking-row.status-confirmed { border-left-color: var(--brand); }
.booking-row.status-requested { border-left-color: #E0A800; }
.booking-row.status-cancelled, .booking-row.status-no_show { opacity: .7; }
.booking-date { width: 3.5rem; text-align: center; flex-shrink: 0; }
.status-pill { display: inline-block; padding: .1rem .5rem; font-weight: 600; font-size: .8rem; border: 1px solid var(--line); }
.status-pill.status-requested { background: #FFF6D6; border-color: #E0A800; }
.status-pill.status-confirmed { background: var(--tint); border-color: var(--brand); color: var(--ink); }
.status-pill.status-cancelled, .status-pill.status-no_show { background: #F4F4F4; color: var(--muted); }

/* Toast */
#toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 12px); background: var(--ink); color: #fff; padding: .8rem 1.2rem; border-left: 5px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.2); z-index: 70; max-width: calc(100vw - 2rem); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s; }
#toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
#toast:empty { display: none; }

/* Page swap: only the incoming content fades, once, so navigation reads as instant */
.page-enter { animation: pageIn .18s var(--ease); }
@keyframes pageIn { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
[aria-busy="true"] { opacity: .55; transition: opacity .15s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Skeleton screens (shown while a page that is not in memory loads) ---------- */
.sk { background: #E3ECEC; position: relative; overflow: hidden; }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: skShimmer 1.1s infinite; }
.sk-dark { background: rgba(255,255,255,.12); }
.sk-dark::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); }
@keyframes skShimmer { to { transform: translateX(100%); } }
.sk-line { height: .9rem; margin: .45rem 0; }
.sk-row { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.25rem; border-left: 5px solid #E3ECEC; background: #fff; }
.sk-row + .sk-row { border-top: 1px solid var(--line); }
.skeleton-page { animation: skIn .12s ease-out; }
@keyframes skIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- First-load preloader ---------- */
#boot { position: fixed; inset: 0; z-index: 100; background: var(--brand); display: flex; align-items: center; justify-content: center; transition: opacity .25s ease, visibility .25s; }
#boot.is-done { opacity: 0; visibility: hidden; }
#boot .boot-mark { width: 56px; height: 56px; position: relative; animation: bootPulse .9s ease-in-out infinite alternate; }
#boot .boot-mark { background: #fff; }
#boot .boot-mark::before, #boot .boot-mark::after { content: ''; position: absolute; background: var(--brand); }
#boot .boot-mark::before { left: 21px; top: 6px; width: 14px; height: 44px; }
#boot .boot-mark::after { left: 6px; top: 21px; width: 44px; height: 14px; }
#boot .boot-bar { position: absolute; left: 0; top: 0; height: 3px; background: #fff; animation: bootBar 1.2s ease-out forwards; }
@keyframes bootPulse { from { transform: scale(.9); } to { transform: scale(1.05); } }
@keyframes bootBar { from { width: 0; } to { width: 85%; } }

@media (prefers-reduced-motion: reduce) {
  .sk::after, #boot .boot-mark, #boot .boot-bar { animation: none !important; }
}


/* =====================================================================
   App shell: makes the site feel like a native Android/iOS app
   ===================================================================== */
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
img, svg { -webkit-user-drag: none; user-drag: none; }
/* UI controls never show text selection or long-press callouts */
a, button, label, nav, header, .tab, .btn-primary, .btn-outline, .btn-ghost, .btn-header, .seg, .day-btn, .slot-btn, .sys-block, .loc-link, .page-link {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
/* In the app, nothing outside form fields is selectable */
html.is-app body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.is-app input, html.is-app textarea, html.is-app [contenteditable] { -webkit-user-select: text; user-select: text; }
/* 16px+ inputs stop phones from zooming in on focus */
input, select, textarea, .field { font-size: 16px; }

.site-header { padding-top: env(safe-area-inset-top, 0); background: var(--brand); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: #fff; }
.icon-btn:active { background: rgba(255,255,255,.15); }

/* Press feedback, like native buttons */
.btn-primary:active, .btn-outline:active, .tab:active, .drawer-links a:active, .listing-row:active, .loc-link:active { transform: scale(.98); }
.btn-primary, .btn-outline, .tab, .drawer-links a { transition: transform .08s ease, background-color .15s, color .15s; }

/* Square spinner (the site has no round shapes) */
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; flex-shrink: 0; }
.spinner[hidden] { display: none; }
.spinner-dark { border-color: rgba(9,126,126,.25); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.is-loading { pointer-events: none; opacity: .85; }
.is-loading::before { content: ''; width: 16px; height: 16px; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }

/* Offline */
.net-banner { display: flex; align-items: center; justify-content: center; gap: .5rem; background: #3F4A4A; color: #fff; font-size: .9rem; padding: .45rem 1rem; }
.net-banner[hidden] { display: none; }
.offline-screen { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 1.5rem; }
.offline-icon { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; background: var(--tint); color: var(--brand); }

/* Bottom tab bar (mobile) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom, 0); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 60px; color: #6B7878; font-size: 11.5px; font-weight: 500; position: relative; background: none; border: 0; }
.tab.is-active { color: var(--brand); font-weight: 700; }
.tab.is-active::before { content: ''; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; background: var(--brand); }
@media (max-width: 767px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0)); }
  #toast { bottom: calc(76px + env(safe-area-inset-bottom, 0)); }
  .site-footer { margin-top: 2.5rem; }
  /* Inside the app, the website footer is replaced by the tab bar */
  html.is-app .site-footer { display: none; }
}

/* Slide-in drawer */
.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .22s ease; }
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 340px); background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s cubic-bezier(.2,.7,.2,1); box-shadow: -8px 0 24px rgba(0,0,0,.18);
  padding-bottom: env(safe-area-inset-bottom, 0); overflow-y: auto; overscroll-behavior: contain; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; background: var(--brand); padding: calc(.75rem + env(safe-area-inset-top, 0)) .75rem .75rem 1rem; }
.drawer-account { padding: 1rem; border-bottom: 1px solid var(--line); }
.drawer-links { display: flex; flex-direction: column; padding: .5rem 0; }
.drawer-links a { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.1rem; color: var(--text); font-weight: 500; }
.drawer-links a svg { color: var(--brand); width: 20px; height: 20px; }
.drawer-links a.is-active { background: var(--tint); color: var(--ink); font-weight: 700; box-shadow: inset 4px 0 0 var(--brand); }
.drawer-label { padding: 1rem 1.1rem .3rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.sys-dot { width: 12px; height: 12px; background: var(--sys); display: inline-block; margin: 0 4px; }
.drawer-emergency { margin-top: auto; display: flex; align-items: center; gap: .7rem; padding: 1rem 1.1rem; background: #FDECEC; color: #9B1C1C; font-weight: 700; }
html.drawer-lock, html.drawer-lock body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .spinner, .is-loading::before { animation-duration: 1.6s !important; }
}

/* =====================================================================
   Mobile smoothness: transitions, sheets, sticky actions (app-style)
   ===================================================================== */
/* Native-style page transitions (View Transitions API; header and tab bar stay put) */
/* Only during a transition, so sheets and bars inside #main can still layer above the tab bar */
html.vt-active #main { view-transition-name: page; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(page) { animation: vtFadeOut .14s ease both; }
::view-transition-new(page) { animation: vtFadeIn .18s ease both; }
@keyframes vtFadeOut { to { opacity: 0; } }
@keyframes vtFadeIn { from { opacity: 0; } }
@media (max-width: 767px) {
  ::view-transition-old(page) { animation: vtOut .22s cubic-bezier(.4,0,.2,1) both; }
  ::view-transition-new(page) { animation: vtIn .26s cubic-bezier(.2,.8,.2,1) both; }
  html[data-nav-dir="back"]::view-transition-old(page) { animation-name: vtOutBack; }
  html[data-nav-dir="back"]::view-transition-new(page) { animation-name: vtInBack; }
}
@keyframes vtIn { from { transform: translateX(32%); opacity: 0; } }
@keyframes vtOut { to { transform: translateX(-14%); opacity: 0; } }
@keyframes vtInBack { from { transform: translateX(-32%); opacity: 0; } }
@keyframes vtOutBack { to { transform: translateX(14%); opacity: 0; } }
html[data-nav-dir="back"] .page-enter { animation-name: pageInBack; }
@keyframes pageInBack { from { opacity: .4; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* Header slides away while scrolling down, returns on scroll up (mobile) */
@media (max-width: 767px) {
  .site-header { transition: transform .24s cubic-bezier(.2,.8,.2,1); will-change: transform; }
  .site-header.is-hidden { transform: translateY(-100%); }
}

/* Smooth momentum scrolling everywhere */
html { scroll-behavior: auto; -webkit-overflow-scrolling: touch; }

/* Filter chips */
.chip-row { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem 1rem; padding: .25rem 1rem; scroll-snap-type: x proximity; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .95rem; border: 1px solid #C9D3D3; background: #fff; font-weight: 500; font-size: .93rem; white-space: nowrap; scroll-snap-align: start; transition: background-color .15s, color .15s, border-color .15s, transform .08s; }
.chip:active { transform: scale(.96); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-filter { border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* Bottom-sheet filters on phones and tablets */
@media (max-width: 1023px) {
  .filters-panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; background: #fff; max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 1.1rem calc(1rem + env(safe-area-inset-bottom, 0)); transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 -10px 30px rgba(0,0,0,.2); visibility: hidden; }
  .filters-panel.is-open { transform: none; visibility: visible; }
  .sheet-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 84; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  .sheet-scrim.is-open { opacity: 1; visibility: visible; }
  .sheet-head { position: sticky; top: 0; z-index: 1; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 0 .8rem; border-bottom: 1px solid var(--line); }
  .sheet-grip { position: absolute; top: 7px; left: 50%; width: 42px; height: 4px; background: #C9D3D3; transform: translateX(-50%); }
  .sheet-x { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
  .sheet-foot { position: sticky; bottom: calc(-1rem - env(safe-area-inset-bottom, 0)); background: #fff; padding: .8rem 0 1rem; border-top: 1px solid var(--line); }
}
@media (min-width: 1024px) { .sheet-head, .sheet-foot, .sheet-scrim { display: none; } }

/* Sticky Call / Book bar on doctor profiles */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom, 0)); z-index: 44; display: flex; gap: .6rem; padding: .6rem .8rem;
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgba(0,0,0,.07); transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.mobile-cta > * { flex: 1; }
.mobile-cta .btn-outline { flex: 0 0 auto; padding-left: 1.2rem; padding-right: 1.2rem; }
.mobile-cta.is-hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }
@media (max-width: 767px) { .has-cta { padding-bottom: 76px; } }

/* Booking date strip snaps like a native picker */
.day-strip { scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.day-strip::-webkit-scrollbar { display: none; }
.day-btn { scroll-snap-align: start; }

/* Pull to refresh */
.ptr { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0)); z-index: 39; width: 42px; height: 42px; margin-left: -21px;
  display: flex; align-items: center; justify-content: center; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.18);
  transform: translateY(-90px); opacity: 0; pointer-events: none; }
.ptr.is-settling { transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.ptr .spinner { animation-play-state: paused; }
.ptr.is-refreshing .spinner { animation-play-state: running; }

/* Mobile list rows read as app cards */
@media (max-width: 639px) {
  .listing-row { padding: 1rem; gap: .85rem; }
  .listing-row .btn-primary, .listing-row .btn-outline { padding-top: .7rem; padding-bottom: .7rem; }
}

/* =====================================================================
   Brand mark, doctor avatars, availability tags, home visits, dashboard
   ===================================================================== */
.logo-tile { width: 34px; height: 34px; background: #fff; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.drawer-head .logo-tile, .site-footer .logo-tile { background: #fff; }

#boot .boot-logo { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #fff; font-weight: 700; font-size: 1.25rem; letter-spacing: .01em; animation: bootPulse .9s ease-in-out infinite alternate; }
#boot .boot-svg { width: 76px; height: 76px; }

/* Avatars: initials in the system colour with the caduceus badge */
.avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--sys, var(--brand)); color: #fff; font-weight: 700; }
.avatar-md { width: 52px; height: 52px; font-size: 1.15rem; }
.avatar-lg { width: 76px; height: 76px; font-size: 1.6rem; }
.avatar-ini { letter-spacing: .02em; }
.avatar-badge { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; padding: 3px; background: #fff; color: var(--sys, var(--brand)); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.avatar-lg .avatar-badge { width: 28px; height: 28px; }
.avatar .avatar-mark { width: 70%; height: 70%; }

/* Tags on cards */
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; padding: .12rem .5rem; border: 1px solid var(--line); background: #fff; color: var(--muted); }
.tag-today { background: #E7F6EE; border-color: #8FD1AE; color: #116B3E; }
.tag-today::before { content: ''; width: 7px; height: 7px; background: #1A9A5A; display: inline-block; }
.tag-later { background: var(--tint); border-color: #A9D6D6; color: var(--ink); }
.tag-off { background: #F4F4F4; color: #6B7878; }
.tag-home { background: #FDECEC; border-color: #F2B8B5; color: #9B1C1C; }
.tag-fee { background: #fff; color: var(--text); }

/* Danger / emergency */
.btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1.1rem; font-weight: 700; background: #C0392B; color: #fff; border: 2px solid #C0392B; transition: background-color .15s, transform .08s; }
.btn-danger:hover { background: #9E2B20; border-color: #9E2B20; }
.btn-danger:active { transform: scale(.98); }
.btn-danger[disabled] { opacity: .5; }
.emergency-bar { display: flex; align-items: center; gap: .9rem; background: #fff; border-left: 6px solid #C0392B; box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: .9rem 1rem; color: #7A1C14; }
.emergency-call { flex-shrink: 0; background: #C0392B; color: #fff; font-weight: 700; padding: .55rem .9rem; }
@media (max-width: 639px) { .emergency-bar { flex-wrap: wrap; } .emergency-call { width: 100%; text-align: center; } }
.homevisit-banner { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid #F2C9C5; border-left: 6px solid #C0392B; padding: 1rem 1.1rem; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.homevisit-banner:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.1); }
.hv-icon { width: 52px; height: 52px; background: #FDECEC; color: #C0392B; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hv-row { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.1rem; border-left: 5px solid var(--sys); }
.tab-urgent svg { color: #C0392B; }
.tab-urgent.is-active { color: #C0392B; }
.tab-urgent.is-active::before { background: #C0392B; }

/* Booking day states */
.day-btn .day-note { display: block; font-size: .68rem; margin-top: 2px; font-weight: 600; }
.day-btn[data-status="available"] .day-note { color: #1A9A5A; }
.day-btn[data-status="full"] .day-note, .day-btn[data-status="closed"] .day-note { color: #8A9696; }
.day-btn[data-status="leave"] .day-note { color: #B42318; }
.day-btn[disabled] { background: #F7F8F8; color: #A3ADAD; cursor: not-allowed; }
.day-btn[aria-pressed="true"] .day-note { color: rgba(255,255,255,.85); }
.booking-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }

/* Doctor dashboard */
.dash-h { padding: .8rem 1.25rem; font-weight: 700; color: var(--ink); background: var(--tint); border-bottom: 1px solid var(--line); }
.timing-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.timing-row select.field { width: auto; min-width: 7.2rem; padding-right: 1.8rem; }
.status-pill.status-urgent { background: #FDECEC; border-color: #F2B8B5; color: #9B1C1C; }

/* Google Material Symbols */
.ms { font-family: 'Material Symbols Outlined'; font-weight: 400; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; width: 1em; height: 1em; overflow: hidden; flex-shrink: 0;
  -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; user-select: none;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; vertical-align: middle; }
.ms-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.tab.is-active .ms, .drawer-links a.is-active .ms { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.drawer-links a .ms { color: var(--brand); }

/* =====================================================================
   Home: quick chips, promo banners, specialty grid
   ===================================================================== */
.quick-row { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin: 0 -1rem; padding: 0 1rem .2rem; }
.quick-row::-webkit-scrollbar { display: none; }
.quick-chip { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem; font-size: .92rem; font-weight: 500; color: #fff;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.4); transition: background-color .15s, color .15s; }
.quick-chip:hover, .quick-chip:active { background: #fff; color: var(--brand); }

.promo-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.promo-track::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .promo-track { grid-auto-columns: calc(50% - .5rem); gap: 1rem; } }
.promo { scroll-snap-align: start; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 176px; padding: 1.35rem 1.4rem; color: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.promo:active { transform: scale(.99); }
.promo::before, .promo::after { content: ''; position: absolute; border: 2px solid rgba(255,255,255,.14); pointer-events: none; }
.promo::before { width: 220px; height: 220px; right: -60px; top: -70px; transform: rotate(18deg); }
.promo::after { width: 120px; height: 120px; right: 90px; bottom: -70px; transform: rotate(32deg); background: rgba(255,255,255,.05); }
.promo-teal { background: linear-gradient(135deg, #0A8C8C 0%, #097E7E 45%, #085D5D 100%); }
.promo-red { background: linear-gradient(135deg, #D14A3B 0%, #B83227 55%, #8F2219 100%); }
.promo-dark { background: linear-gradient(135deg, #0B5E6E 0%, #085D5D 50%, #053F3F 100%); }
.promo-light { background: linear-gradient(135deg, #F2FAFA 0%, #E2F2F2 100%); color: var(--ink); border: 1px solid #CFE6E6; }
.promo-light::before, .promo-light::after { border-color: rgba(9,126,126,.15); }
.promo-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: .3rem; max-width: 30rem; }
.promo-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.promo-title { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.promo-text { font-size: .95rem; opacity: .92; }
.promo-cta { margin-top: .6rem; display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start; font-weight: 700; font-size: .92rem;
  padding: .5rem .9rem; background: #fff; color: var(--ink); }
.promo-red .promo-cta { color: #9B1C1C; }
.promo-light .promo-cta { background: var(--brand); color: #fff; }
.promo-art { position: relative; z-index: 1; flex-shrink: 0; width: 104px; height: 104px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); }
.promo-light .promo-art { background: #fff; border-color: #CFE6E6; color: var(--brand); }
@media (max-width: 479px) { .promo-art { width: 76px; height: 76px; } .promo-art .ms { font-size: 52px !important; } .promo-title { font-size: 1.18rem; } }
.promo-dots { display: flex; justify-content: center; gap: 6px; margin-top: .7rem; }
.promo-dot { width: 8px; height: 8px; background: #C9D3D3; transition: width .2s, background-color .2s; }
.promo-dot.is-active { width: 22px; background: var(--brand); }
@media (min-width: 768px) { .promo-dots { display: none; } }

.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 640px) { .spec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; } }
@media (min-width: 1024px) { .spec-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; } }
.spec-card { background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; text-align: center; gap: .45rem;
  padding: .9rem .4rem .8rem; transition: border-color .15s, box-shadow .15s, transform .15s; }
.spec-card:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(8,93,93,.12); transform: translateY(-2px); }
.spec-card:active { transform: scale(.97); }
.spec-icon { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; background: var(--tint); color: var(--brand); }
.spec-card:hover .spec-icon { background: var(--brand); color: #fff; }
.spec-name { font-size: .88rem; font-weight: 600; line-height: 1.25; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spec-count { font-size: .75rem; color: var(--muted); }
@media (min-width: 1024px) {
  .spec-card { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: .8rem; row-gap: .1rem; text-align: left; align-items: center; padding: .6rem; }
  .spec-icon { grid-row: span 2; width: 64px; height: 64px; }
  .spec-name { align-self: end; font-size: .95rem; }
  .spec-count { align-self: start; }
}
.loc-link .ms { color: var(--brand); }

/* Mobile listing card refinements */
.listing-row .avatar { margin-top: 2px; }
.suggest li a { align-items: center; }
.sug-ic { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--tint); color: var(--brand); }
.suggest .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spec-name { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
@media (min-width: 1024px) { .spec-card { grid-template-columns: 56px 1fr; } .spec-icon { width: 56px; height: 56px; } }

/* Icon glyph comes from the data-icon attribute, so search engines and screen readers never see icon names as text */
.ms::before { content: attr(data-icon); }


/* =====================================================================
   BookMyDr royal theme: deep teal with gold
   ===================================================================== */
:root { --deep: #06403F; --gold: #B8913A; --gold-l: #E2C27A; --gold-d: #8C6A22; --royal: linear-gradient(135deg, #097E7E 0%, #085D5D 55%, #06403F 100%); }

/* Brand lockup */
.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand-emblem { width: 38px; height: 38px; flex-shrink: 0; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: 'Poppins', 'Hind', sans-serif; font-weight: 700; font-size: 1.32rem; letter-spacing: -.01em; color: #fff; }
.brand-name b { color: var(--gold-l); font-weight: 700; }
.brand-tld { font-family: 'Poppins', 'Hind', sans-serif; font-weight: 600; font-size: .56rem; letter-spacing: .42em; color: #CFE8E8; margin-top: 4px; padding-left: 2px;
  display: flex; align-items: center; gap: .4rem; }
.brand-tld::before, .brand-tld::after { content: ''; height: 1px; flex: 1; background: var(--gold-l); opacity: .8; }
.brand-sm .brand-emblem { width: 32px; height: 32px; } .brand-sm .brand-name { font-size: 1.12rem; }
.brand-lg .brand-emblem { width: 46px; height: 46px; } .brand-lg .brand-name { font-size: 1.55rem; }
.brand-xl { flex-direction: column; gap: 1rem; } .brand-xl .brand-emblem { width: 92px; height: 92px; } .brand-xl .brand-name { font-size: 2.1rem; } .brand-xl .brand-tld { font-size: .75rem; }
@media (max-width: 380px) { .site-header .brand-name { font-size: 1.08rem; } .site-header .brand-emblem { width: 32px; height: 32px; } }

/* Header */
.topstrip { background: var(--deep); color: #D8ECEC; border-bottom: 1px solid rgba(226,194,122,.25); }
.topstrip a { color: var(--gold-l); }
.mainband { background: var(--royal); box-shadow: 0 2px 10px rgba(0,0,0,.18); border-bottom: 2px solid var(--gold); }
.site-header { background: var(--deep); }
.nav-link.is-active { box-shadow: inset 0 -4px 0 var(--gold-l); }
.btn-header { border-color: var(--gold-l); }
.btn-header:hover { background: var(--gold-l); color: var(--deep); border-color: var(--gold-l); }
#progress { background: var(--gold-l); box-shadow: 0 0 8px rgba(226,194,122,.8); }

/* Hero and page bands */
.hero-band { background: var(--royal); position: relative; overflow: hidden; }
.hero-band::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border: 2px solid rgba(226,194,122,.22); transform: rotate(20deg); pointer-events: none; }
.hero-band > * { position: relative; z-index: 1; }
.hero-gold { color: var(--gold-l); }
.quick-chip { border-color: rgba(226,194,122,.55); }
.quick-chip:hover, .quick-chip:active { background: var(--gold-l); color: var(--deep); border-color: var(--gold-l); }
.page-band { box-shadow: inset 0 3px 0 var(--gold); }

/* Buttons: teal primary, gold edge on hover */
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--deep); border-color: var(--deep); box-shadow: inset 0 -3px 0 var(--gold-l); }
.btn-gold { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .65rem 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, #F0D89A, #C9A24A); color: var(--deep); border: 0; }
.btn-gold:hover { background: linear-gradient(135deg, #E2C27A, #B8913A); }

/* Headings get a short gold rule */
main h2.text-2xl, main h2.text-xl { position: relative; }
.spec-card:hover .spec-icon { background: var(--royal); color: var(--gold-l); }
.spec-card:hover { border-color: var(--gold); }

/* Promo banners */
.promo-teal { background: var(--royal); }
.promo-dark { background: linear-gradient(135deg, #0B4F4F 0%, #06403F 60%, #042E2E 100%); }
.promo-kicker { color: var(--gold-l); opacity: 1; }
.promo-light .promo-kicker { color: var(--gold-d); }
.promo::before { border-color: rgba(226,194,122,.25); }
.promo-cta { background: var(--gold-l); color: var(--deep); }
.promo-light .promo-cta { background: var(--brand); color: #fff; }
.promo-dot.is-active { background: var(--gold); }

/* Areas */
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
@media (min-width: 640px) { .area-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .area-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.area-card { display: flex; align-items: center; gap: .75rem; padding: .8rem .9rem; background: #fff; border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.area-card:hover { border-color: var(--gold); box-shadow: 0 6px 16px rgba(8,93,93,.1); transform: translateY(-2px); }
.area-ic { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--tint); color: var(--brand); }
a.area-card:hover .area-ic { background: var(--royal); color: var(--gold-l); }
.area-card.is-soon { opacity: .7; }
.soon-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.soon-chip { font-size: .85rem; padding: .25rem .6rem; background: #fff; border: 1px dashed #C9D3D3; color: var(--muted); }

/* Tab bar, drawer, footer */
.tab.is-active { color: var(--deep); }
.tab.is-active::before { background: var(--gold); height: 3px; }
.drawer-head { background: var(--royal); border-bottom: 2px solid var(--gold); }
.drawer-links a.is-active { box-shadow: inset 4px 0 0 var(--gold); }
.site-footer { background: linear-gradient(180deg, #085D5D 0%, #06403F 100%) !important; border-top: 3px solid var(--gold); }
.footer-h { font-weight: 700; margin-bottom: .75rem; color: var(--gold-l); letter-spacing: .02em; }
.site-footer a:hover { color: var(--gold-l) !important; }

/* Cards & tags */
.card.border-t-brand, .card[class*="border-t-brand"] { border-top-color: var(--gold) !important; }
.dash-h { border-left: 4px solid var(--gold); }
.avatar-badge { color: var(--gold-d); }
.tag-later { border-color: #E2C27A; }

/* Preloader */
#boot { background: var(--royal); }
#boot .boot-bar { background: var(--gold-l); }
#boot .boot-logo { animation: bootPulse 1.1s ease-in-out infinite alternate; }
.avatar-badge { display: flex; align-items: center; justify-content: center; padding: 0; }
.avatar-lg .avatar-badge .ms { font-size: 20px !important; }
