/* ===================================================================
   Domain Health Scanner (AB-725) — public product-page variant.
   Sparser than the AB-729 panel widget: no score ring, no progress
   bar, no filter tabs. Always-visible domain input + grouped result
   rows + bottom upgrade CTA.

   Self-contained: the directive HTML carries only the `mx-dh-scanner`
   class, and every rule it relies on lives in this file. The base
   `.dh-issue` / `.dh-issue-icon` / `.dh-badge` rules below were
   originally lifted from src/css/domainHealthStatus.css's
   `.mx-dh-widget` family — re-scoped to `.mx-dh-scanner` so we don't
   need that AB-729 file linked on this page.
   =================================================================== */

.mx-dh-scanner {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Two-column layout: intro copy on the left, scanner on the right.
   Stacks under .mx-dh-scanner-layout's breakpoint. */
.mx-dh-scanner-section {
    max-width: 1140px;
    margin: 0 auto;
    padding: 60px 20px;
}

.mx-dh-scanner-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 48px;
    align-items: start;
}

.mx-dh-scanner-intro { padding-top: 4px; }

.mx-dh-scanner-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1d4d8d;
    margin-bottom: 8px;
}

.mx-dh-scanner-h2 {
    font-size: 28px;
    font-weight: 900;
    color: #222;
    margin: 0 0 14px 0;
    line-height: 1.2;
}

.mx-dh-scanner-intro p {
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
    line-height: 1.5;
}

.mx-dh-scanner-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mx-dh-scanner-checklist li {
    font-size: 13px;
    color: #555;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.45;
}

.mx-dh-scanner-checklist li::before {
    content: '\2713';
    color: #4caf50;
    font-weight: 700;
    flex-shrink: 0;
}

.mx-dh-scanner .dh-scanner-header {
    background: linear-gradient(135deg, #1d4d8d 0%, #163b6e 100%);
    color: #fff;
    padding: 22px 28px;
}

.mx-dh-scanner .dh-scanner-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px 0;
}

.mx-dh-scanner .dh-scanner-subtitle {
    font-size: 14px;
    opacity: 0.85;
}

.mx-dh-scanner .dh-scanner-body {
    padding: 22px 28px 26px;
}

.mx-dh-scanner .dh-scanner-input-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.mx-dh-scanner .dh-scanner-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    background: #fff;
    color: #333;
}

.mx-dh-scanner .dh-scanner-input:focus {
    outline: none;
    border-color: #1d4d8d;
    box-shadow: 0 0 0 3px rgba(29, 77, 141, 0.15);
}

.mx-dh-scanner .dh-scanner-input.dh-domain-input-error {
    border-color: #d9534f;
    background: #fdecea;
}

.mx-dh-scanner .dh-scanner-analyze-btn {
    background: #e67e22; /* #faa01f; */
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 10px 22px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 15px;
}

