/* Scoped styles for the mail send-test page (send-test.html / de/send-test.html).
 * MUST be an external stylesheet: the site's CSP is `style-src 'self'` (no
 * unsafe-inline, deliberately — internet.nl 100%), so the browser BLOCKS inline
 * <style> blocks, style="" attributes and JS-injected <style> elements. */

.st-app { max-width: 720px; margin: 8px auto 0; }
/* The hidden attribute only works via the UA's `display: none` — any author
   `display: flex` on the same element overrides it (empty expired box showing,
   the generate button never disappearing). This guard restores hidden's meaning
   for everything inside the app. */
.st-app [hidden] { display: none !important; }
.st-btn { display: inline-flex; align-items: center; gap: 9px; padding: 14px 26px; font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--brand-ink); background: var(--brand); border: none; border-radius: 0; cursor: pointer; box-shadow: none; transition: background 0.18s, transform 0.06s; }
.st-btn:hover { background: var(--brand-dark); }
.st-btn:active { transform: translateY(1px); }
.st-btn:disabled { opacity: 0.6; cursor: progress; box-shadow: none; }
.st-btn-secondary { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; }
:root[data-theme='dark'] .st-btn-secondary { color: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .st-btn-secondary { color: var(--text); } }
.st-btn-secondary:hover { background: var(--bg-sunk); border-color: var(--brand); }
.st-addr { margin-top: 8px; padding: 22px; background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: 0; box-shadow: none; }
.st-instr { margin: 0 0 12px; }
.st-address { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
#st-email { flex: 1; min-width: 240px; padding: 14px 16px; font-family: var(--font-mono); font-size: 1.05rem; color: var(--text); background: var(--bg-sunk); border: 1px dashed var(--border-strong); border-radius: 0; word-break: break-all; user-select: all; }
.st-copy { padding: 0 18px; font-family: var(--font-body); font-weight: 600; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 0; cursor: pointer; }
.st-copy:hover { border-color: var(--brand); }
.st-status { margin-top: 16px; display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }
.st-status.s-fail { color: var(--fail); }
.st-spin { flex: none; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; display: inline-block; animation: st-rot 0.8s linear infinite; }
@keyframes st-rot { to { transform: rotate(360deg); } }
.st-result-head { display: flex; align-items: center; gap: 16px; margin: 6px 0 18px; }
.st-result-meta h2,
.st-result-meta h3 { margin: 0 0 2px; }
/* Flat-list report card (solo reports / fallback). Direct-child scoped:
   the .findings INSIDE the collapsible group cards must keep the plain
   styles.css look (border-top only), not grow a second card frame. */
.st-report > .findings,
.st-sendreport > .findings,
#st-recv > .findings { display: flex; flex-direction: column; gap: 0; margin-top: 4px; border: 1px solid var(--border-strong); border-radius: 0; background: var(--bg-elev); padding: 4px 18px; box-shadow: none; }
.st-what { margin-top: 40px; }
.st-more { margin-top: 18px; }

/* Prominent primary CTA — the home scan button's design language (arrow), just
   larger and centred. */
#st-start { display: flex; width: fit-content; margin: 26px auto 6px; padding: 17px 38px; font-size: 1.12rem; font-weight: 700; letter-spacing: 0.01em; }
#st-start::after { content: '→'; font-family: var(--font-mono); font-weight: 700; transition: transform 0.18s; }
#st-start:hover::after { transform: translateX(4px); }

/* Waiting state: three bouncing brand dots next to the status text. */
.st-waiting { display: flex; align-items: center; gap: 14px; }
.st-dots { display: inline-flex; gap: 7px; flex: none; }
.st-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--brand); animation: st-bounce 1.15s ease-in-out infinite; }
.st-dots i:nth-child(2) { animation-delay: 0.18s; }
.st-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes st-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.45; } 40% { transform: translateY(-7px); opacity: 1; } }
.st-waiting-text { display: flex; flex-direction: column; gap: 1px; line-height: 1.45; text-align: left; }
.st-waiting-text strong { color: var(--text); font-weight: 600; }
.st-waiting-text .muted { color: var(--text-muted); font-size: 0.9rem; }

