/* Clinic page v2 (preview via ?v=2). Phone-first; one cool neutral family + one teal accent.
   Light tokens are the base; html[data-theme="dark"] overrides them (the site sets data-theme on <html>).
   Scoped to .cv2 so nothing leaks into other pages. Bottom bar z-index 900 (FAB range, below the header). */

.cv2 {
  --cv2-page: #F6F8FA; --cv2-card: #FFFFFF; --cv2-sunken: #EEF2F6; --cv2-line: #E2E8F0; --cv2-line-2: #CBD5E1;
  --cv2-text: #0F172A; --cv2-text-2: #475569; --cv2-text-3: #5B6B80;
  --cv2-accent: #0F766E; --cv2-accent-hover: #115E59; --cv2-accent-tint: #ECFDF8; --cv2-accent-line: #99F6E4; --cv2-on-accent: #FFFFFF;
  --cv2-ok: #047857; --cv2-ok-bg: #ECFDF5; --cv2-bad: #B91C1C; --cv2-bad-bg: #FEF2F2;
  --cv2-rate: #B45309; --cv2-star: #F59E0B; --cv2-wa: #25D366;
  --cv2-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --cv2-r: 16px; --cv2-bar-h: 92px; /* bar = reassurance line + 48px button + padding */
  background: var(--cv2-page);
  color: var(--cv2-text);
  font-family: Tajawal, Cairo, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
  min-height: 100vh;
}
html[data-theme="dark"] .cv2 {
  --cv2-page: #0B1220; --cv2-card: #111A2B; --cv2-sunken: #0E1626; --cv2-line: #1F2A3D; --cv2-line-2: #2B3850;
  --cv2-text: #E5E9F0; --cv2-text-2: #AEB8C7; --cv2-text-3: #8F9BAE;
  --cv2-accent: #2DD4BF; --cv2-accent-hover: #5EEAD4; --cv2-accent-tint: rgba(45,212,191,.10); --cv2-accent-line: rgba(45,212,191,.35); --cv2-on-accent: #04231F;
  --cv2-ok: #34D399; --cv2-ok-bg: rgba(52,211,153,.12); --cv2-bad: #FCA5A5; --cv2-bad-bg: rgba(248,113,113,.12);
  --cv2-rate: #FBBF24; --cv2-star: #FBBF24;
  --cv2-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.cv2 *, .cv2 *::before, .cv2 *::after { box-sizing: border-box; }
.cv2 a { color: inherit; text-decoration: none; }
.cv2 button { font: inherit; color: inherit; cursor: pointer; }
.cv2 h1, .cv2 h2, .cv2 h3, .cv2 p { margin: 0; }
.cv2 svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cv2 svg.wa { width: 20px; height: 20px; flex: none; fill: currentColor; }
.cv2 :focus-visible { outline: 2px solid var(--cv2-accent); outline-offset: 2px; border-radius: 8px; }
[dir="rtl"] .cv2 .flip { transform: scaleX(-1); }

.cv2-wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px calc(var(--cv2-bar-h) + 32px + env(safe-area-inset-bottom, 0px)); }

/* Hero + identity card */
.cv2-hero { margin-inline: -16px; }
.cv2-hero img { display: block; width: 100%; aspect-ratio: 16 / 10; max-height: 420px; object-fit: cover; background: var(--cv2-sunken); }
.cv2-id { position: relative; margin-top: -40px; background: var(--cv2-card); border: 1px solid var(--cv2-line); border-radius: var(--cv2-r); padding: 16px; box-shadow: var(--cv2-shadow); display: grid; gap: 8px; }
.cv2-id-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cv2-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.cv2-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; line-height: 1.5; }
.cv2-pill svg.i { width: 14px; height: 14px; stroke-width: 2.2; }
.cv2-pill.is-ver { background: var(--cv2-accent-tint); color: var(--cv2-accent); border: 1px solid var(--cv2-accent-line); }
.cv2-pill.is-open { background: var(--cv2-ok-bg); color: var(--cv2-ok); }
.cv2-pill.is-closed { background: var(--cv2-bad-bg); color: var(--cv2-bad); }
.cv2-icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--cv2-line); background: var(--cv2-card); display: grid; place-items: center; color: var(--cv2-text-2); flex: none; padding: 0; }
.cv2-icon-btn:hover { border-color: var(--cv2-accent); color: var(--cv2-accent); }
.cv2-id .cv2-icon-btn { display: none; }
.cv2 h1 { font-size: 28px; line-height: 1.25; font-weight: 800; color: var(--cv2-text); text-wrap: balance; overflow-wrap: anywhere; }
.cv2 h1 .cv2-n { display: block; }
.cv2 h1 .cv2-kw { display: block; font-size: 15px; font-weight: 500; color: var(--cv2-text-2); margin-top: 2px; }
/* Full listing name (kept in the H1 for search) under the short headline: small, max 2 lines. */
.cv2 h1 .cv2-full { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--cv2-text-3); margin-top: 4px; }

