/* ==========================================================================
   dc.css — direct-contracting product mode (RBP_PRODUCT_MODE=direct_contract)
   Layered on top of style.css. The RBP-mode page does NOT include this file,
   so nothing here can regress the RBP layout.
   Navy palette follows the RBP shared styles.
   ========================================================================== */

:root {
  --dc-navy:        #1F4E79;
  --dc-navy-dark:   #16385a;
  --dc-navy-light:  #e8f0fe;
  --dc-accent:      #2E8B57;
  --dc-below-mkt:   #1c8036;
  --dc-warn:        #c14b1c;
  --dc-muted:       #6c757d;
  --dc-border:      #d5dde6;
  --dc-row-alt:     #f7f9fc;
  --dc-tier-high:   #d5e4f4;
  --dc-tier-med:    #fff2d0;
  --dc-tier-low:    #f0e0e0;
  --dc-seg-case:    #2E8B57;
  --dc-seg-fee:     #1F4E79;
  --dc-seg-pob:     #c14b1c;
  /* "other" needs enough contrast against the empty-bar background
     (#f0f0f0) that an "other"-dominant hospital reads as a filled bar,
     not as a bar mostly showing the loud small percent_of_billed sliver. */
  --dc-seg-other:   #5b6874;
  --dc-seg-null:    #b8bfc7;
}