/* Expired-address card */
.st-expired { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; padding: 14px 16px; background: var(--warn-bg); border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent); border-radius: 0; }
.st-expired svg { flex: none; width: 24px; height: 24px; color: var(--warn); margin-top: 1px; }
.st-expired strong { color: var(--text); font-weight: 600; }
.st-expired .muted { color: var(--text-muted); font-size: 0.92rem; }

/* Reduced motion: no positional movement, but a gentle opacity pulse so the
   waiting state never looks dead. */
@media (prefers-reduced-motion: reduce) {
  .st-spin { animation: none; }
  .st-dots i { animation: st-fade 1.6s ease-in-out infinite; }
}
@keyframes st-fade { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* Bonus outbound analysis of the proof message, shown on the receive-test page
   below the receive result (Phase 1 cross-integration). A top rule separates it
   from the primary receive report; it reuses .st-result-head / .findings. */
.st-sendreport { margin-top: 26px; padding-top: 22px; border-top: 2px solid var(--border-strong); }
/* Reason banner shown above the bonus report when the receive test couldn't unlock. */
.st-reject-banner { margin: 0 0 18px; padding: 14px 16px; background: var(--bg-sunk); border: 1px solid var(--border-strong); border-left: 3px solid var(--brand); border-radius: 0; }

/* ---------- Grouped report structure (mail-test-groups.js) ---------- */
/* .svc-heading / .top-issues / .ti-* / .jump-flash come from styles.css
   (shared with the main scan) – below is only the page-scoped tuning. */

/* Collapsible group cards (details.module.st-group – card look, summary
   row, chevron and counts come from styles.css, shared with the scan) */
.st-groups { margin-top: 4px; }

/* Triage block sits between the result head and the group cards */
.st-report .top-issues { margin: 16px 0 18px; }

/* Group label on the right of a triage row (the scan shows the module there).
   Shrinkable with ellipsis: the long policy label must not crush the
   finding label next to it. */
.ti-group {
  flex-shrink: 1;
  min-width: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  /* visually icon-less and tight on phones, but kept in the accessibility
     tree (display:none would silence it for screen readers) */
  .ti-group {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Native-anchor fallback for the triage jump targets: must clear the sticky
   site header (~57px) – the JS path scrolls block:center and is unaffected. */
.finding[id] { scroll-margin-top: 72px; }

/* Mirror the main scan's mobile tightening – the page-scoped padding rule
   above would otherwise out-specify styles.css' 640px block. */
@media (max-width: 640px) {
  .st-report > .findings,
  .st-sendreport > .findings,
  #st-recv > .findings { padding: 2px 14px 14px; }
}

/* Scan-style overview head of the primary reports (classes from styles.css).
   The 5–8 group bars stack 2-up on phones, 1-up on very narrow ones. */
@media (max-width: 640px) {
  .st-overview .cat-bars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .st-overview .cat-bars { grid-template-columns: 1fr; }
}

/* Unrated overview bars: "checked, all good" (solid pass fill) vs. "nothing
   gradable" (neutral hatching) – both must be distinguishable from a real 0%. */
.st-overview .bar > .bar-ok { width: 100%; transform: none; background: var(--pass); }
.st-overview .bar > .bar-na {
  width: 100%;
  transform: none;
  opacity: 0.55;
  background: repeating-linear-gradient(-45deg, var(--bg-sunk) 0 5px, var(--border) 5px 10px);
}
/* Matching card chip for all-good unrated groups */
.chip-ok { background: var(--pass-bg); box-shadow: none; }

/* Overview title (h2 in the page-level reports, h3 in the embedded bonus
   sections – identical look either way). Mirrors the scan's .overview-text
   h2 typography, but wraps at word boundaries: the scan rule was designed
   for arbitrary DOMAIN NAMES (word-break:break-all), our titles are prose. */
.st-overview .ov-title {
  margin: 0 0 5px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  word-break: normal;
  overflow-wrap: break-word;
}
