/*
 * errors.css: the Errors view and the card "Error responses" of the Visits view. Drawn by ui/errors-tab.js and ui/errors-card.js; the summary takes the look of the summary of Freshness (.fo-sum, .fo-figs, .fo-fig in fresh.css), the code badges are those of the Access view (.ac-badge in access.css), the switch Who is the segmented control of the panel (.seg) and the buttons are the chips of the Visits view (.vchip); only tokens from tokens.css.
 * @comments-complete 2026-11-10
 */

/* The summary: a coloured top edge, the range counted as a small link to Visits on the right of the title, a verdict in the colour of the state (good, look at it, bad), the figures coloured by their state, the unconfirmed errors in grey. */
.err-tone-ok { --c: var(--st-current); --cb: var(--st-current-bg); }
.err-tone-warn { --c: var(--st-older); --cb: var(--st-older-bg); }
.err-tone-bad { --c: var(--st-error); --cb: var(--st-error-bg); }
.err-sum { gap: 12px; border-top: 4px solid var(--c); }
.err-verdict { display: flex; align-items: center; gap: 12px; }
.err-v-sign { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: var(--surface); font-size: 20px; font-weight: var(--fw-bold); line-height: 1; }
.err-v-head { margin: 0; color: var(--c); font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: var(--lh-snug); letter-spacing: var(--ls-heading); }
.err-kpi-ok .kpi-n { color: var(--st-current); }
.err-kpi-warn .kpi-n { color: var(--st-older); }
.err-kpi-bad .kpi-n { color: var(--st-error); }
.err-quiet .kpi-n { color: var(--text-3); }
.err-cut { margin: 0; }
.err-title .err-range { margin-left: auto; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); font-size: var(--fs-xs); text-decoration: none; white-space: nowrap; }
.err-title .err-range:hover { color: var(--accent-text); border-color: var(--accent-text); }
.err-title .err-range:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* The switches: Who (real bots or the unconfirmed visits, with their counts) and the switch "Group the same errors" (a checkbox drawn as a switch, its focus shown on the switch). */
.err-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-top: 14px; }
.err-who button b { margin-left: 4px; font-variant-numeric: var(--num); }
.err-group { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 36px; font-size: var(--fs-m); font-weight: var(--fw-medium); cursor: pointer; }
.err-group input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.err-switch { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); }
.err-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); }
.err-group input:checked + .err-switch { background: var(--accent-text); }
.err-group input:checked + .err-switch::after { left: 19px; }
.err-group input:focus-visible + .err-switch { outline: 2px solid var(--focus); outline-offset: 2px; }

/* The list: one block per kind and code (or per address and code), the colour of its left edge is the code for real bots and neutral for the unconfirmed visits; the advice how to fix it stands in its own box. */
.err-list { margin-top: 14px; }
.err-entries { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.err-entry { --c: var(--line-strong); padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--r-m); background: var(--surface-2); }
.err-entry.err-bad { --c: var(--st-error); }
.err-entry.err-warn { --c: var(--st-older); }
.err-flat .err-entry { padding: 8px 12px; }
.err-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.err-kind { font-weight: var(--fw-semibold); }
.err-n { margin-left: auto; font-size: var(--fs-l); font-variant-numeric: var(--num); }
.err-code b { margin-right: 2px; font-variant-numeric: var(--num); }
.err-path { min-width: 0; font-size: var(--fs-s); overflow-wrap: anywhere; }
.err-open { padding: 0; border: 0; background: transparent; color: var(--accent-text); text-align: left; cursor: pointer; }
.err-open:hover { text-decoration: underline; }
.err-open:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.err-tag { padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text-2); font-size: var(--fs-xs); }
.err-facts { margin: 6px 0 0; }
.err-first { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 6px 0 0; }
.err-details { margin-top: 8px; }
.err-details summary { display: inline-block; padding: 2px 0; color: var(--accent-text); font-size: var(--fs-s); font-weight: var(--fw-medium); cursor: pointer; }
.err-paths { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; margin: 8px 0 0; padding: 0; list-style: none; }
.err-paths li { display: contents; }
.err-paths li.muted { display: list-item; grid-column: 1 / -1; font-size: var(--fs-s); }
.err-bots { margin: 8px 0 0; }
.err-fix { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); color: var(--text-2); font-size: var(--fs-s); }
.err-fix p { margin: 0; }
.err-fix .err-fix-h { margin-bottom: 4px; color: var(--text); font-weight: var(--fw-semibold); }
.err-more { margin-top: 12px; }

/* The card of the Visits view: the addresses with most errors may be long, so each keeps one line (.err-pages in visits.css). */
.err-card .err-pages { margin-top: 2px; }

/* A narrow screen: a smaller sign and verdict. */
@media (max-width: 719px) {
  .err-v-sign { width: 34px; height: 34px; font-size: 17px; }
  .err-v-head { font-size: var(--fs-l); }
}
