/* Swami Dental v0.1 prototype: shared plumbing styles.
   Review strip, placeholder marking, "to come" frames, toast, and the
   ₹500 pre-consultation dialog. Versions theme the dialog through the
   --pc-* custom properties; everything else here stays neutral. */

/* ---------- 1. Review strip (prototype chrome, not part of the design) ---------- */
.v01-strip {
  position: relative; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 40px; padding: 4px 12px;
  background: #1c1718; color: #f3eded;
  font: 500 13px/1.25 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
.v01-strip a, .v01-strip button { color: inherit; font: inherit; }
.v01-strip a { text-decoration: none; }
.v01-strip a:hover { text-decoration: underline; text-underline-offset: 3px; }
.v01-strip :focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 3px; }
.v01-strip__home { white-space: nowrap; opacity: .85; }
.v01-strip__nav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.v01-strip__nav a {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font-size: 18px; line-height: 1; background: rgba(255,255,255,.08);
}
.v01-strip__nav a:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.v01-strip__cur { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v01-strip__cur b { font-weight: 700; margin-right: 4px; }
.v01-strip__after { opacity: .65; margin-left: 6px; }
.v01-strip__tools { display: flex; align-items: center; gap: 8px; }
.v01-strip__ph {
  border: 1px solid rgba(255,255,255,.28); background: transparent; border-radius: 999px;
  padding: 6px 12px; cursor: pointer; white-space: nowrap; min-height: 32px;
}
.v01-strip__ph[aria-pressed="true"] { background: #ffe08a; color: #1c1718; border-color: #ffe08a; }
.v01-strip__q { white-space: nowrap; opacity: .85; }
@media (max-width: 760px) {
  .v01-strip { gap: 8px; padding: 4px 8px; font-size: 12px; }
  .v01-strip__after, .v01-strip__q, .v01-strip__home .long { display: none; }
  .v01-strip__ph { padding: 5px 9px; }
  .v01-strip__ph .long { display: none; }
}

/* ---------- 2. Placeholders ---------- */
/* Text that stands in for a fact the clinic hasn't confirmed yet. */
.ph {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 1.5px;
  text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
  cursor: help;
}
html.v01-mark .ph {
  background: #ffe08a; color: #2a1a1f !important;
  box-shadow: 0 0 0 2px #ffe08a; border-radius: 2px;
  text-decoration: none;
}
html.v01-mark .ph * { color: #2a1a1f !important; }

/* Frames for photos and film that will come later. Put data-coming on the
   wrapper (figure/div), never on the <img> itself. */
[data-coming] { position: relative; }
[data-coming]::after {
  content: "To come: " attr(data-coming);
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  max-width: calc(100% - 20px);
  padding: 5px 8px; border-radius: 4px;
  font: 600 13px/1.3 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .01em; text-align: left;
  color: var(--coming-ink, #2e0a18);
  background: var(--coming-bg, rgba(251, 244, 244, .94));
  pointer-events: none;
}
html.v01-mark [data-coming] { outline: 3px dashed #e0a800; outline-offset: -3px; }
html.v01-mark [data-coming]::after { background: #ffe08a; color: #2a1a1f; }

/* ---------- 3. Toast (WhatsApp and language stubs) ---------- */
.v01-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 10px;
  background: #1c1718; color: #f6f0f0;
  font: 500 15px/1.4 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 10px 30px rgba(28, 23, 24, .25);
  transition: opacity .2s ease-out, transform .2s ease-out;
}
.v01-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { .v01-toast { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- 4. Pre-consultation dialog ---------- */
/* Defaults live on :where(:root) (zero specificity): a version's own :root or .pc values win. */
:where(:root) {
  --pc-bg: #fbf4f4;
  --pc-surface: #ffffff;
  --pc-ink: #2e0a18;
  --pc-muted: #5f5054;
  --pc-line: #dccbc2;
  --pc-field: #8e7c81;
  --pc-accent: #7b2847;
  --pc-accent-ink: #ffffff;
  --pc-tint: #f3e7ea;
  --pc-radius: 14px;
  --pc-font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --pc-font-body: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --pc-error: #b3261e;
}
.pc {
  width: min(620px, calc(100vw - 32px));
  max-height: min(880px, calc(100dvh - 40px));
  padding: 0; border: 0; border-radius: var(--pc-radius);
  background: var(--pc-bg); color: var(--pc-ink);
  font-family: var(--pc-font-body); font-size: 17px; line-height: 1.5;
  box-shadow: 0 30px 80px rgba(46, 10, 24, .28);
  overflow: hidden;
}
.pc[open] { display: flex; flex-direction: column; }
.pc::backdrop { background: rgba(30, 12, 19, .55); }
html.pc-open { overflow: hidden; }
.pc *, .pc *::before, .pc *::after { box-sizing: border-box; }
.pc :focus-visible { outline: 3px solid var(--pc-accent); outline-offset: 2px; }

.pc__top {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px;
  padding: 16px 16px 12px 22px; border-bottom: 1px solid var(--pc-line);
}
.pc__brand { margin: 0; font-weight: 600; font-size: 15px; color: var(--pc-muted); }
.pc__brand strong { color: var(--pc-ink); font-weight: 700; }
.pc__count { grid-column: 1; margin: 0; font-size: 14px; color: var(--pc-muted); min-height: 1.4em; }
.pc__x {
  grid-column: 2; grid-row: 1 / span 2;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: transparent; color: var(--pc-ink); cursor: pointer;
}
.pc__x:hover { background: var(--pc-tint); }
.pc__x svg, .pc__opt svg, .pc__go svg, .pc__back svg { width: 22px; height: 22px; flex: none; }
.pc__bar { height: 3px; background: var(--pc-line); }
.pc__bar span { display: block; height: 100%; width: 0; background: var(--pc-accent); transition: width .3s cubic-bezier(.22, 1, .36, 1); }

.pc__body { flex: 1; overflow-y: auto; padding: 22px 22px 8px; overscroll-behavior: contain; }
.pc__step { animation: pc-in .22s cubic-bezier(.22, 1, .36, 1); }
@keyframes pc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pc h2 {
  margin: 0 0 6px; font-family: var(--pc-font-display); font-weight: 600;
  font-size: clamp(24px, 4.6vw, 30px); line-height: 1.15; letter-spacing: -.01em;
  text-wrap: balance; color: var(--pc-ink);
}
.pc h2:focus { outline: none; }
.pc h3 { margin: 22px 0 8px; font-size: 17px; font-weight: 700; }
.pc p { margin: 0 0 14px; }
.pc__lede { color: var(--pc-muted); max-width: 52ch; }

.pc__opts { display: grid; gap: 10px; margin: 16px 0 10px; }
.pc__opts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pc__opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px;
  padding: 12px 14px 12px 16px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--pc-line); border-radius: calc(var(--pc-radius) - 4px);
  background: var(--pc-surface); color: var(--pc-ink); font: inherit;
  transition: border-color .15s, background-color .15s;
}
.pc__opt:hover { border-color: var(--pc-accent); }
.pc__opt[aria-pressed="true"] { border-color: var(--pc-accent); background: var(--pc-tint); box-shadow: inset 0 0 0 1px var(--pc-accent); }
.pc__opt-txt { flex: 1; min-width: 0; }
.pc__opt-l { display: block; font-weight: 600; font-size: 17px; line-height: 1.3; }
.pc__opt-h { display: block; margin-top: 2px; font-size: 15px; line-height: 1.35; color: var(--pc-muted); }
.pc__opt .pc__ic { color: var(--pc-accent); }
.pc__opt .pc__chev { color: var(--pc-muted); }

.pc__safety {
  margin: 14px 0 6px; padding: 12px 14px; border-radius: 10px;
  background: var(--pc-surface); border: 1px solid var(--pc-line);
  font-size: 15px; line-height: 1.45; color: var(--pc-ink);
}

.pc__days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 12px -2px 4px; scrollbar-width: thin; }
.pc__day {
  flex: none; display: grid; justify-items: center; gap: 2px; min-width: 72px; min-height: 64px;
  padding: 8px 10px; cursor: pointer; font: inherit; color: var(--pc-ink);
  border: 1.5px solid var(--pc-line); border-radius: 10px; background: var(--pc-surface);
}
.pc__day small { font-size: 13px; color: var(--pc-muted); }
.pc__day b { font-size: 18px; }
.pc__day[aria-pressed="true"] { border-color: var(--pc-accent); background: var(--pc-accent); color: var(--pc-accent-ink); }
.pc__day[aria-pressed="true"] small { color: inherit; opacity: .85; }
.pc__slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 12px; }
.pc__slot {
  min-height: 48px; padding: 8px; cursor: pointer; font: inherit; font-weight: 600; color: var(--pc-ink);
  border: 1.5px solid var(--pc-line); border-radius: 10px; background: var(--pc-surface);
}
.pc__slot:hover:not(:disabled) { border-color: var(--pc-accent); }
.pc__slot:disabled { cursor: not-allowed; color: var(--pc-muted); background: transparent; text-decoration: line-through; opacity: .6; }
.pc__slot[aria-pressed="true"] { border-color: var(--pc-accent); background: var(--pc-accent); color: var(--pc-accent-ink); }
.pc__note { font-size: 14px; color: var(--pc-muted); }

.pc__form { display: grid; gap: 16px; margin-top: 16px; }
.pc__field { display: grid; gap: 6px; }
.pc__field label { font-weight: 600; }
.pc__field .pc__optional { font-weight: 400; color: var(--pc-muted); }
.pc input[type="text"], .pc input[type="tel"], .pc select, .pc textarea {
  width: 100%; min-height: 50px; padding: 10px 12px;
  border: 1.5px solid var(--pc-field); border-radius: 8px; background: #fff; color: var(--pc-ink);
  font: inherit; font-size: 17px;
}
.pc textarea { min-height: 88px; resize: vertical; }
.pc input:focus, .pc select:focus, .pc textarea:focus { outline: 3px solid var(--pc-accent); outline-offset: 1px; border-color: var(--pc-accent); }
.pc [aria-invalid="true"] { border-color: var(--pc-error); background: #fff5f4; }
.pc__tel { display: grid; grid-template-columns: 104px 1fr; gap: 8px; }
.pc__hint { margin: 0; font-size: 14px; color: var(--pc-muted); }
.pc__err { margin: 0; font-size: 15px; font-weight: 600; color: var(--pc-error); }
.pc__check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; cursor: pointer; }
.pc__check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--pc-accent); flex: none; }

.pc__go {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 12px 20px; cursor: pointer;
  border: 0; border-radius: calc(var(--pc-radius) - 4px);
  background: var(--pc-accent); color: var(--pc-accent-ink);
  font: inherit; font-weight: 700; font-size: 17px;
}
.pc__go:hover { filter: brightness(1.08); }
.pc__go[aria-busy="true"] { opacity: .75; cursor: progress; }
.pc__go small { font-weight: 500; opacity: .85; }
.pc__privacy, .pc__small { margin: 0; font-size: 14px; color: var(--pc-muted); }

.pc__sum { margin: 16px 0 12px; border: 1px solid var(--pc-line); border-radius: 12px; background: var(--pc-surface); }
.pc__sum > div { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: baseline; padding: 11px 14px; border-top: 1px solid var(--pc-line); }
.pc__sum > div:first-child { border-top: 0; }
.pc__sum dt { color: var(--pc-muted); font-size: 15px; }
.pc__sum dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pc__edit { border: 0; background: none; color: var(--pc-accent); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; padding: 4px; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; }
.pc__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 4px 0 6px; font-size: 18px; }
.pc__total strong { font-family: var(--pc-font-display); font-size: 28px; }
.pc__methods { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; padding: 0; border: 0; }
.pc__methods legend { width: 100%; margin-bottom: 8px; font-weight: 600; }
.pc__methods label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; cursor: pointer;
  border: 1.5px solid var(--pc-line); border-radius: 999px; background: var(--pc-surface);
}
.pc__methods label:has(input:checked) { border-color: var(--pc-accent); background: var(--pc-tint); }
.pc__methods input { accent-color: var(--pc-accent); width: 18px; height: 18px; margin: 0; }

