/* Persistent monitoring, domain health, and manually triggered route checks. */
.persistent-history,
.path-diagnostics,
#view-dns > .glass { min-width:0; }

.history-toolbar,
.path-toolbar,
.domain-health-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.history-toolbar label,
.path-toolbar label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; }
.history-toolbar select,
.path-toolbar select { max-width:100%; min-width:150px; }
.history-toolbar button,
.path-toolbar button,
.domain-health-toolbar button { min-height:38px; }
.history-toolbar :focus-visible,
.path-toolbar :focus-visible,
.domain-health-toolbar :focus-visible { outline:2px solid #72d9ee; outline-offset:3px; }

.history-status,
.path-status,
.domain-health-status,
.raw-zone-status { margin:12px 0; color:var(--muted); font-size:12px; line-height:1.6; }
.history-status[data-state="ok"],
.domain-health-status[data-state="ok"],
.raw-zone-status[data-state="ok"] { color:var(--emerald); }
.history-status[data-state="stale"],
.history-status[data-state="pending"],
.domain-health-status[data-state="pending"],
.domain-health-status[data-state="warning"],
.path-status[data-state="pending"] { color:var(--amber); }
.history-status[data-state="error"],
.path-status[data-state="error"],
.domain-health-status[data-state="error"],
.raw-zone-status[data-state="error"] { color:var(--rose); }

.history-plot { width:100%; min-height:220px; overflow:hidden; }
.history-plot svg { display:block; width:100%; height:auto; min-height:220px; }
.history-summary { display:grid; gap:6px; margin-top:10px; color:var(--muted); font-size:11px; line-height:1.65; }

.path-toolbar { margin:12px 0; }
.path-check-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:12px 0; padding:0; list-style:none; }
.path-check,
.path-check-empty { min-width:0; padding:12px 14px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.025); }
.path-check[data-state="ok"] { border-color:rgba(67,217,177,.3); }
.path-check[data-state="error"] { border-color:rgba(255,111,137,.38); }
.path-check-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--text); font-size:12px; }
.path-check-detail { margin:8px 0 0; color:var(--muted); font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.path-latency { color:var(--dim); font-family:'JetBrains Mono',monospace; white-space:nowrap; }
.path-status[data-state="ok"] { color:var(--emerald); }
.path-status[data-state="stale"] { color:var(--amber); }

.status-pill { display:inline-flex; align-items:center; width:max-content; max-width:100%; padding:3px 8px; border:1px solid var(--border); border-radius:999px; color:var(--muted); font-size:10px; line-height:1.4; white-space:normal; }
.status-pill[data-state="ok"] { border-color:rgba(67,217,177,.32); color:var(--emerald); background:rgba(67,217,177,.07); }
.status-pill[data-state="warning"] { border-color:rgba(255,196,87,.35); color:var(--amber); background:rgba(255,196,87,.07); }
.status-pill[data-state="error"] { border-color:rgba(255,111,137,.35); color:var(--rose); background:rgba(255,111,137,.07); }

.domain-health-toolbar { justify-content:space-between; margin-bottom:12px; }
#domainHealthTable { width:100%; }
#domainHealthTable table { min-width:850px; }
#domainHealthTable th,
#domainHealthTable td { vertical-align:top; }
.domain-name { display:block; margin-bottom:7px; overflow-wrap:anywhere; }
.domain-cell { display:grid; gap:6px; min-width:150px; color:var(--muted); font-size:11px; line-height:1.55; overflow-wrap:anywhere; }
.domain-family { display:grid; gap:4px; }
.domain-family-record { overflow-wrap:anywhere; }
.domain-family-detail { display:flex; align-items:center; flex-wrap:wrap; gap:6px; color:var(--dim); font-size:10px; }
.status-pill[data-state="neutral"] { border-color:var(--border); color:var(--muted); background:rgba(255,255,255,.025); }
.domain-error-detail { color:var(--rose); white-space:normal; }
.raw-zone-panel { margin-top:12px; }
.raw-zone-panel pre { max-width:100%; overflow:auto; white-space:pre; }

@media(max-width:767px) {
  .history-toolbar { align-items:stretch; }
  .history-toolbar label { flex:1 1 100%; justify-content:space-between; }
  .history-toolbar select,
  .path-toolbar select { flex:1 1 170px; }
  .history-toolbar button,
  .path-toolbar button { flex:1 1 100%; }
  .history-plot { min-height:190px; }
  .history-plot svg { min-height:190px; }
  .path-check-list { grid-template-columns:1fr; }
  .domain-health-toolbar { align-items:stretch; }
  .domain-health-toolbar button { flex:1 1 100%; }
}
