/* Patient chart layout for the Demo site. Loaded after theme.css; the theme itself is not edited here.
   Only the page scrolls: no inner scroll areas and no sideways scrollers. */

.ehr-wide { max-width: 1280px; }

.ehr-crumbs { margin: 0 0 12px; font-size: 13px; color: var(--ehr-muted); }
.ehr-crumbs a { color: var(--ehr-accent); font-weight: 600; text-decoration: none; }
.ehr-crumbs a:hover { text-decoration: underline; }

.ehr-sub { margin: 0; font-size: 15px; font-weight: 500; color: var(--ehr-muted); }

.ehr-chip-clear {
  display: inline-flex;
  align-items: center;
  background: #e4f1e8;
  color: #1c5a32;
  border: 1px solid #b7d8c2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
}

.ehr-banner { border-left: 4px solid var(--ehr-accent); }
.ehr-facts { margin: 0; }

.ehr-grid { display: block; }
.ehr-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; margin: 0 0 20px; }
.ehr-col .card { margin: 0; }

.ehr-sec h2.ehr-section-label { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; }
.ehr-count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ehr-muted);
  background: #f3f1ee;
  border: 1px solid var(--ehr-line);
  border-radius: 999px;
  padding: 1px 8px;
}
.ehr-empty { margin: 0; color: var(--ehr-muted); }

.ehr-sec .ehr-table td { font-size: 14px; padding: 9px 10px; vertical-align: top; overflow-wrap: anywhere; }
.ehr-sec .ehr-table th { padding: 8px 10px; }
.ehr-sec .ehr-table tbody tr:last-child td { border-bottom: 0; }

.ehr-flag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f3f1ee;
  color: var(--ehr-chip-ink);
  border: 1px solid var(--ehr-line);
}
.ehr-flag-high { background: var(--ehr-allergy-bg); color: var(--ehr-allergy-ink); border-color: #e3bcbc; }

footer { max-width: 1280px; padding: 0 0 32px; }
.ehr-sec td[data-label="Date"], .ehr-sec td[data-label="Since"], .ehr-sec td[data-label="Onset"] { white-space: nowrap; }

@media (min-width: 1000px) {
  .ehr-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
  .ehr-grid .ehr-col { margin: 0; }
}

@media (max-width: 800px) {
  footer { padding: 0 0 28px; }
  .ehr-sec td[data-label="Date"], .ehr-sec td[data-label="Since"], .ehr-sec td[data-label="Onset"] { white-space: normal; }
  .ehr-banner { padding: 14px; }
  .ehr-facts { gap: 12px 24px; }
  .ehr-sec .ehr-table td { padding: 4px 0; }
}