.pc__done { text-align: left; }
.pc__tick { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%; background: var(--pc-accent); color: var(--pc-accent-ink); }
.pc__tick svg { width: 30px; height: 30px; }
.pc__when { font-size: 19px; font-weight: 600; }
.pc__done ol { margin: 0 0 18px; padding-left: 22px; }
.pc__done li { margin-bottom: 8px; }
.pc__proto-note { padding: 10px 12px; border-radius: 8px; background: var(--pc-tint); font-size: 14px; }

.pc__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--pc-line);
}
.pc__back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px 8px 6px;
  border: 0; border-radius: 8px; background: transparent; color: var(--pc-ink); font: inherit; font-weight: 600; cursor: pointer;
}
.pc__back:hover { background: var(--pc-tint); }
.pc__back[hidden] { display: none; }
.pc__proto { margin: 0; font-size: 13px; color: var(--pc-muted); text-align: right; }

@media (max-width: 640px) {
  .pc { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .pc__opts--2 { grid-template-columns: 1fr; }
  .pc__body { padding: 18px 16px 8px; }
  .pc__top { padding: 12px 8px 10px 16px; }
  .pc__sum > div { grid-template-columns: 78px 1fr auto; }
  .pc__slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .pc__step { animation: none; }
  .pc__bar span, .v01-toast { transition: none; }
}

/* Small "to come" frames (e.g. the founder thumbnail): short tag that fits */
.coming-sm::after {
  content: "To come" !important; display: block !important;
  left: 6px; bottom: 6px; max-width: calc(100% - 12px);
  padding: 3px 6px; font-size: 12px; line-height: 1.2;
}

/* Clean preview (14 Oct 2026): <body class="v01-clean"> hides review markers; #review brings them back (v01.js). */
body.v01-clean .ph { text-decoration: none; cursor: auto; }
body.v01-clean [data-coming]::after { display: none; }
body.v01-clean [data-pending] { display: none !important; }
