/* Michael Miller | 19 July 2026 | Create the responsive visual foundation for the ITN 2.0 public dealer locator. */

:root {
    --itn-dark: #1b2228;
    --itn-dark-soft: #252e35;
    --itn-yellow: #ffdf18;
    --itn-yellow-hover: #f1ce00;
    --itn-blue: #1763a5;
    --itn-ink: #10263d;
    --itn-text: #41566b;
    --itn-muted: #6e7f90;
    --itn-line: #d7e0e8;
    --itn-surface: #ffffff;
    --itn-page: #f4f7f9;
    --itn-success: #2f6d3f;
    --itn-error: #a12b2b;
    --itn-radius: 14px;
    --itn-shadow: 0 18px 50px rgba(16, 38, 61, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--itn-page);
    color: var(--itn-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

button,
input {
    font: inherit;
}

a {
    color: var(--itn-blue);
}

[hidden] {
    display: none !important;
}

.site-header {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 223, 24, 0.11), transparent 28%),
        radial-gradient(circle at 86% 86%, rgba(23, 99, 165, 0.18), transparent 30%),
        var(--itn-dark);
    color: #fff;
}

.site-header::after {
    position: absolute;
    right: -110px;
    bottom: -135px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    content: '';
}

.site-header__inner,
.page-shell,
.site-footer__inner {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header__inner {
    position: relative;
    z-index: 1;
    padding: 16px 0 82px;
}

/* Michael Miller | 19 July 2026 | Crop the PNG's transparent canvas so the ITN logo, yellow line and search controls sit closer together. */
.itn-brand {
    display: block;
    width: min(550px, 76vw);
    aspect-ratio: 3.25 / 1;
    margin: 0 auto;
    overflow: hidden;
}

.itn-brand img {
    display: block;
    width: 100%;
    height: auto;
    transform: translateY(-20%);
}

.hero-copy {
    max-width: 790px;
    margin: 0 auto;
    text-align: center;
}

.eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--itn-yellow);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow--blue {
    color: var(--itn-blue);
}