/* First screen on phones: slim photo strip, compact headline, so name + rating + area fit
   above the fold on every screen height (iPhone SE 568px tall up to large Androids). */
@media (max-width: 959px) {
  .cv2-hero img { aspect-ratio: auto; height: clamp(120px, 22vh, 180px); max-height: none; }
  .cv2-hero.is-stock img { height: clamp(72px, 12vh, 110px); }
  .cv2-id { margin-top: -24px; padding: 12px 14px; gap: 4px; }
  .cv2-pill { font-size: 11.5px; padding: 2px 8px; }
  .cv2-pill svg.i { width: 12px; height: 12px; }
  .cv2 h1 { font-size: 20px; line-height: 1.3; }
  .cv2 h1.is-long { font-size: 18px; }
  .cv2 h1 .cv2-full { -webkit-line-clamp: 1; font-size: 12px; margin-top: 2px; }
  .cv2 h1 .cv2-kw { font-size: 13px; margin-top: 1px; }
  .cv2-rate, .cv2-trust { font-size: 13px; }
  .cv2-rate svg { width: 14px; height: 14px; }
  .cv2-trust svg.i { width: 15px; height: 15px; }
  .cv2-facts { margin-top: 8px; gap: 6px; }
  .cv2-fact { padding: 8px 10px; border-radius: 12px; }
  .cv2-fact-k { font-size: 11.5px; }
  .cv2-fact-v { font-size: 13px; }
}
@media (max-width: 359px) {
  .cv2 h1 { font-size: 18px; }
  .cv2 h1.is-long { font-size: 16.5px; }
  .cv2 h1 .cv2-kw { font-size: 12.5px; }
  .cv2-rate, .cv2-trust { font-size: 12.5px; }
}
.cv2-rate { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--cv2-rate); font-weight: 700; }
/* Partner trust line (replaces "New on EDC, no reviews yet" on partner pages). */
.cv2-trust { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; font-weight: 700; line-height: 1.45; color: var(--cv2-accent); }
.cv2-trust svg.i { width: 17px; height: 17px; margin-top: 1px; stroke-width: 2; }
.cv2-rate svg { width: 16px; height: 16px; fill: var(--cv2-star); stroke: none; }