.mx-dh-scanner .dh-scanner-analyze-btn:hover { background: #e67e22; color: #fff; }
.mx-dh-scanner .dh-scanner-analyze-btn:disabled { background: #ccc; cursor: not-allowed; }
.mx-dh-scanner .dh-scanner-analyze-btn .fas { margin-left: 4px; }

.mx-dh-scanner .dh-scanner-help {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

/* Summary banner (yellow/issues, green/pass). */
.mx-dh-scanner .dh-summary-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 6px;
    margin: 22px 0 18px;
    border-left: 4px solid;
}

.mx-dh-scanner .dh-summary-issues { background: #fff8e1; border-left-color: #e8a100; }
.mx-dh-scanner .dh-summary-pass   { background: #e8f5e9; border-left-color: #4caf50; }

.mx-dh-scanner .dh-summary-icon { font-size: 22px; flex-shrink: 0; line-height: 1.2; }
.mx-dh-scanner .dh-summary-issues .dh-summary-icon { color: #e8a100; }
.mx-dh-scanner .dh-summary-pass   .dh-summary-icon { color: #4caf50; }

.mx-dh-scanner .dh-summary-text { flex: 1; min-width: 0; }

.mx-dh-scanner .dh-summary-heading {
    font-weight: 700;
    font-size: 15px;
    color: #b07800;
    margin-bottom: 3px;
}
.mx-dh-scanner .dh-summary-pass .dh-summary-heading { color: #1b5e20; }

.mx-dh-scanner .dh-summary-body { font-size: 13px; color: #555; line-height: 1.45; }

.mx-dh-scanner .dh-summary-domain {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    color: #555;
    align-self: flex-start;
    flex-shrink: 0;
}

/* Section headers (FAILURES / WARNINGS / PASSING). */
.mx-dh-scanner .dh-section-header {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 18px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
}

.mx-dh-scanner .dh-section-header-crit { color: #c0392b; }
.mx-dh-scanner .dh-section-header-warn { color: #b07800; }
.mx-dh-scanner .dh-section-header-pass { color: #1b5e20; }
.mx-dh-scanner .dh-section-header .fas { margin-right: 6px; }

/* Base issue/icon/badge rules (re-scoped from .mx-dh-widget in
   domainHealthStatus.css). The .dh-issue-row block below tweaks
   sizes/spacing for the looser scanner layout, but inherits the
   flex layout, icon shape, and badge pill styling from these. */
.mx-dh-scanner .dh-issue {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 14px;
    border-top: 1px solid #f2f2f2;
    transition: background 0.1s;
}

.mx-dh-scanner .dh-issue:hover { background: #fafafa; }

.mx-dh-scanner .dh-issue-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-top: 1px;
}

.mx-dh-scanner .dh-icon-crit { background: #fde8e8; color: #c0392b; }
.mx-dh-scanner .dh-icon-warn { background: #fef6e4; color: #b07800; }
.mx-dh-scanner .dh-icon-pass { background: #e8f5e9; color: #1b5e20; }

.mx-dh-scanner .dh-issue-body { flex: 1; min-width: 0; }

.mx-dh-scanner .dh-issue-title {
    font-size: 12px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mx-dh-scanner .dh-issue-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.45;
    margin-top: 2px;
}

.mx-dh-scanner .dh-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    flex-shrink: 0;
    margin-top: 2px;
    white-space: nowrap;
    border: 1px solid;
    letter-spacing: 0.03em;
    align-self: flex-start;
}

.mx-dh-scanner .dh-badge.crit { background: #fde8e8; border-color: #f5b7b7; color: #8b1a1a; }
.mx-dh-scanner .dh-badge.warn { background: #fef6e4; border-color: #f8d77e; color: #7a5200; }
.mx-dh-scanner .dh-badge.pass { background: #e8f5e9; border-color: #a5d6a7; color: #1b5e20; }

/* Issue rows — looser than the panel variant. Override panel sizes. */
.mx-dh-scanner .dh-issue-row {
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    border-top: 1px solid #eee;
}

.mx-dh-scanner .dh-issue-row .dh-issue-icon {
    width: 34px;
    height: 34px;
    font-size: 14px;
    margin-top: 0;
}

.mx-dh-scanner .dh-issue-row .dh-issue-title {
    font-size: 14px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    margin-bottom: 3px;
}

.mx-dh-scanner .dh-issue-row .dh-issue-desc {
    font-size: 12px;
    color: #666;
    margin-top: 0;
}

.mx-dh-scanner .dh-issue-row .dh-badge {
    font-size: 10px;
    padding: 3px 9px;
    margin-top: 0;
    align-self: center;
}

/* CTA cards (bookend the results, top and bottom). */
.mx-dh-scanner .dh-cta-card {
    background: linear-gradient(135deg, #1d4d8d 0%, #163b6e 100%);
    color: #fff;
    padding: 22px 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.mx-dh-scanner .dh-cta-card-top { margin-bottom: 22px; }
.mx-dh-scanner .dh-cta-card-bottom { margin-top: 22px; }

.mx-dh-scanner .dh-cta-text { flex: 1; min-width: 0; }

.mx-dh-scanner .dh-cta-heading {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.mx-dh-scanner .dh-cta-body {
    font-size: 13px;
    opacity: 0.92;
    line-height: 1.5;
}

.mx-dh-scanner .dh-cta-footer {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 10px;
}

.mx-dh-scanner .dh-cta-footer .fas { margin-right: 4px; }

.mx-dh-scanner .dh-cta-btn {
    background: #f39c12;
    color: #fff;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    border: none;
}

.mx-dh-scanner .dh-cta-btn:hover {
    background: #e67e22;
    color: #fff;
    text-decoration: none;
}

/* Collapse the two-column layout below tablet width. */
@media (max-width: 980px) {
    .mx-dh-scanner-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* Stack input + button + CTA card on narrow viewports. */
@media (max-width: 540px) {
    .mx-dh-scanner-section { padding: 32px 16px; }
    .mx-dh-scanner-h2 { font-size: 24px; }
    .mx-dh-scanner .dh-scanner-input-row { flex-direction: column; }
    .mx-dh-scanner .dh-scanner-analyze-btn { width: 100%; }
    .mx-dh-scanner .dh-cta-card { flex-direction: column; align-items: stretch; }
    .mx-dh-scanner .dh-cta-btn { text-align: center; }
}