.dc-header {
  background: var(--dc-navy);
  color: #fff;
  padding: 20px 32px;
}
.dc-header h1  { margin: 0; font-size: 24px; font-weight: 600; }
.dc-header .subtitle { color: #d4dbe4; font-size: 14px; margin-top: 4px; }

.dc-container { max-width: 1180px; margin: 24px auto; padding: 0 24px; }

/* ---------- intro / info block ---------- */
.dc-info {
  background: var(--dc-navy-light);
  border-left: 4px solid var(--dc-navy);
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.dc-info summary { cursor: pointer; padding: 4px 0; }
.dc-info-title   { font-weight: 600; color: var(--dc-navy); }
.dc-info-body    { margin-top: 8px; font-size: 14px; line-height: 1.55; }
.dc-info-body p  { margin: 4px 0 8px; }
.dc-info-body ul { margin: 4px 0 4px 20px; padding: 0; }
.dc-info-body li { margin-bottom: 4px; }

/* ---------- cards ---------- */
.dc-card {
  background: #fff;
  border: 1px solid var(--dc-border);
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.dc-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dc-navy-dark);
  margin: 0 0 12px;
}
.dc-panel-caption {
  font-size: 13px;
  color: var(--dc-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

/* ---------- search ---------- */
.dc-search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.dc-chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.dc-chip {
  padding: 6px 12px;
  border: 1px solid var(--dc-border);
  background: #fff;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  color: var(--dc-navy-dark);
  transition: background 0.1s;
}
.dc-chip:hover     { background: var(--dc-navy-light); }
.dc-chip.is-active {
  background: var(--dc-navy);
  color: #fff;
  border-color: var(--dc-navy);
}
.dc-search-input {
  flex: 1;
  min-width: 280px;
  padding: 8px 12px;
  border: 1px solid var(--dc-border);
  border-radius: 4px;
  font-size: 14px;
}
.dc-search-input:focus { outline: 2px solid var(--dc-navy); outline-offset: -1px; }
.dc-search-hint { font-size: 12px; color: var(--dc-muted); margin: 4px 0; }

.dc-code-results {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--dc-border);
  border-radius: 4px;
}
.dc-code-result {
  padding: 8px 12px;
  border-bottom: 1px solid #eef1f4;
  cursor: pointer;
  display: grid;
  grid-template-columns: 72px 78px 1fr;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.dc-code-result:hover { background: var(--dc-navy-light); }
.dc-code-result:last-child { border-bottom: none; }
.dc-code-sys  { font-weight: 600; color: var(--dc-navy); }
.dc-code-val  { font-family: 'Consolas', 'Courier New', monospace; }
.dc-code-desc { color: #333; }

.dc-selected-code {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--dc-navy-light);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.dc-selected-label      { font-weight: 600; color: var(--dc-navy-dark); font-size: 13px; }
.dc-selected-code-value { font-family: 'Consolas', monospace; font-weight: 700; margin-left: 6px; }
.dc-selected-code-desc  { color: #444; font-size: 13px; margin-left: 8px; }

.dc-billing-class { display: flex; gap: 12px; }
.dc-radio { display: flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.dc-radio.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  text-decoration: line-through;
}
.dc-radio.is-disabled input { cursor: not-allowed; }

/* ---------- anchor card (market median) ---------- */
.dc-anchor-card {
  background: linear-gradient(135deg, var(--dc-navy) 0%, var(--dc-navy-dark) 100%);
  color: #fff;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(31,78,121,0.2);
}
.dc-anchor-heading { font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9; }
.dc-anchor-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 12px 0 8px;
  flex-wrap: wrap;
}
.dc-anchor-med, .dc-anchor-market { flex: 1; min-width: 180px; }
.dc-anchor-label   { font-size: 12px; opacity: 0.85; }
.dc-anchor-value   { font-size: 28px; font-weight: 700; margin: 4px 0; }
.dc-anchor-sub     { font-size: 12px; opacity: 0.85; }
.dc-anchor-divider { width: 1px; height: 56px; background: rgba(255,255,255,0.25); }
.dc-anchor-note    { font-size: 13px; margin: 8px 0 0; opacity: 0.95; }

/* ---------- tiered hospital table ---------- */
.dc-tier { margin-bottom: 24px; }

.dc-tier-header {
  padding: 8px 12px;
  border-radius: 4px 4px 0 0;
  margin: 0;
}
.dc-tier-heading {
  font-weight: 700;
  font-size: 15px;
  color: var(--dc-navy-dark);
}
.dc-tier-count {
  font-weight: 400;
  font-size: 13px;
  color: var(--dc-muted);
  margin-left: 4px;
}
.dc-tier-desc {
  font-size: 12px;
  color: #444;
  margin-top: 3px;
}

.dc-tier-high .dc-tier-header { background: var(--dc-tier-high); border-left: 4px solid var(--dc-navy); }
.dc-tier-med  .dc-tier-header { background: var(--dc-tier-med);  border-left: 4px solid #b88820; }
.dc-tier-low  .dc-tier-header { background: var(--dc-tier-low);  border-left: 4px solid #a04040; }

.dc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
.dc-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--dc-navy);
  background: #fafcff;
  color: var(--dc-navy-dark);
  font-weight: 600;
}
.dc-table th.num, .dc-table td.num { text-align: right; }
.dc-table td {
  padding: 12px;
  border-bottom: 1px solid #eef1f4;
  vertical-align: top;
}
.dc-table tr:nth-child(even) td { background: var(--dc-row-alt); }
.dc-hosp-name { font-weight: 600; color: var(--dc-navy-dark); }
.dc-hosp-meta { font-size: 11px; color: var(--dc-muted); margin-top: 2px; }
.dc-pct { font-weight: 700; }
.dc-pct.below-mkt { color: var(--dc-below-mkt); }

/* "Below Market" pill lives in its own column so the % of Medicare
   values align cleanly with each other regardless of pill presence. */
.dc-below-col {
  width: 100px;               /* fixed so the % column above it is fully aligned */
  padding: 12px 4px 12px 4px;
  vertical-align: middle;
}
.dc-below-mkt-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #d8f0dc;
  color: var(--dc-below-mkt);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.dc-range { color: #666; font-size: 12px; }

/* ---------- structure mix mini-bar ---------- */
.dc-mix       { min-width: 140px; }
.dc-mix-bar {
  display: flex;
  height: 8px;
  border-radius: 3px;
  overflow: hidden;
  background: #f5f7fa;    /* softer than #f0f0f0 so grey segments read as filled */
  margin-bottom: 4px;
}
.dc-mix-seg    { height: 100%; }
.dc-mix-seg.seg-case  { background: var(--dc-seg-case); }
.dc-mix-seg.seg-fee   { background: var(--dc-seg-fee); }
.dc-mix-seg.seg-pob   { background: var(--dc-seg-pob); }
.dc-mix-seg.seg-other { background: var(--dc-seg-other); }
.dc-mix-seg.seg-null  { background: var(--dc-seg-null); }
.dc-mix-label { font-size: 11px; color: #555; }
.dc-mix-hint {
  font-size: 11px;
  margin-top: 2px;
  font-weight: 600;
}
.dc-hint-warn    { color: var(--dc-warn); }
.dc-hint-ok      { color: var(--dc-below-mkt); }
.dc-hint-neutral { color: var(--dc-muted); font-weight: 500; }   /* "mixed" caption for other-dominant */
.dc-mix-empty    { color: var(--dc-muted); }

/* ---------- excluded footnote ---------- */
.dc-excluded-footnote { margin-top: 16px; font-size: 13px; color: var(--dc-muted); }
/* Belt-and-braces: force display:none when hidden. Some browsers paint the
   <details> disclosure triangle even against an empty <summary>, so we make
   the parent's hidden state explicit rather than relying on the UA default. */
.dc-excluded-footnote[hidden] { display: none !important; }
.dc-excluded-footnote summary { cursor: pointer; padding: 4px 0; }
.dc-excluded-item {
  padding: 6px 0;
  border-bottom: 1px dashed #dcdcdc;
  font-size: 12px;
  color: #333;
}
.dc-excluded-item:last-child { border-bottom: none; }
.dc-excluded-reason { color: var(--dc-muted); font-style: italic; }

/* ---------- misc states ---------- */
.dc-loading, .dc-empty { text-align: center; padding: 24px; color: var(--dc-muted); }
.dc-error   { padding: 12px 16px; background: #f8d7da; color: #721c24; border-radius: 4px; }

/* .site-footer (from style.css) uses a dark-navy background with 65%-opacity
   white text. Keep the readable light-on-dark contrast; only override
   layout/padding here, NOT color. */
.dc-footer {
  padding: 14px 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);   /* bumped from base 0.65 for readability */
}
.dc-footer b { color: #fff; }