.hero-copy h1 {
    max-width: 700px;
    margin: 0 auto;
    color: #fff;
    font-size: clamp(2rem, 4.5vw, 3.65rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.hero-copy p {
    max-width: 720px;
    margin: 15px auto 0;
    color: #d8e0e6;
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.locator-section {
    position: relative;
    padding: 0 0 76px;
}

.page-shell {
    position: relative;
    margin-top: -65px;
}

.search-card {
    padding: 30px;
    border: 1px solid rgba(215, 224, 232, 0.9);
    border-radius: var(--itn-radius);
    background: var(--itn-surface);
    box-shadow: var(--itn-shadow);
}

.service-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.service-fieldset legend,
.address-field label {
    display: block;
    margin-bottom: 10px;
    color: var(--itn-ink);
    font-weight: 700;
}

.service-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.service-option {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 94px;
    padding: 18px 20px;
    border: 1px solid var(--itn-line);
    border-radius: 11px;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.service-option:hover {
    border-color: #a9bfd2;
    background: #fff;
}

.service-option:focus-within {
    outline: 3px solid rgba(23, 99, 165, 0.18);
    outline-offset: 2px;
}

.service-option.is-selected {
    border-color: var(--itn-blue);
    background: #f1f7fc;
    box-shadow: inset 0 0 0 1px var(--itn-blue);
}

.service-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.service-option__box {
    position: relative;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    margin-right: 16px;
    border: 2px solid #8493a1;
    border-radius: 5px;
    background: #fff;
}

.service-option input:checked + .service-option__box {
    border-color: var(--itn-blue);
    background: var(--itn-blue);
}

.service-option input:checked + .service-option__box::after {
    position: absolute;
    top: 4px;
    left: 8px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    content: '';
    transform: rotate(45deg);
}

.service-option__copy {
    display: block;
    min-width: 0;
}

.service-option__copy strong,
.service-option__copy small {
    display: block;
}

.service-option__copy strong {
    color: var(--itn-ink);
    font-size: 1.05rem;
}

.service-option__copy small {
    margin-top: 2px;
    color: var(--itn-text);
    font-size: 0.88rem;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-top: 24px;
}

.address-field input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid #b9c8d5;
    border-radius: 8px;
    background: #fff;
    color: var(--itn-ink);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.address-field input::placeholder {
    color: #9aa8b5;
}

.address-field input:focus {
    border-color: var(--itn-blue);
    box-shadow: 0 0 0 3px rgba(23, 99, 165, 0.14);
}

.search-button {
    min-width: 230px;
    height: 54px;
    padding: 0 25px;
    border: 0;
    border-radius: 8px;
    background: var(--itn-yellow);
    color: var(--itn-dark);
    cursor: pointer;
    font-weight: 700;
    transition: background 160ms ease, transform 160ms ease;
}

.search-button:hover {
    background: var(--itn-yellow-hover);
    transform: translateY(-1px);
}

.search-button:focus-visible {
    outline: 3px solid rgba(23, 99, 165, 0.28);
    outline-offset: 2px;
}

.search-button:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.form-errors {
    min-height: 0;
    margin-top: 0;
    color: var(--itn-error);
    font-size: 0.92rem;
    font-weight: 700;
}

.form-errors:not(:empty) {
    margin-top: 13px;
}

.results-section {
    margin-top: 42px;
}

.results-heading {
    margin-bottom: 18px;
}

.results-heading h2 {
    margin: 0;
    color: var(--itn-ink);
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1.15;
}

.search-status {
    padding: 16px 18px;
    border: 1px solid var(--itn-line);
    border-radius: 9px;
    background: #fff;
    color: var(--itn-text);
}

.search-status:empty {
    display: none;
}

.search-status.is-error {
    border-color: #e7b8b8;
    color: var(--itn-error);
}

.results-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(315px, 0.86fr);
    height: 560px;
    overflow: hidden;
    border: 1px solid #cbd8e3;
    border-radius: var(--itn-radius);
    background: #fff;
    box-shadow: 0 14px 36px rgba(16, 38, 61, 0.1);
}

.dealer-map {
    min-width: 0;
    height: 100%;
    background: #e8eef2;
}

.dealer-list-panel {
    height: 100%;
    overflow-y: auto;
    border-left: 1px solid #cbd8e3;
    background: #fff;
}

.dealer-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dealer-card {
    position: relative;
    display: grid;
    grid-template-columns: 39px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 20px 16px;
    border-bottom: 1px solid #dde5eb;
    cursor: pointer;
    transition: background 150ms ease;
}

.dealer-card:hover,
.dealer-card.is-active {
    background: #f1f6fa;
}

.dealer-card:last-child {
    border-bottom: 0;
}

.dealer-marker-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--itn-dark);
    color: #fff;
    font-weight: 700;
}

.dealer-card__content {
    min-width: 0;
}

.dealer-card__badge,
.info-window__badge {
    display: inline-flex;
    margin-bottom: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #e9f4e8;
    color: var(--itn-success);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dealer-card h3 {
    margin: 0 0 3px;
    color: var(--itn-ink);
    font-size: 1rem;
    line-height: 1.25;
}

.dealer-card p {
    margin: 2px 0;
    color: var(--itn-text);
    font-size: 0.84rem;
    line-height: 1.35;
}

.dealer-card__services {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
}

.service-chip {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 4px;
    background: #edf2f6;
    color: #506579;
    font-size: 0.69rem;
}

.dealer-card__link,
.info-window__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin-top: 4px;
    padding: 7px 12px;
    border-radius: 6px;
    background: var(--itn-blue);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.dealer-card__link:hover,
.info-window__link:hover {
    background: #0e4e86;
}

.dealer-card__distance {
    align-self: start;
    padding-top: 3px;
    color: var(--itn-muted);
    font-size: 0.74rem;
    font-style: italic;
    font-weight: 700;
    white-space: nowrap;
}

.info-window {
    width: min(290px, 70vw);
    padding: 4px 2px 2px;
    color: var(--itn-text);
    font-family: Arial, Helvetica, sans-serif;
}

.info-window h3 {
    margin: 0 0 5px;
    color: var(--itn-ink);
    font-size: 1rem;
}

.info-window p {
    margin: 3px 0;
    font-size: 0.84rem;
}

.simulator-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    max-width: 970px;
    margin: 44px auto 0;
    padding: 20px 24px;
    border: 1px solid #cbd8e3;
    border-radius: 12px;
    background: #edf4f9;
}

.simulator-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--itn-dark);
    color: var(--itn-yellow);
    font-size: 1.25rem;
}

