/* Lead Awareness hub (/Lead). Loaded only by Views/Lead/_LeadLayout.cshtml.
   Colors are the site's: navy #003a70, blue #0066CC. Every text/background pair below meets WCAG 2.1 AA. */

.lead-hub {
    --lead-navy: #003a70;
    --lead-blue: #0066cc;
    --lead-border: #d9e2ec;
    --lead-tint: #e8f2fc;
    color: #222;
    font-size: 17px;
}

.lead-hub h2 {
    color: var(--lead-navy);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 2rem 0 0.75rem;
    scroll-margin-top: 120px;
}

.lead-hub h3 {
    color: var(--lead-navy);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    margin: 1.5rem 0 0.5rem;
    scroll-margin-top: 120px;
}

.lead-hub p,
.lead-hub li {
    line-height: 1.6;
}

.lead-hub p {
    margin: 0 0 0.9rem;
}

.lead-hub ul,
.lead-hub ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

.lead-hub ul {
    list-style: disc;
}

.lead-hub ol {
    list-style: decimal;
}

.lead-hub li {
    margin-bottom: 0.4rem;
}

.lead-hub a:not(.lead-btn) {
    color: var(--lead-blue);
    text-decoration: underline;
}

.lead-hub a:focus-visible,
.lead-hub button:focus-visible,
.lead-hub input:focus-visible,
.lead-hub summary:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

/* Action bar: the same three tasks on every page (scoped past .lead-hub ul) */
.lead-hub .lead-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.lead-actions li {
    margin: 0;
    flex: 1 1 14rem;
}

.lead-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1rem;
    border: 2px solid var(--lead-navy);
    border-radius: 4px;
    background: var(--lead-navy);
    color: #fff;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.lead-btn:hover,
.lead-btn:focus-visible {
    background: #00284d;
    color: #fff;
    text-decoration: underline;
}

.lead-btn-secondary {
    background: #fff;
    color: var(--lead-navy);
}

.lead-btn-secondary:hover,
.lead-btn-secondary:focus-visible {
    background: var(--lead-tint);
    color: var(--lead-navy);
}

.lead-btn-inline {
    display: inline-flex;
    margin: 0.25rem 0.5rem 0.25rem 0;
}

/* Hub menu beside (desktop) or above (mobile) the page content */
.lead-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .lead-layout {
        grid-template-columns: 15rem minmax(0, 1fr);
        gap: 2.5rem;
    }
}

.lead-subnav h2 {
    font-size: 16px;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lead-subnav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 3px solid var(--lead-border);
}

.lead-subnav li {
    margin: 0;
}

.lead-subnav a {
    display: block;
    padding: 0.45rem 0.75rem;
    color: var(--lead-navy) !important;
    text-decoration: none !important;
    margin-left: -3px;
    border-left: 3px solid transparent;
}

.lead-subnav a:hover {
    text-decoration: underline !important;
}

.lead-subnav a[aria-current="page"] {
    border-left-color: var(--lead-blue);
    background: var(--lead-tint);
    font-weight: 700;
}

.lead-content {
    max-width: 52rem;
}

.lead-content > h2:first-child {
    margin-top: 0;
}

.lead-intro {
    font-size: 21px;
    line-height: 1.5;
    font-weight: 600;
    color: #1a1a1a;
}

/* Callouts */
.lead-callout {
    border-left: 6px solid var(--lead-navy);
    background: var(--lead-tint);
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
}

.lead-callout > :last-child {
    margin-bottom: 0;
}

.lead-callout h2,
.lead-callout h3 {
    margin-top: 0;
}

.lead-callout-warning {
    border-left-color: #8a1c1c;
    background: #fdf1f1;
}

.lead-steps {
    counter-reset: lead-step;
    list-style: none !important;
    margin-left: 0 !important;
}

.lead-steps > li {
    position: relative;
    padding-left: 2.75rem;
    margin-bottom: 1rem;
}

.lead-steps > li::before {
    counter-increment: lead-step;
    content: counter(lead-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--lead-navy);
    color: #fff;
    font-weight: 700;
    text-align: center;
    line-height: 2rem;
}

/* Steps split by subheadings keep counting (Inspection and Replacement: 1-2, 3-4, 5-8) */
.lead-steps-from-3 {
    counter-reset: lead-step 2;
}

.lead-steps-from-5 {
    counter-reset: lead-step 4;
}

.lead-steps ul {
    margin-top: 0.5rem;
}

/* Two-column list on wider screens */
@media (min-width: 768px) {
    .lead-columns {
        columns: 2;
        column-gap: 2.5rem;
    }

    .lead-columns > li {
        break-inside: avoid;
    }
}

/* "We are still updating" notice with an info mark */
.lead-notice {
    position: relative;
    padding: 0.75rem 1rem 0.75rem 3.25rem;
    border-left: 4px solid var(--lead-blue);
    background: var(--lead-tint);
}

.lead-notice::before {
    content: "i";
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--lead-navy);
    color: #fff;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, serif;
    text-align: center;
    line-height: 1.5rem;
}

/* Tables: simple, real header cells, scroll sideways on narrow screens */
.lead-table-wrap {
    overflow-x: auto;
    margin: 0 0 1.25rem;
}

.lead-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.lead-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 700;
    color: var(--lead-navy);
    padding: 0 0 0.5rem;
}