/* Fact strip */
.cv2-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin-top: 12px; }
.cv2-fact { background: var(--cv2-card); border: 1px solid var(--cv2-line); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.cv2-fact-k { font-size: 12px; color: var(--cv2-text-3); display: flex; align-items: center; gap: 4px; }
.cv2-fact-k svg.i { width: 14px; height: 14px; }
.cv2-fact-v { font-size: 14px; font-weight: 700; line-height: 1.35; margin-top: 2px; overflow-wrap: anywhere; }
.cv2-fact-v.is-acc { color: var(--cv2-accent); }

/* Columns */
.cv2-cols { display: grid; gap: 12px; margin-top: 12px; grid-template-areas: "top" "side" "rest"; }
.cv2-cols.no-docs { grid-template-areas: "side" "rest"; }
.cv2-top { grid-area: top; display: grid; gap: 12px; min-width: 0; }
.cv2-side { grid-area: side; min-width: 0; }
.cv2-rest { grid-area: rest; display: grid; gap: 12px; min-width: 0; }

.cv2-card { background: var(--cv2-card); border: 1px solid var(--cv2-line); border-radius: var(--cv2-r); padding: 16px; min-width: 0; }
.cv2-card h2 { font-size: 19px; font-weight: 800; line-height: 1.35; color: var(--cv2-text); margin-bottom: 10px; }
.cv2-lead { color: var(--cv2-text-2); font-size: 14px; margin: -4px 0 12px !important; }
.cv2-link { color: var(--cv2-accent); font-weight: 700; font-size: 14px; background: none; border: 0; padding: 0; min-height: 44px; display: inline-flex; align-items: center; }
.cv2-link:hover { color: var(--cv2-accent-hover); text-decoration: underline; }
.cv2-link[hidden] { display: none; }

/* Booking */
.cv2-days { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 4px 4px; margin-inline: -4px; scrollbar-width: none; }
.cv2-days::-webkit-scrollbar { display: none; }
.cv2-day { flex: 0 0 70px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--cv2-line); background: var(--cv2-card); min-height: 66px; text-align: center; }
.cv2-day:hover { border-color: var(--cv2-line-2); }
.cv2-day-n { font-size: 12.5px; color: var(--cv2-text-3); font-weight: 500; }
.cv2-day-d { font-size: 15px; font-weight: 800; line-height: 1.4; }
.cv2-day-x { font-size: 11px; color: var(--cv2-bad); font-weight: 700; }
.cv2-day.is-off { opacity: .55; cursor: not-allowed; }
.cv2-day.is-sel { background: var(--cv2-accent); border-color: var(--cv2-accent); color: var(--cv2-on-accent); }
.cv2-day.is-sel .cv2-day-n { color: var(--cv2-on-accent); }
.cv2-slots { display: grid; gap: 12px; margin-top: 14px; }
.cv2-slots[hidden] { display: none; }
.cv2-slot-part { font-size: 12.5px; color: var(--cv2-text-3); font-weight: 700; margin-bottom: 6px; }
.cv2-slot-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cv2-slot { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; border: 1px solid var(--cv2-line); background: var(--cv2-card); font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.cv2-slot:hover { border-color: var(--cv2-accent-line); background: var(--cv2-accent-tint); }
.cv2-slot.is-sel { border-color: var(--cv2-accent); background: var(--cv2-accent-tint); color: var(--cv2-accent); box-shadow: inset 0 0 0 1px var(--cv2-accent); }
.cv2-note { font-size: 13px; color: var(--cv2-text-3); margin-top: 12px !important; }
.cv2-side .cv2-cta { display: none; }
/* Reassurance next to the main booking button (bar on phones, side panel on desktop). */
.cv2-assure { font-size: 12.5px; font-weight: 700; line-height: 1.4; color: var(--cv2-ok); text-align: center; text-wrap: balance; }
.cv2-assure-side { display: none; margin-top: 8px !important; }
/* "Online now": green dot with a soft expanding ring (owner request 2026-11-19). */
.cv2-online { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cv2-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; flex: none; }
.cv2-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22C55E; animation: cv2-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes cv2-ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
.cv2-bar-assure { max-width: 1120px; margin: 0 auto 6px !important; }

.cv2-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; font-weight: 800; font-size: 15.5px; background: var(--cv2-accent); color: var(--cv2-on-accent) !important; }
.cv2-btn:hover { background: var(--cv2-accent-hover); }
.cv2-btn2 { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--cv2-line-2); background: var(--cv2-card); font-weight: 700; font-size: 14.5px; color: var(--cv2-text); }
.cv2-btn2:hover { border-color: var(--cv2-accent); color: var(--cv2-accent); }
.cv2-btn2 svg.wa { color: var(--cv2-wa); }
.cv2-btn-sm { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 64px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--cv2-accent-line); background: var(--cv2-accent-tint); color: var(--cv2-accent); font-weight: 700; font-size: 14px; flex: none; }
.cv2-btn-sm:hover { border-color: var(--cv2-accent); }

/* Dentists */
.cv2-doc { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--cv2-line); }
.cv2-doc:first-of-type { border-top: 0; padding-top: 0; }
.cv2-doc img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--cv2-sunken); flex: none; border: 1px solid var(--cv2-line); }
.cv2-doc-meta { flex: 1; min-width: 0; }
.cv2-doc-n { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 5px; }
.cv2-doc-n svg { width: 16px; height: 16px; fill: var(--cv2-accent); flex: none; }
.cv2-doc-s { font-size: 13.5px; color: var(--cv2-text-2); }
.cv2-doc-t { font-size: 12.5px; color: var(--cv2-accent); font-weight: 700; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.cv2-doc-t svg.i { width: 13px; height: 13px; }

/* Chips */
.cv2-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.cv2-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--cv2-line); background: var(--cv2-card); font-size: 14px; font-weight: 500; color: var(--cv2-text); }
.cv2-chip:hover { border-color: var(--cv2-accent-line); background: var(--cv2-accent-tint); color: var(--cv2-accent); }
.cv2-chips.is-collapsed li:nth-child(n+7) { display: none; }
.cv2-chip-more { color: var(--cv2-accent); font-weight: 700; border-style: dashed; }

/* Offer */
.cv2-offer { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; }
.cv2-offer.no-img { grid-template-columns: minmax(0, 1fr); padding: 16px; }
.cv2-offer img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; }
.cv2-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--cv2-accent); }
.cv2-offer h3 { margin: 2px 0; font-size: 18px; font-weight: 800; color: var(--cv2-text); }
.cv2-offer p { color: var(--cv2-text-2); font-size: 14px; }

