﻿/* ======================================================================
   MyHEAT - Locate Your Home Heat Loss Profile
   Public landing page styles.

   BRD constraints:
     - Font:            Lato
     - Hyperlinks:      #008297
     - Search button:   #142c41 (Dark Steel Gray)
     - Valid checkmark: #142c41 (Dark Steel Gray)
   ====================================================================== */

:root {
    --myheat-link: #008297;
    --myheat-dark-gray: #142c41;
    --myheat-valid: #142c41;
    --myheat-invalid: #c62828;
    --myheat-text: #2b2b2b;
    --myheat-muted: #6b6b6b;
    --myheat-bg: #f5f5f5;
}

/* ----------------------------------------------------------------------
   Global typography
   ---------------------------------------------------------------------- */
.public-layout,
.myheat-page {
    font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    color: var(--myheat-text);
}

    .myheat-page a,
    .public-layout a {
        color: var(--myheat-link);
    }

        .myheat-page a:hover,
        .myheat-page a:focus,
        .public-layout a:hover,
        .public-layout a:focus {
            color: var(--myheat-link);
            text-decoration: underline;
        }

/* ----------------------------------------------------------------------
   Layout chrome - header / footer
   Mirrors /Public/PartnerApplication: navbar-default header, logo +
   brand text on the left, simple two-column footer.
   ---------------------------------------------------------------------- */
.public-layout__header.navbar {
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 0;
    margin-bottom: 0;
    min-height: 64px;
}

.public-layout__header .navbar-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    float: none;
}

.public-layout__logo.navbar-brand {
    height: auto;
    padding: 12px 15px;
}

.public-layout__logo img {
    height: 40px;
    width: auto;
    display: block;
}

.public-layout__brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--myheat-dark-gray);
    line-height: 64px;
    margin-left: 8px;
}

@media (max-width: 600px) {
    .public-layout__brand {
        line-height: 1.2;
        font-size: 14px;
        flex-basis: 100%;
        text-align: center;
        padding: 0 15px 10px;
        margin-left: 0;
    }
}

.public-layout__footer {
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
    padding: 18px 0;
    margin-top: 40px;
    font-size: 13px;
    color: var(--myheat-muted);
}

.public-layout__footer-left {
    text-align: left;
    line-height: 1.6;
}

.public-layout__footer-right {
    text-align: right;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .public-layout__footer-left,
    .public-layout__footer-right {
        text-align: center;
    }

    .public-layout__footer-left {
        margin-bottom: 12px;
    }
}

/* ----------------------------------------------------------------------
   Hero
   ---------------------------------------------------------------------- */
.myheat-hero {
    position: relative;
    overflow: hidden;
    background: #1c2a3a;
    min-height: 240px;
}

.myheat-hero__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    max-height: 420px;
}

.myheat-hero__overlay {
    position: relative;
    z-index: 1;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    text-align: left !important;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    padding: 60px !important;
    min-height: 240px;
}

.myheat-hero__inner {
    max-width: 720px;
    width: 100%;
    text-align: left !important;
}

.myheat-hero__title {
    font-weight: 700;
    margin: 0 0 12px 0;
    font-size: 38px;
    line-height: 1.15;
    text-align: left !important;
}

.myheat-hero__subtitle {
    font-size: 18px;
    font-style: italic;
    margin: 0;
    max-width: 640px;
    text-align: left !important;
}

@media (max-width: 767px) {
    .myheat-hero {
        min-height: 180px;
    }

    .myheat-hero__overlay {
        padding: 28px 20px !important;
        min-height: 180px;
    }

    .myheat-hero__title {
        font-size: 22px;
    }

    .myheat-hero__subtitle {
        font-size: 14px;
    }

    .myheat-hero__image {
        max-height: 220px;
    }
}

@media (max-width: 480px) {
    .myheat-hero {
        min-height: 150px;
    }

    .myheat-hero__overlay {
        padding: 20px 16px !important;
        min-height: 150px;
    }

    .myheat-hero__title {
        font-size: 18px;
    }

    .myheat-hero__subtitle {
        font-size: 13px;
    }
}

/* ----------------------------------------------------------------------
   Search section
   ---------------------------------------------------------------------- */
