/* ===========================================================================
   Care Thread — referring office surface (R1–R4, Settings, Outbox, tracking).
   Layout from the boards; colour and type from app.css tokens (care.css says
   how the mockup values map). Every selector is prefixed `of-` so this file
   cannot reach into the site or patient surfaces.
   =========================================================================== */

.of-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.of-optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--faint); font-size: 13px; }
.of-label {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 7px;
}
/* The boards' outline buttons are ink-on-white; app.css's secondary is muted grey. */
.of-btn-ink { color: var(--ink); border-color: var(--ink); }
.of-foot { font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.of-nowrap { white-space: nowrap; }
/* app.css styles .btn for <button>; the office's link-buttons (New referral,

/* ── R1 ───────────────────────────────────────────────────────────────────── */
.ct-head .btn-primary { flex: none; }
.ct-search { color: var(--faint); }
.ct-search input { color: var(--ink); }
.of-r1 { min-width: 980px; }
.of-r1 td { font-size: 15px; }
.of-r1 .of-col-patient { min-width: 150px; max-width: 190px; }
.of-r1 .of-col-site { white-space: nowrap; }
.of-r1 .of-col-days { width: 110px; line-height: 1.3; }
.of-r1 .of-col-update { color: var(--muted); font-size: 14.5px; max-width: 260px; }
.of-rowlink { color: var(--ink); text-decoration: none; }
.of-rowlink:hover { text-decoration: underline; }
.of-hidden-name { color: var(--muted); font-style: italic; font-weight: 500; }

/* ── R2 ───────────────────────────────────────────────────────────────────── */
.of-new { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.of-new-side { display: grid; gap: 22px; position: sticky; top: 96px; }
.of-new-side .ct-card + .ct-card { margin-top: 0; }
.of-new-form .ct-seg { flex-wrap: wrap; }
.of-site {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border: 1.5px solid var(--blue); border-radius: var(--radius-sm); background: var(--paper);
}
.of-site--empty { border-style: dashed; border-color: var(--line); }
.of-site-name { font-weight: 700; font-size: 17px; }
.of-site-ok { color: var(--green); font-weight: 600; font-size: 14px; margin-top: 2px; }
.of-site-paused { color: var(--amber); font-weight: 600; font-size: 14px; margin-top: 2px; }
.of-site .btn { flex: none; }
.of-send { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.of-needs { list-style: none; margin-top: 14px; }
.of-needs li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.of-needs li:last-child { border-bottom: 0; }
.of-needs svg { color: var(--green); flex: none; }
@media (max-width: 980px) {
  .of-new { grid-template-columns: 1fr; }
  .of-new-side { position: static; }
}

/* ── R3 ───────────────────────────────────────────────────────────────────── */
.of-r3-head { align-items: flex-start; }
.of-r3-head > div:first-child { flex: 1 1 560px; min-width: 0; }
.of-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.of-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.of-actions .btn { padding: 11px 18px; font-size: 15px; }
.of-r3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); gap: 24px; align-items: stretch; }
.of-r3-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-content: start; }
.of-r3-main > .ct-card, .of-r3-pair > .ct-card { margin-top: 0; }
.of-r3-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.of-tl-card .ct-tl { margin-top: 6px; }
.of-sr:empty { display: none; }
@media (max-width: 1100px) { .of-r3-pair { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .of-r3 { grid-template-columns: minmax(0, 1fr); } }

.of-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.of-card-head .ct-card-title { margin-bottom: 0; }
.of-scroll { overflow-x: auto; }
.of-results { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.of-results th {
  text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint); padding: 12px 12px; border-bottom: 1px solid var(--line);
}
.of-results td { padding: 12px 12px; border-bottom: 1px solid var(--line-soft); }
.of-results tr:last-child td { border-bottom: 0; }
.of-results .num { text-align: right; font-variant-numeric: tabular-nums; }
.of-results th:first-child, .of-results td:first-child { padding-left: 12px; }
.of-results td:first-child, .of-results th { white-space: nowrap; }
.of-results .is-expected td { color: var(--faint); }
.of-results .is-expected td:first-child { color: var(--ink); }

.of-check { list-style: none; }
.of-check li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.of-check li:last-child { border-bottom: 0; }
.of-check-r { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.of-quick { padding: 4px 10px; font-size: 13.5px; font-weight: 600; border-radius: 999px; }

/* Message bubbles and the send form moved to care.css: CT.threadCard uses them on R3 and S3. */
.of-handback { margin-top: 0; }

.of-calm { margin-top: 0; }
.of-calm .ct-lede { margin-top: 10px; }
.of-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin-top: 18px; font-size: 15px; }
.of-facts dt { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; }
@media (max-width: 520px) { .of-facts { grid-template-columns: 1fr; gap: 2px; } .of-facts dd { margin-bottom: 10px; } }

/* ── R4 ───────────────────────────────────────────────────────────────────── */
.of-dir-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 28px 0 20px; }
.of-fsel {
  display: inline-flex; align-items: center; gap: 12px; padding: 0 6px 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 15px; color: var(--muted);
}
.of-fsel select { border: 0; background: none; font-weight: 600; color: var(--ink); padding: 11px 10px 11px 0; outline: 0; max-width: 320px; }
.of-fsel:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27,86,171,.12); }
.of-toggle { display: inline-flex; gap: 10px; }
/* "Within 50 miles of Westside Oncology, Houston": one field, like the mockup's location row. */
.of-dir-near { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin: -8px 0 20px; }
.of-near {
  flex: 1 1 420px; display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 0 8px 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-size: 15px; color: var(--muted);
}
.of-near svg { color: var(--faint); flex: none; }
.of-near select { border: 0; background: none; font-weight: 600; color: var(--ink); padding: 11px 0; outline: 0; }
.of-near select:disabled { color: var(--faint); }
.of-near input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; font-weight: 600; color: var(--ink); padding: 11px 0; }
.of-near input::placeholder { font-weight: 400; color: var(--faint); }
.of-near:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27,86,171,.12); }
.of-near-reset { flex: none; border: 0; background: none; color: var(--blue); font-size: 14px; font-weight: 600; padding: 8px 10px; border-radius: 999px; cursor: pointer; }
.of-near-reset:hover { background: rgba(27,86,171,.08); }
.of-near-err { margin: -12px 0 18px 18px; font-size: 14px; color: var(--red, #b42318); }
.of-dir-count { margin-left: auto; font-size: 14px; }
.of-sites { display: grid; gap: 14px; }
.of-sitecard {
  display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1.4fr) minmax(0, .85fr) 130px;
  gap: 24px; align-items: center; padding: 20px 24px;
}
.of-sites .of-sitecard + .of-sitecard { margin-top: 0; }
.of-sc-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.of-sc-title h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.of-sc-title .ct-chip { font-size: 12.5px; padding: 3px 10px; }
.of-k { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.of-v { font-size: 14.5px; line-height: 1.35; margin-top: 2px; }
.of-strong { font-weight: 700; }
.of-sc-cta { display: flex; justify-content: flex-end; }
.of-request {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-top: 18px; padding: 20px 24px; border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: rgba(255,255,255,.55); font-size: 15px;
}
@media (max-width: 900px) {
  .of-sitecard { grid-template-columns: 1fr 1fr; gap: 14px 20px; }
  .of-sc-main { grid-column: 1 / -1; }
  .of-sc-cta { grid-column: 1 / -1; justify-content: flex-start; }
  .of-sc-cta:empty { display: none; }
  .of-dir-count { margin-left: 0; width: 100%; }
}

/* ── Settings ─────────────────────────────────────────────────────────────── */
.of-settings { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.of-settings .ct-card + .ct-card { margin-top: 0; }
.of-radios { border: 0; display: grid; gap: 10px; }
.of-radio {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fdfbf7;
}
.of-radio:has(input:checked) { border-color: var(--blue); background: var(--blue-wash); }
.of-radio input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--blue); flex: none; }
.of-radio b { display: block; }
.of-radio .ct-sub { display: block; line-height: 1.45; }
@media (max-width: 860px) { .of-settings { grid-template-columns: 1fr; } }

/* ── Outbox ───────────────────────────────────────────────────────────────── */
.of-outbox { min-width: 860px; }
.of-outbox tbody tr:hover td { background: #fffaf2; }
.of-outbox code { font-size: 13px; background: var(--line-soft); padding: 2px 7px; border-radius: 6px; }
.of-ob-msg { color: var(--muted); font-size: 14px; max-width: 420px; }
.of-outbox .of-ob-msg { overflow-wrap: anywhere; }
.of-ob-delivery { white-space: nowrap; }
.of-ob-delivery .btn { display: block; margin-top: 8px; }
.of-ob-pick { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.of-ob-pick select { padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fdfbf7; min-width: 0; max-width: 100%; }
.of-preview:not(:empty) { margin-top: 16px; }
.of-email { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; display: block; }
.of-sms { white-space: pre-wrap; background: var(--cream); padding: 14px 16px; border-radius: var(--radius-sm); font-size: 15px; }

/* ── Tracking view (entry B) ──────────────────────────────────────────────── */
.of-track-head { margin-bottom: 24px; }
.of-track-sum { margin-bottom: 24px; }
.of-track-sum .ct-meta { margin-top: 8px; }
.of-track-foot { text-align: center; margin-top: 28px; font-size: 15px; }

/* ── phone ────────────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  .ct-head > .btn-primary { width: 100%; }
  .of-site { flex-direction: column; align-items: flex-start; }
  .of-request { padding: 18px; }
  .of-fsel { width: 100%; justify-content: space-between; }
  .of-fsel select { max-width: 70%; }
}

/* R2 SMS consent (PLAN §6, 10DLC): the .consent sentence style from app.css,
   with the carrier disclosure tucked under the sentence, not under the box. */
.of-sms-consent { margin: -4px 0 20px; }
.of-sms-help { margin: 4px 0 0 28px; font-size: 12.5px; }

/* ── R5 · Treating site profile ─────────────────────────────────────────── */
.of-sc-name { color: inherit; text-decoration: none; }
.of-sc-name:hover { color: var(--blue); text-decoration: underline; }
.of-sc-cta { flex-direction: column; align-items: stretch; gap: 8px; }
.of-sc-cta .btn { justify-content: center; }
.of-pf { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; margin-top: 18px; }
.of-pf-name { margin-top: 8px; }
.of-pf-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; }
.of-pf-headline { font-family: var(--font-serif); font-size: 22px; line-height: 1.3; color: var(--blue-ink); margin-top: 18px; max-width: 34em; }
.of-pf-jump { display: none; margin-top: 16px; }
.of-pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.of-pf-stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.of-pf-num { font-family: var(--font-display); font-weight: 600; font-size: 36px; line-height: 1; color: var(--blue); }
.of-pf-lab { font-size: 13px; line-height: 1.3; color: var(--muted); margin-top: 8px; }
.of-pf-back { background: var(--cream); border-radius: var(--radius-sm); padding: 18px 20px; margin-top: 16px; }
.of-pf-sect { margin-top: 26px; }
.of-pf-h { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; }
.of-pf-checks { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; font-size: 15px; line-height: 1.35; }
.of-pf-checks li { display: flex; gap: 9px; align-items: flex-start; }
.of-pf-checks svg { color: var(--green); flex: none; margin-top: 2px; }
.of-pf-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.of-pf-chips li { background: var(--blue-wash); color: var(--blue-ink); font-size: 14px; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.of-pf-chips--plain li { background: var(--paper); color: var(--ink); font-weight: 500; border: 1px solid var(--line); }
.of-pf-tx { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.of-pf-txrow { background: var(--blue-wash); border-radius: var(--radius-sm); padding: 12px 14px; }
.of-pf-txrow b { display: block; font-size: 16px; color: var(--blue-ink); }
.of-pf-txrow span { display: block; font-size: 13px; line-height: 1.3; color: var(--muted); margin-top: 3px; }
.of-pf-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 12px; font-size: 14px; }
.of-pf-facts div { display: flex; gap: 6px; }
.of-pf-facts dt { color: var(--muted); }
.of-pf-facts dt::after { content: ":"; }
.of-pf-facts dd { margin: 0; font-weight: 600; }
/* The unclaimed-listing disclaimer: small, once per page. */
.of-unclaimed-note { font-size: 13px; color: var(--muted); margin: 4px 0 12px; max-width: 70ch; }
.of-unclaimed-note b { font-weight: 600; color: var(--ink); }
/* Contact: one row per fact, the label above its value. */
.of-pf-contact { flex-direction: column; gap: 12px; margin: 16px 0; }
.of-pf-contact div { flex-direction: column; gap: 2px; }
.of-pf-contact dt::after { content: none; }
.of-pf-contact dd a { color: var(--blue); overflow-wrap: anywhere; }
.of-pf-hours { list-style: none; margin: 0; padding: 0; font-weight: 400; font-variant-numeric: tabular-nums; }
.of-pf-hours li { display: grid; grid-template-columns: 3em 1fr; gap: 8px; }
.of-pf-leader b { display: block; font-size: 16px; }
.of-pf-leader span { display: block; color: var(--muted); font-size: 14px; }
.of-pf-leader p { font-size: 15px; line-height: 1.4; margin-top: 6px; }
.of-pf-side { position: sticky; top: 20px; display: grid; gap: 16px; }
.of-pf-refer { margin-top: 0; padding: 24px; }
.of-pf-refer-h { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.of-pf-promise { font-size: 14.5px; line-height: 1.4; color: var(--muted); margin: 6px 0 18px; }
.of-pf-sms { font-size: 13.5px; line-height: 1.35; margin-bottom: 12px; }
.of-pf-attach { font-size: 14.5px; margin-bottom: 14px; }
.of-pf-attach summary { cursor: pointer; font-weight: 600; }
.of-pf-send { width: 100%; justify-content: center; }
@media (max-width: 960px) {
  .of-pf { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .of-pf-side { position: static; }
  .of-pf-jump { display: inline-flex; }
  .of-pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .of-sc-cta { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (max-width: 560px) {
  .of-pf-checks, .of-pf-tx { grid-template-columns: minmax(0, 1fr); }
}
.of-pf-back { background: var(--green-wash); }
.of-pf-sms { display: flex; align-items: flex-start; gap: 10px; }
.of-pf-sms input { flex: none; margin-top: 2px; }
.of-pf-group { font-size: 13px; font-weight: 700; color: var(--blue-ink); margin: 4px 0 10px; }
.of-pf-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Claiming an unclaimed listing (Taner, 2026-11-18: mockup R4/R5). */
.of-claim-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  margin: 6px 0 18px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper);
}
.of-claim-banner > div { flex: 1 1 320px; min-width: 0; }
.of-claim-banner h2 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.of-claim-banner p { margin: 0; font-size: 14px; color: var(--muted); max-width: 60ch; }
.of-claim-card { margin-top: 0; padding: 24px; display: grid; gap: 10px; }
.of-claim-card .eyebrow { margin: 0; }
.of-claim-card h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.of-claim-card p:not(.eyebrow) { margin: 0; font-size: 14px; color: var(--muted); }
.of-claim-card .btn { justify-self: stretch; justify-content: center; margin-top: 4px; }
.of-claim-link {
  border: 0; background: none; padding: 2px 0; font-size: 13px; color: var(--blue); text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer; white-space: nowrap;
}
.of-refer-off, .of-refer-off:disabled {
  background: var(--line); color: var(--muted); box-shadow: none; cursor: not-allowed; opacity: 1;
}
.of-pf-refer-off { display: grid; gap: 6px; margin: 16px 0 12px; }
.of-pf-refer-off .btn { justify-content: center; }
.of-pf-refer-off .ct-hint { margin: 0; font-size: 13px; }
