/* Results adapt to the tester column, including when the sidebar is visible. */
.results {
    container-type: inline-size;
    --result-green: #175a46;
    --result-muted: #526761;
    --result-line: #d8e4de;
}
.results .result-top { align-items: baseline; padding-bottom: 14px; }
.results #progress { color: var(--result-muted); font-variant-numeric: tabular-nums; }
.result-run-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.result-run-summary .secondary { min-height: 40px; padding: 5px 10px; font-size: .82rem; }
.results .result-error { margin: 0 23px 12px; }
.batch-progress {
    display: block; width: 100%; height: 4px; margin: 0 0 12px; border: 0;
    appearance: none; background: #e6eee9; color: var(--result-green);
}
.batch-progress::-webkit-progress-bar { background: #e6eee9; }
.batch-progress::-webkit-progress-value { background: var(--result-green); }
.batch-progress::-moz-progress-bar { background: var(--result-green); }
.results .result-controls {
    display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
    gap: 8px 12px; padding-bottom: 16px;
}
.results .result-actions { align-items: flex-start; margin: 0; }
.results .filters {
    display: flex; border: 1px solid var(--result-line); padding: 3px; gap: 2px;
    border-radius: 11px; background: #f0f5f2;
}
.results .filters button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 34px; padding: 5px 10px; color: #364d43;
}
.results .filters button span {
    margin: 0; min-width: 1.5em; padding: 1px 5px; border-radius: 5px;
    color: inherit; background: #e0e9e3; font-variant-numeric: tabular-nums;
}
.results .filters button[aria-pressed=true] { background: var(--result-green); border-color: transparent; color: #fff; }
.results .filters button[aria-pressed=true] span { background: #ffffff26; }
.results .result-actions :is(.primary, .secondary) { min-height: 40px; }
.results .result-actions .primary { background: var(--result-green); color: white; }
.results .action-feedback { flex-basis: 100%; margin: 0; }
.results .select-visible { min-height: 40px; padding-inline: 5px; }
.results .result-address { font-weight: 650; color: #20392e; }
.results .row-pick { display: inline-grid; place-items: center; min-height: 26px; cursor: pointer; }
.results .status {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
    color: #166043; background: #e5f4eb; border-radius: 8px;
    font-size: .8rem; line-height: 1.35; font-weight: 650; overflow-wrap: anywhere;
}
.results .status::before { content: ""; flex: 0 0 7px; height: 7px; border-radius: 50%; background: currentColor; }
.results .status.bad { color: #923932; background: #fbece9; }
.results .failure-detail { line-height: 1.5; }
.results td[data-label="Response"] { font-weight: 650; font-variant-numeric: tabular-nums; }
.result-facts { display: none; }

@container (max-width: 735px) {
    .results .result-top { align-items: center; padding: 15px 12px 11px; }
    .results #progress { font-size: .78rem; }
    .results .result-error { margin-inline: 12px; }
    .results .result-controls { display: grid; padding: 0 12px 11px; gap: 6px; }
    .results .filters { width: 100%; }
    .results .filters button { flex: 1 1 auto; min-height: 40px; padding-inline: 5px; }
    .results .result-tools { display: block; }
    .results .result-actions { gap: 4px; }
    .results .result-actions :is(.primary, .secondary) { min-height: 42px; padding: 5px 9px; font-size: .8rem; }
    .results .result-disclosure[open] { flex-basis: 100%; }
    .results .result-options label { flex-wrap: wrap; }

    .results .table-scroll { overflow: visible; background: #eff4f1; border-top: 1px solid var(--result-line); }
    .results table, .results tbody { display: block; }
    .results thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    .results tbody { display: grid; gap: 8px; padding: 9px; }
    .results tbody tr {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto;
        align-items: center; gap: 2px 6px; padding: 7px 12px 9px; min-width: 0;
        border: 1px solid #d5e1d9; border-radius: 11px; background: white;
    }
    .results td, .results td:first-child { width: auto; min-width: 0; padding: 0; border: 0; }
    .results td:first-child { grid-column: 2; grid-row: 1; justify-self: end; }
    .results .row-pick { width: 38px; min-height: 38px; margin-right: -8px; }
    .results td.result-address { grid-column: 1; grid-row: 1; font-size: .89rem; line-height: 1.4; }
    .results td:nth-child(4) { grid-column: 1; grid-row: 2; text-align: start; }
    .results tr:has(td[data-label="Response"].metric-empty) td:nth-child(4) { grid-column: 1 / -1; }
    .results .failure-status > summary { min-height: 34px; }
    .results .failure-detail { max-width: none; padding: 2px 3px 5px; }
    .results td[data-label] { display: none; }
    .results td[data-label="Response"]:not(.metric-empty) {
        display: flex; grid-column: 2; grid-row: 2; align-items: center; justify-self: end;
        gap: 5px; color: var(--result-muted); white-space: nowrap; font-size: .8rem;
    }
    .results td[data-label="Response"]::before {
        content: ""; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%;
        background: linear-gradient(currentColor, currentColor) 4px 2px / 1px 4px no-repeat,
                    linear-gradient(currentColor, currentColor) 4px 5px / 3px 1px no-repeat;
    }
    .results td:nth-child(3) {
        grid-column: 1 / -1; grid-row: 3; margin-top: 5px; padding-top: 4px;
        border-top: 1px solid #e5ece7;
    }
    .results td.location-empty { display: none; }
    .results td.has-facts { display: block; }
    .results .has-facts > .country-name, .results .has-facts > .exit-ip { display: none; }
    .results .country-name { gap: 7px; font-size: .81rem; font-weight: 600; overflow-wrap: anywhere; }
    .results .exit-ip { margin: 0; }
    .results .result-facts { display: block; }
    .result-facts > summary {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        min-height: 40px; list-style: none;
    }
    .result-facts > summary::-webkit-details-marker { display: none; }
    .facts-label { display: inline-flex; align-items: center; gap: 7px; color: var(--result-green); font-size: .8rem; font-weight: 650; }
    .facts-label::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
    .result-facts[open] .facts-label::after { transform: rotate(225deg) translate(-1px,-1px); }
    .result-facts dl {
        display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 5px 12px;
        margin: 0; padding: 9px 10px; border-radius: 7px; background: #f3f7f4;
        font-size: .8rem; line-height: 1.45;
    }
    .result-facts dt { color: var(--result-muted); }
    .result-facts dd { margin: 0; justify-self: end; text-align: end; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
}