.lead-table th,
.lead-table td {
    border: 1px solid var(--lead-border);
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.lead-table thead th {
    background: var(--lead-navy);
    color: #fff;
}

.lead-table tbody th {
    background: #f5f8fb;
    font-weight: 700;
}

/* A smaller second line inside a table cell */
.lead-table-note {
    display: block;
    margin-top: 0.4rem;
    font-size: 15px;
    font-weight: 400;
    color: #333;
}

/* Numbered "What to do now" steps inside the result tables */
.lead-table-steps {
    margin: 0;
    padding-left: 1.25rem;
}

.lead-table-steps > li + li {
    margin-top: 0.4rem;
}

/* Address lookup */
.lead-lookup {
    border: 1px solid var(--lead-border);
    border-top: 5px solid var(--lead-blue);
    border-radius: 4px;
    padding: 1.25rem;
    background: #fff;
    margin-bottom: 1.5rem;
}

.lead-lookup label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.lead-lookup .lead-hint {
    color: #4a4a4a;
    margin-bottom: 0.5rem;
}

.lead-lookup-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lead-lookup input[type="text"] {
    flex: 1 1 16rem;
    min-height: 48px;
    padding: 0.5rem 0.75rem;
    border: 2px solid #555;
    border-radius: 4px;
    font-size: 18px;
}

.lead-lookup button {
    flex: 0 0 auto;
}

/* As-you-type suggestions under the address box (wwwroot/js/lead-lookup.js) */
.lead-combo {
    position: relative;
    flex: 1 1 16rem;
    min-width: 0;
}

.lead-lookup .lead-combo input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.lead-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    margin-top: 2px;
    max-height: 22rem;
    overflow-y: auto;
    background: #fff;
    border: 2px solid #555;
    border-radius: 4px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.lead-hub .lead-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lead-hub .lead-suggestion {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    min-height: 44px;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--lead-border);
    cursor: pointer;
}

.lead-hub .lead-suggestion:last-child {
    border-bottom: 0;
}

.lead-hub .lead-suggestion:hover,
.lead-hub .lead-suggestion.is-active {
    background: var(--lead-tint);
}

.lead-hub .lead-suggestion.is-active {
    outline: 3px solid var(--lead-blue);
    outline-offset: -3px;
}

.lead-suggestion-address {
    font-weight: 600;
}

.lead-hub .lead-suggestions-note {
    margin: 0;
    padding: 0.5rem 0.75rem;
    color: #4a4a4a;
    border-top: 1px solid var(--lead-border);
}

.lead-hub .lead-suggestions ul:empty + .lead-suggestions-note {
    border-top: 0;
}

.lead-result {
    border: 1px solid var(--lead-border);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    margin: 0 0 1rem;
    background: #fff;
}

.lead-result h3 {
    margin-top: 0;
}

.lead-result dl {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem 1rem;
    margin: 0 0 0.75rem;
}

@media (min-width: 576px) {
    .lead-result dl {
        grid-template-columns: max-content minmax(0, 1fr);
    }
}

.lead-result dt {
    font-weight: 700;
}

.lead-result dd {
    margin: 0 0 0.25rem;
}

.lead-result-meta {
    color: #4a4a4a;
    font-size: 15px;
}

/* Category label: text carries the meaning, the color only repeats it */
.lead-category {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 3px;
    font-weight: 700;
    border: 1px solid currentColor;
}

.lead-category-lead {
    color: #8a1c1c;
    background: #fdf1f1;
}

.lead-category-galvanized {
    color: #7a4b00;
    background: #fff6e5;
}

.lead-category-unknown {
    color: #3d3d3d;
    background: #f2f2f2;
}

.lead-category-notlead {
    color: #0b5a36;
    background: #ecf8f1;
}

/* Map */
.lead-map-frame {
    width: 100%;
    height: 70vh;
    min-height: 420px;
    border: 1px solid var(--lead-border);
}

.lead-figure {
    margin: 1rem 0 1.5rem;
}

.lead-figure img {
    max-width: 100%;
    height: auto;
}

.lead-figure figcaption {
    color: #4a4a4a;
    font-size: 15px;
    margin-top: 0.5rem;
}

/* Contact block and reviewed stamp */
.lead-contact {
    border: 1px solid #b6d4f2;
    background: var(--lead-tint);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-top: 2.5rem;
}

.lead-contact h2 {
    margin-top: 0;
    font-size: 20px;
}

.lead-contact ul {
    list-style: none;
    margin: 0 0 0.75rem;
}

.lead-reviewed {
    color: #4a4a4a;
    font-size: 15px;
    margin: 0;
}

.lead-archive summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--lead-navy);
}

/* Reviewer notes (never rendered in Production; see TagHelpers/ReviewNoteTagHelper.cs) */
.review-note {
    display: inline-block;
    margin: 0.25rem 0;
    padding: 0.2rem 0.5rem;
    border: 2px dashed #b35c00;
    background: #fff4d6;
    color: #5c2f00;
    font-size: 15px;
    line-height: 1.4;
}

/* Full-screen map page */
.lead-mapbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.25rem;
    padding: 0.5rem 1rem;
    background: #003a70;
    color: #fff;
    font-family: "Open Sans", Arial, sans-serif;
}

.lead-mapbar h1 {
    font-size: 18px;
    margin: 0;
    color: #fff;
}

.lead-mapbar a {
    color: #fff;
    text-decoration: underline;
}

.lead-mapbar a:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 2px;
}

.lead-map-full {
    display: block;
    width: 100%;
    height: calc(100vh - 3rem);
    border: 0;
}

@media print {
    .lead-actions,
    .lead-subnav,
    .lead-map-frame,
    .review-note {
        display: none !important;
    }
}