.myheat-search {
    padding: 40px 15px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.myheat-search__title {
    text-align: center;
    font-weight: 700;
    font-size: 24px;
    margin: 0 0 28px 0;
}

@media (max-width: 480px) {
    .myheat-search {
        padding: 24px 12px 16px;
    }

    .myheat-search__title {
        font-size: 18px;
        margin-bottom: 20px;
    }
}

.myheat-search__column {
    /* The Bootstrap offsets handle horizontal centering on >=sm.
       On xs we let it span 12 cols and stay edge-to-edge with gutters. */
    float: none;
    margin-left: auto;
    margin-right: auto;
}

.myheat-search__field label {
    font-weight: 700;
}

.myheat-search__required {
    color: var(--myheat-invalid);
    margin-right: 4px;
    font-weight: 700;
}

/* ----------------------------------------------------------------------
   Input-group with state-driven feedback icon (Font Awesome)
     - empty:     no icon, neutral border
     - loading:   spinner (fa-spinner fa-spin),    red border
     - invalid:   exclamation-circle,              red border
     - valid:     check-circle (#142c41),          green border
   Icon classes are applied by myheat.js to <i id="accountNumberIcon">.

   Border seam strategy: the textbox keeps all four borders. The addon
   sits flush by removing its OWN left border. That way the input
   always shows a right edge, even before any state class is applied.
   ---------------------------------------------------------------------- */
.myheat-search__input-group {
    width: 100%;
}

    .myheat-search__input-group .form-control {
        box-shadow: none;
    }

        .myheat-search__input-group .form-control:focus {
            box-shadow: none;
            outline: 0;
        }

.myheat-search__status {
    /* Single LEFT-side addon. Shown only when the input-group has a
       state class (is-loading / is-invalid / is-valid). Empty/neutral
       state hides it so the field renders as a plain bordered box. */
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    border-right: 0;
    color: #ffffff;
    text-align: center;
    padding: 0;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.myheat-search__icon {
    font-size: 14px;
    line-height: 1;
    vertical-align: middle;
    color: #ffffff;
    font-weight: 900;
}

/* Show the addon whenever the input-group is in any state. */
.myheat-search__input-group.is-loading .myheat-search__status,
.myheat-search__input-group.is-invalid .myheat-search__status,
.myheat-search__input-group.is-valid .myheat-search__status {
    display: flex;
}

/* When the badge is shown, the input loses its left border so the
   badge hugs the field cleanly as one rounded pill. */
.myheat-search__input-group.is-loading .form-control,
.myheat-search__input-group.is-invalid .form-control,
.myheat-search__input-group.is-valid .form-control {
    border-left: 0;
}

/* ---------- Loading state (red filled circle, spinner) ---------- */
.myheat-search__input-group.is-loading .form-control {
    border-color: var(--myheat-invalid);
}

.myheat-search__input-group.is-loading .myheat-search__status {
    background-color: var(--myheat-invalid);
    border-color: var(--myheat-invalid);
}

/* ---------- Invalid state (red filled circle, exclamation) ---------- */
.myheat-search__input-group.is-invalid .form-control {
    border-color: var(--myheat-invalid);
}

.myheat-search__input-group.is-invalid .myheat-search__status {
    background-color: var(--myheat-invalid);
    border-color: var(--myheat-invalid);
}

/* ---------- Valid state (dark navy filled circle, check) ---------- */
.myheat-search__input-group.is-valid .form-control {
    border-color: #142c41;
}

.myheat-search__input-group.is-valid .myheat-search__status {
    background-color: #142c41;
    border-color: #142c41;
}

.myheat-search__error {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--myheat-invalid);
}

/* Bootstrap 4 form-text help — small, muted, sits directly under the
   field with the standard 0.25rem top margin BS4 uses. The link
   inside keeps the brand teal color so it reads as actionable. */
.myheat-search__help.form-text {
    margin-top: 0.25rem;
    font-size: 80%;
}

.myheat-search__help a {
    color: var(--myheat-link);
    text-decoration: none;
}

    .myheat-search__help a:hover,
    .myheat-search__help a:focus {
        color: var(--myheat-link);
        text-decoration: underline;
    }

/* Search button on its own row, right-aligned. */
.myheat-search__actions {
    margin-top: 16px;
    text-align: right;
}

@media (max-width: 480px) {
    .myheat-search__actions {
        text-align: center;
    }

        .myheat-search__actions .btn {
            width: 100%;
        }
}

/* Primary search button per BRD (#142c41) */
.myheat-btn-primary {
    background-color: var(--myheat-dark-gray);
    border-color: var(--myheat-dark-gray);
    color: #ffffff;
    font-weight: 700;
    padding: 10px 36px;
    border-radius: 4px;
    min-width: 160px;
    transition: opacity 0.15s ease-in-out;
}

    .myheat-btn-primary:hover,
    .myheat-btn-primary:focus {
        background-color: var(--myheat-dark-gray);
        border-color: var(--myheat-dark-gray);
        color: #ffffff;
        opacity: 0.9;
    }

    .myheat-btn-primary:disabled,
    .myheat-btn-primary[disabled] {
        opacity: 0.55;
        cursor: not-allowed;
    }

/* ----------------------------------------------------------------------
   Results panel
   ---------------------------------------------------------------------- */
.myheat-results {
    margin-top: 28px;
}

.myheat-results__success {
    /* No card chrome — result is rendered as a clean horizontal table */
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
}

/* 3-column horizontal table per feedback:
     MyHEAT Profile Link | Street Address | Zip
   Header row in dark steel gray, body row with light bottom border. */
.myheat-results__table {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0;
    border-collapse: collapse;
    background: transparent;
    table-layout: auto;
}

    .myheat-results__table thead th {
        border: 0;
        border-bottom: 1px solid #e0e0e0;
        background: transparent;
        color: var(--myheat-dark-gray);
        font-weight: 700;
        font-size: 1rem;
        padding: 12px 16px;
        text-align: left;
        white-space: nowrap;
    }

    .myheat-results__table tbody td {
        border: 0;
        border-bottom: 1px solid #f0f0f0;
        padding: 14px 16px;
        font-size: 1rem;
        color: var(--myheat-text);
        word-break: break-word;
        vertical-align: top;
    }

        .myheat-results__table tbody td a {
            color: var(--myheat-link);
            text-decoration: underline;
            word-break: break-all;
        }

/* On small screens, collapse the table into a stacked card.
   Each <td> shows its own label (from data-label attr) + value,
   wrapped in a single bordered/rounded card per row. */
@media (max-width: 575.98px) {
    .myheat-results__table {
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        overflow: hidden;
    }

        .myheat-results__table thead {
            /* Hide table headers on mobile — labels come from data-label */
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        .myheat-results__table tbody tr {
            display: block;
            padding: 8px 0;
        }

        .myheat-results__table tbody td {
            display: block;
            padding: 6px 16px !important;
            border: 0 !important;
            font-size: 1rem;
        }

            .myheat-results__table tbody td::before {
                content: attr(data-label);
                display: block;
                font-weight: 700;
                font-size: 0.875rem;
                color: var(--myheat-dark-gray);
                margin-bottom: 2px;
            }
}

/* "Record not found" alert. Uses the project's standard light-blue
   surface color (#e4ebf7, also used by .card-header in Site.css) for
   a calmer look than Bootstrap's default alert-warning yellow. */
.myheat-results__error.alert {
    background-color: #e4ebf7;
    border-color: #c8d3e8;
    color: var(--myheat-text);
    border-radius: 6px;
    padding: 14px 18px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
}

    .myheat-results__error.alert a {
        color: var(--myheat-link);
        text-decoration: underline;
        word-break: break-word;
    }

/* ----------------------------------------------------------------------
   Info graphics � centered row, fluid container
   ---------------------------------------------------------------------- */
.myheat-info {
    padding: 24px 15px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.myheat-info__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    margin-left: -15px;
    margin-right: -15px;
}

.myheat-info__col {
    float: none;
    display: flex;
    justify-content: center;
}

.myheat-info__image {
    margin: 0 auto;
    border-radius: 6px;
    max-width: 100%;
}

@media (max-width: 991px) {
    .myheat-info__col {
        margin-bottom: 16px;
    }
}
