/* E-Mail-Header-Analysator: Ampelkarten, Zustellweg als Zeitachse, Tabellen. */
[data-tl="mail-header"] [hidden] { display: none !important; }
.tl-mh-input { min-height: 240px; font-size: 13px; }
@media (min-width: 900px) { .tl-mh-input { min-height: 300px; } }

/* Ampelkarten */
.tl-mh-cards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.tl-mh-card { position: relative; min-width: 0; padding: 12px 14px 12px 18px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.tl-mh-card::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--line-strong); }
.tl-mh-card.is-ok::before { background: var(--tl-ok); }
.tl-mh-card.is-warn::before { background: var(--tl-warn); }
.tl-mh-card.is-err::before { background: var(--tl-err); }
.tl-mh-card.is-info::before { background: hsl(var(--tl-hue) 70% 55%); }
.tl-mh-card__label { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.tl-mh-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.tl-mh-card.is-ok .tl-mh-dot { background: var(--tl-ok); }
.tl-mh-card.is-warn .tl-mh-dot { background: var(--tl-warn); }
.tl-mh-card.is-err .tl-mh-dot { background: var(--tl-err); }
.tl-mh-card.is-info .tl-mh-dot { background: hsl(var(--tl-hue) 70% 55%); }
.tl-mh-card__value { margin-top: 4px; font: 600 15px/1.35 var(--font-mono); color: var(--ink); overflow-wrap: anywhere; }
.tl-mh-card--res.is-ok .tl-mh-card__value { color: var(--tl-ok); }
.tl-mh-card--res.is-warn .tl-mh-card__value { color: var(--tl-warn); }
.tl-mh-card--res.is-err .tl-mh-card__value { color: var(--tl-err); }
.tl-mh-card__sub { margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); overflow-wrap: anywhere; }

.tl-mh-checks { display: grid; gap: 8px; }
.tl-mh-checks .tl-note > div { min-width: 0; overflow-wrap: anywhere; }

/* Zustellweg */
.tl-mh-hops { list-style: none; margin: 0; padding: 0; display: grid; }
.tl-mh-hop { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
.tl-mh-hop::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--line); }
.tl-mh-hop:last-child { padding-bottom: 0; }
.tl-mh-hop:last-child::before { display: none; }
.tl-mh-hop__num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 600 13px/1 var(--font-mono); color: var(--ink-2); background: var(--bg); border: 1.5px solid var(--line-strong); }
.tl-mh-hop.is-slow .tl-mh-hop__num { color: var(--tl-warn); border-color: var(--tl-warn); background: var(--tl-warn-soft); }
.tl-mh-hop__main { min-width: 0; padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.tl-mh-hop.is-slow .tl-mh-hop__main { border-color: color-mix(in srgb, var(--tl-warn) 40%, transparent); }
.tl-mh-hop__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.tl-mh-hop__by { min-width: 0; font: 600 14px/1.35 var(--font-mono); color: var(--ink); overflow-wrap: anywhere; }
.tl-mh-hop__time { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-mh-hop__from { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.tl-mh-hop__from code { font-size: 12.5px; }
.tl-mh-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tl-mh-badge { display: inline-flex; align-items: center; max-width: 100%; padding: 1px 8px; font: 600 11.5px/1.6 var(--font-mono); color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow-wrap: anywhere; vertical-align: baseline; }
.tl-mh-badge.is-ok { color: var(--tl-ok); background: var(--tl-ok-soft); border-color: color-mix(in srgb, var(--tl-ok) 30%, transparent); }
.tl-mh-badge.is-warn { color: var(--tl-warn); background: var(--tl-warn-soft); border-color: color-mix(in srgb, var(--tl-warn) 30%, transparent); }
.tl-mh-badge.is-err { color: var(--tl-err); background: var(--tl-err-soft); border-color: color-mix(in srgb, var(--tl-err) 30%, transparent); }
.tl-mh-badge.is-info { color: hsl(var(--tl-hue) 70% 42%); background: hsl(var(--tl-hue) 90% 55% / .08); border-color: hsl(var(--tl-hue) 70% 55% / .25); }
[data-theme="dark"] .tl-mh-badge.is-info { color: hsl(var(--tl-hue) 90% 72%); }
.tl-mh-delay { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.tl-mh-delay > span { text-align: right; }
.tl-mh-delay--start { display: block; }
.tl-mh-bar { height: 6px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; }
.tl-mh-bar__fill { width: 0; height: 100%; border-radius: inherit; background: hsl(var(--tl-hue) 70% 52%); }
.tl-mh-hop.is-slow .tl-mh-bar__fill { background: var(--tl-warn); }
.tl-mh-hop.is-slow .tl-mh-delay { color: var(--tl-warn); font-weight: 600; }
.tl-mh-raw { margin-top: 8px; }
.tl-mh-raw > summary { cursor: pointer; font-size: 12.5px; color: var(--ink-3); border-radius: 6px; }
.tl-mh-raw > summary:focus-visible { outline: 0; box-shadow: var(--tl-focus); }
.tl-mh-raw pre { margin: 6px 0 0; padding: 8px 10px; max-height: 220px; overflow: auto; font: 12px/1.5 var(--font-mono); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 8px; }

/* Tabellen: Werte umbrechen, breite Tabellen scrollen im Rahmen statt in der Seite */
.tl-mh-table th, .tl-mh-table td { white-space: normal; vertical-align: top; }
.tl-mh-table td.tl-mh-name { white-space: nowrap; font-weight: 600; color: var(--ink); }
.tl-mh-table td.tl-mh-num { width: 1%; color: var(--ink-3); }
.tl-mh-table td.tl-mh-val { min-width: 180px; overflow-wrap: anywhere; word-break: break-word; }
.tl-mh-table td small { display: block; margin-top: 2px; font: 500 12px/1.4 var(--font-sans); color: var(--ink-3); white-space: normal; overflow-wrap: anywhere; }
.tl-mh-table td.tl-mh-name code { font: 600 13px var(--font-mono); }
.tl-mh-table td.is-ok { color: var(--tl-ok); }
.tl-mh-table td.is-warn { color: var(--tl-warn); }
.tl-mh-table td.is-err { color: var(--tl-err); }
.tl-mh-table td.is-info { color: var(--ink); }
.tl-mh-fields td.tl-mh-val { min-width: 220px; }
[data-fields] .tl-table-wrap { max-height: 640px; overflow: auto; }
[data-fields] thead th { position: sticky; top: 0; z-index: 1; }
.tl-mh-sub { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }

@media (max-width: 560px) {
  .tl-mh-hop { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; }
  .tl-mh-hop__num { width: 26px; height: 26px; font-size: 12px; }
  .tl-mh-hop::before { left: 12px; top: 28px; }
  .tl-mh-hop__main { padding: 9px 10px; }
  .tl-mh-delay { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tl-mh-delay > span { text-align: left; }
  .tl-mh-table td.tl-mh-val { min-width: 150px; }
  .tl-mh-fields td.tl-mh-val { min-width: 180px; }
}
