/* @ekm-tags: style, scheduling */
/* =============================================================================
   Do Not Schedule — the one visual rule used on every screen (owner 2026-10-05)
   -----------------------------------------------------------------------------
   * The patient NAME turns red (.ekm-dns-name on the name element).
   * A red-OUTLINED "DO NOT SCHEDULE" badge sits on the RIGHT of the SAME row (.ekm-dns-badge), never stacked under the name.
   * The card/row is NEVER filled red because of this status. On a card that is already red (urgent / overdue) the badge keeps a
     LIGHT background, a red border and red text, so it stays distinct.
   * "Patient match needs review" (.ekm-dns-review) is neutral: it is not a warning, it says the identity needs checking.
   Internal status only: it blocks nothing. Colours are the portal's danger token; the badge's light fill is fixed so it reads
   the same on a white card, a tinted card and a dark theme. No pills (small radius).
   ============================================================================= */
.ekm-dns-name,
.ekm-dns-name a,
.ekm-dns-name button,
.ekm-dns-name .bcv-patient,
a.ekm-dns-name,
button.ekm-dns-name{color:var(--status-danger-ink,#AC412A)!important}
html[data-dark] .ekm-dns-name,
html[data-dark] .ekm-dns-name a,
html[data-dark] .ekm-dns-name button,
html[data-dark] a.ekm-dns-name,
html[data-dark] button.ekm-dns-name{color:var(--status-danger-ink,#F0A08E)!important}

.ekm-dns-badge{
  display:inline-flex;align-items:center;flex:none;box-sizing:border-box;margin:0 0 0 8px;padding:1px 7px;
  min-height:20px;border-radius:4px;border:1.5px solid var(--status-danger,#C0492F);
  background:#fff4f1;color:#9C2A14;
  font:700 11.5px/1.2 var(--font-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif);letter-spacing:.04em;white-space:nowrap;vertical-align:middle;
}
/* where the row is a flex line with the name on the left, the badge rides the right edge */
.ekm-dns-badge--right{margin-left:auto}
.ekm-dns-review{
  display:inline-flex;align-items:center;flex:none;box-sizing:border-box;margin:0 0 0 8px;padding:1px 7px;
  min-height:20px;border-radius:4px;border:1px dashed var(--c-box-border,#bdb8ad);
  background:transparent;color:var(--c-muted2,#6f695e);
  font:600 11.5px/1.2 var(--font-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif);white-space:nowrap;vertical-align:middle;
}
.ekm-dns-review.ekm-dns-badge--right{margin-left:auto}
@media print{.ekm-dns-badge{background:#fff}}

/* rows that were a block line (name alone) become a flex line only when a badge is present */
.wf-ia-patient--dns{display:flex;align-items:center;gap:8px;min-width:0}
.wf-ia-patient--dns .wf-ia-patient-name{min-width:0;overflow-wrap:anywhere}
#dsb-root .dsb-ptname--dns{display:flex;align-items:center;gap:6px;min-width:0}
#dsb-root .dsb-ptname--dns .dsb-ptname-t{min-width:0}
.ekm-dns-row{display:flex;align-items:center;gap:6px;min-width:0}
.ekm-dns-row > span:first-child{min-width:0;overflow-wrap:anywhere}
.today-sched-card-dns{margin-left:auto;align-self:flex-start;display:flex}
.today-sched-card-dns .ekm-dns-badge,.today-sched-card-dns .ekm-dns-review{margin-left:0}
.today-sched-info-row .ekm-dns-badge,.today-sched-info-row .ekm-dns-review{margin-left:auto;margin-right:8px}
.appt-wf-simple-right .ekm-dns-badge,.appt-wf-simple-right .ekm-dns-review{margin:0 8px 0 0}
.appt-wf-card-identity .ekm-dns-row .appt-wf-card-patient{min-width:0;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.appt-wf-card--lux .appt-wf-card-identity:has(.ekm-dns-row){flex:1 1 200px}
.ekm-dns-badge,.ekm-dns-review{flex:none;white-space:nowrap}
td[data-label="Patient"] .ekm-dns-row{min-width:0}
.kdp-row .ekm-dns-badge,.kdp-row .ekm-dns-review{margin-left:auto}
.msr-patient-row-head .ekm-dns-badge,.msr-patient-row-head .ekm-dns-review{margin-left:auto;margin-right:8px}
.rr-card-head .ekm-dns-badge,.rr-card-head .ekm-dns-review{align-self:flex-start;margin:0 8px 0 auto}
.rr-history-cell--patient .ekm-dns-badge,.rr-history-cell--patient .ekm-dns-review{margin-left:8px}
.ir-board-card-name--dns,.ir-mock-row-name--dns{display:flex;align-items:center;gap:6px;min-width:0}
.ir-mock-row-name--dns .ekm-dns-badge,.ir-mock-row-name--dns .ekm-dns-review{margin-left:auto}
.ir-pipeline-card-head .ekm-dns-badge,.ir-pipeline-card-head .ekm-dns-review{margin-left:auto;margin-right:8px}
.pws-head-top > .ekm-dns-badge,.pws-head-top > .ekm-dns-review{margin-left:auto;align-self:flex-start;margin-top:2px}
.msg-hub-thread-title--dns{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
/* "QMB: cannot be seen" (owner rule 2026-11-24, 20271109153827): same shape as Do Not Schedule, same danger colours; it rides next to
   it when both show. Display only: nothing is cancelled. */
.ekm-qmb-badge{
  display:inline-flex;align-items:center;flex:none;box-sizing:border-box;margin:0 0 0 8px;padding:1px 7px;
  min-height:20px;border-radius:4px;border:1.5px solid var(--status-danger,#C0492F);
  background:#fff4f1;color:#9C2A14;
  font:700 11.5px/1.2 var(--font-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif);white-space:nowrap;vertical-align:middle;
}
.ekm-qmb-badge.ekm-dns-badge--right{margin-left:auto}
.ekm-dns-badge--right + .ekm-qmb-badge.ekm-dns-badge--right{margin-left:8px}
@media print{.ekm-qmb-badge{background:#fff}}