/* About */
.cv2-about p { color: var(--cv2-text-2); font-size: 15.5px; line-height: 1.9; max-width: 65ch; white-space: pre-line; }
.cv2-about p.is-clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Hours (native details/summary) */
.cv2-hours summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; }
.cv2-hours summary::-webkit-details-marker { display: none; }
.cv2-hours-t1 { display: block; font-weight: 800; font-size: 17px; }
.cv2-hours-t2 { display: block; font-size: 14px; color: var(--cv2-text-2); }
.cv2-hours summary svg.i { color: var(--cv2-text-3); transition: transform .2s; }
.cv2-hours[open] summary svg.i { transform: rotate(180deg); }
.cv2-hlist { list-style: none; margin: 12px 0 0; padding: 0; }
.cv2-hlist li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--cv2-line); font-size: 14.5px; }
.cv2-hlist li > span:last-child { color: var(--cv2-text-2); font-variant-numeric: tabular-nums; }
.cv2-hlist li.is-today { font-weight: 700; }
.cv2-hlist li.is-today > span:last-child { color: var(--cv2-text); }
.cv2-hlist li.is-closed > span:last-child { font-style: italic; }
.cv2-hlist em { font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--cv2-accent); background: var(--cv2-accent-tint); padding: 1px 8px; border-radius: 999px; margin-inline-start: 6px; }

/* Reviews, location, link lists */
.cv2-rev { display: grid; gap: 12px; justify-items: start; }
.cv2-rev h2 { margin: 0; }
.cv2-rev p { color: var(--cv2-text-2); font-size: 14.5px; max-width: 60ch; }
.cv2-loc { display: flex; gap: 12px; align-items: flex-start; }
.cv2-loc-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--cv2-accent-tint); color: var(--cv2-accent); display: grid; place-items: center; flex: none; }
.cv2-loc-a { font-weight: 700; }
.cv2-loc-b { font-size: 14px; color: var(--cv2-text-2); }
.cv2-loc-act { margin-top: 12px; }
.cv2-list { list-style: none; margin: 0; padding: 0; }
.cv2-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--cv2-line); font-size: 14.5px; font-weight: 500; }
.cv2-list li:first-child a { border-top: 0; }
.cv2-list a:hover { color: var(--cv2-accent); }
.cv2-list svg.i { color: var(--cv2-text-3); width: 16px; height: 16px; }

/* Bottom bar (phone only) */
.cv2-bar { position: fixed; inset: auto 0 0 0; z-index: 900; background: var(--cv2-card); border-top: 1px solid var(--cv2-line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); box-shadow: 0 -6px 20px rgba(15,23,42,.06); }
.cv2-bar-in { display: flex; gap: 8px; max-width: 1120px; margin: 0 auto; }
.cv2-bar .cv2-btn { flex: 1; min-width: 0; }
.cv2-bar .cv2-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv2-bar .cv2-icon-btn { width: 48px; height: 48px; }
.cv2-toast { position: fixed; z-index: 950; left: 50%; transform: translateX(-50%); bottom: calc(var(--cv2-bar-h) + 20px + env(safe-area-inset-bottom, 0px)); background: var(--cv2-text); color: var(--cv2-page); padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; }
.cv2-toast[hidden] { display: none; }

/* The bar already has EDC WhatsApp: hide the site-wide WhatsApp float on this page
   and keep the chat launcher above the bar. */
html.cv2-on #edc-wa-fab { display: none !important; }
@media (max-width: 959px) {
  /* .edc-cd sits outside main.cv2, so the variable is not inherited: the fallback must match --cv2-bar-h. */
  html.cv2-on .edc-cd { bottom: calc(var(--cv2-bar-h, 92px) + 10px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (min-width: 960px) {
  .cv2-wrap { padding-bottom: 64px; }
  .cv2-hero { margin-inline: 0; border-radius: 20px; overflow: hidden; }
  .cv2-hero img { aspect-ratio: 21 / 8; }
  .cv2-hero.is-stock img { aspect-ratio: auto; height: 200px; }
  .cv2-cols.no-docs { grid-template-areas: "rest side"; }
  .cv2-side .cv2-assure-side { display: block; }
  .cv2-id { margin-top: -64px; margin-inline: 24px; padding: 20px 24px; }
  .cv2-id .cv2-icon-btn { display: grid; }
  .cv2 h1 { font-size: 34px; }
  .cv2 h1 .cv2-kw { font-size: 16px; }
  .cv2-facts { margin-inline: 24px; }
  .cv2-cols { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "top side" "rest side"; gap: 16px; margin-top: 16px; }
  .cv2-side { align-self: start; position: sticky; top: 112px; }
  .cv2-side .cv2-cta { display: flex; margin-top: 14px; width: 100%; }
  .cv2-bar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cv2 * { transition: none !important; }
  .cv2-dot::after { animation: none; display: none; }
}