.simulator-card__copy strong,
.simulator-card__copy span {
    display: block;
}

.simulator-card__copy strong {
    color: var(--itn-ink);
}

.simulator-card__copy span {
    margin-top: 3px;
    color: var(--itn-text);
    font-size: 0.9rem;
}

.simulator-card > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--itn-blue);
    border-radius: 7px;
    color: var(--itn-blue);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.simulator-card > a:hover {
    background: var(--itn-blue);
    color: #fff;
}

.site-footer {
    background: var(--itn-dark);
    color: #b9c4cc;
}

.site-footer__inner {
    padding: 34px 0;
    text-align: center;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
    color: #d7dfe5;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: none;
}

/* Michael Miller | 19 July 2026 | Let the Team GTS artwork fill its link container without the previous white padding. */
.powered-by a {
    display: inline-flex;
    align-items: center;
    width: 150px;
    padding: 0;
    overflow: hidden;
    border-radius: 7px;
    background: transparent;
    line-height: 0;
}

.powered-by img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
}

.site-footer p {
    margin: 0;
    font-size: 0.78rem;
}

@media (max-width: 900px) {
    .results-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .dealer-map {
        height: 460px;
    }

    .dealer-list-panel {
        max-height: 520px;
        border-top: 1px solid #cbd8e3;
        border-left: 0;
    }
}

@media (max-width: 720px) {
    .site-header__inner,
    .page-shell,
    .site-footer__inner {
        width: min(100% - 24px, 1160px);
    }

    .site-header__inner {
        padding: 12px 0 68px;
    }

    .itn-brand {
        width: min(440px, 90vw);
    }

    .hero-copy {
        margin-top: 0;
    }

    .hero-copy h1 {
        font-size: clamp(1.9rem, 9vw, 2.7rem);
    }

    .hero-copy p {
        margin-top: 15px;
    }

    .page-shell {
        margin-top: -50px;
    }

    .search-card {
        padding: 20px;
    }

    .service-options,
    .search-row {
        grid-template-columns: 1fr;
    }

    .service-option {
        min-height: 82px;
        padding: 15px;
    }

    .search-button {
        width: 100%;
        min-width: 0;
    }

    .results-section {
        margin-top: 34px;
    }

    .dealer-map {
        height: 390px;
    }

    .dealer-card {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .dealer-card__distance {
        grid-column: 2;
        grid-row: 2;
        padding-top: 0;
    }

    .simulator-card {
        grid-template-columns: auto minmax(0, 1fr);
        margin-top: 30px;
        padding: 18px;
    }

    .simulator-card > a {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .hero-copy h1 {
        font-size: 1.8rem;
    }

    .eyebrow {
        font-size: 0.68rem;
    }

    .search-card {
        padding: 17px;
    }

    .service-option__copy strong {
        font-size: 0.98rem;
    }

    .dealer-map {
        height: 340px;
    }

    .simulator-card__icon {
        display: none;
    }

    .simulator-card {
        grid-template-columns: 1fr;
    }
}
