/* email-headers.css – Email Header Analyser */
.eh-field { text-align: left; }
.eh-field label { display: block; margin-bottom: 6px; font-size: .85rem; color: var(--muted); }
#eh-input { width: 100%; min-height: 180px; resize: vertical; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .82rem; line-height: 1.45; }
.eh-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.eh-buttons button { margin: 0; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.eh-private { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; font-size: .85rem; color: #86efac; text-align: left; }
.eh-private svg { flex-shrink: 0; margin-top: 2px; }

.eh-results { text-align: left; }
.eh-results h2 { margin: 26px 0 10px; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.eh-muted { color: var(--muted); }
.eh-sub { margin: -4px 0 10px; font-size: .82rem; }
.eh-results a { color: var(--accent); text-decoration: none; }
.eh-results a:hover { text-decoration: underline; }

.eh-summary { margin-top: 20px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.eh-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.eh-row:last-child { border-bottom: 0; }
.eh-k { color: var(--muted); }
.eh-v { overflow-wrap: anywhere; }
.eh-v code, .eh-ip code { font-size: .85rem; margin: 0; padding: 1px 5px; display: inline; }
.eh-row:first-child .eh-v { font-weight: 600; }

.eh-auth { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.eh-authbox { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.02); }
.eh-authname { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; }
.eh-authtext { margin-top: 6px; font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.eh-pill { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.eh-pass { background: rgba(34,197,94,.14); color: #86efac; }
.eh-fail { background: rgba(239,68,68,.14); color: #fca5a5; }
.eh-warn { background: rgba(245,158,11,.14); color: #fcd34d; }
.eh-info { background: rgba(148,163,184,.14); color: var(--muted); }
.eh-note { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }

.eh-findings { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.eh-findings li { padding: 10px 14px 10px 36px; border-radius: 10px; font-size: .9rem; position: relative; line-height: 1.45; }
.eh-findings li::before { position: absolute; left: 13px; top: 10px; font-weight: 700; }
.eh-findings li.ok { background: rgba(34,197,94,.08); color: #bbf7d0; }
.eh-findings li.ok::before { content: "✓"; color: #86efac; }
.eh-findings li.warn { background: rgba(245,158,11,.08); color: #fde68a; }
.eh-findings li.warn::before { content: "!"; color: #fcd34d; }

.eh-kv td.k { font-family: inherit; color: var(--muted); white-space: nowrap; width: 1%; }
.eh-kv td { font-size: .82rem; }
.eh-hops td { font-family: inherit; font-size: .85rem; }
.eh-hops td.n { color: var(--muted); width: 1%; }
.eh-hops td.t { white-space: nowrap; color: var(--muted); }
.eh-hops td.d { white-space: nowrap; font-weight: 600; min-width: 90px; }
.eh-hops td.d.slow { color: #fcd34d; }
.eh-hops td.d.bad { color: #fca5a5; }
.eh-ip { margin-top: 3px; font-size: .78rem; }
.eh-with { font-size: .78rem; }
.eh-bar { display: block; height: 4px; margin-top: 5px; border-radius: 999px; background: rgba(255,255,255,.06); }
.eh-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.eh-hops td.d.slow .eh-bar span { background: #f59e0b; }
.eh-hops td.d.bad .eh-bar span { background: #ef4444; }

.eh-all { margin-top: 24px; }
.eh-all summary { cursor: pointer; color: var(--accent); font-size: .9rem; }
.eh-all .table-wrap { margin-top: 10px; max-height: 480px; overflow: auto; }

@media (max-width: 600px) {
  .eh-row { grid-template-columns: 1fr; gap: 2px; }
  /* Delivery path as stacked cards on phones */
  .eh-hops, .eh-hops tbody { display: block; }
  .eh-hops tr:first-child { display: none; }
  .eh-hops tr { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "n from d" "n to d" "n t t";
                column-gap: 10px; row-gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .eh-hops td { display: block; padding: 0; border: 0; overflow-wrap: anywhere; }
  .eh-hops td.n { grid-area: n; }
  .eh-hops td:nth-child(2) { grid-area: from; }
  .eh-hops td:nth-child(3) { grid-area: to; }
  .eh-hops td:nth-child(3)::before { content: "→ "; color: var(--muted); }
  .eh-hops td.t { grid-area: t; font-size: .75rem; }
  .eh-hops td.d { grid-area: d; min-width: 64px; text-align: right; }
  .eh-kv td { overflow-wrap: anywhere; }
}
