

/* Compare page */
.compare-page-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.compare-page-header h1 {
    font-size: clamp(28px, 4vw, 36px);
    margin: 0 0 10px;
}

.compare-page-lead {
    margin: 0 0 28px;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 52rem;
}

.compare-table-wrap {
    overflow-x: auto;
    border-top: 1px solid var(--border-medium);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.compare-table th,
.compare-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    vertical-align: top;
}

.compare-table__label-col {
    width: 120px;
    font-weight: 600;
    color: var(--text-muted);
}

.compare-table tbody th[scope="row"] {
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.compare-table__car-col {
    position: relative;
    min-width: 180px;
}

.compare-table__photo {
    display: block;
    width: 100%;
    height: 120px;
    border-radius: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-subtle);
    margin-bottom: 10px;
}

.compare-table__title {
    display: block;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    line-height: 1.3;
}

.compare-table__title:hover {
    text-decoration: underline;
}

.compare-table__trim {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.compare-table__row--diff th,
.compare-table__row--diff td {
    background: rgba(42, 77, 115, 0.08);
}

/* SA-03: differs is carried by a text tag and a navy rule, not the tint alone.
   Selector matches the specificity of `.compare-table tbody th[scope="row"]`
   and comes after it, so the navy label wins. */
.compare-table tbody .compare-table__row--diff th[scope="row"] {
    color: var(--navy);
    border-left: 3px solid var(--navy);
}

.compare-table tbody .compare-table__row--diff td {
    font-weight: 600;
}

.compare-diff-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0.02em;
    color: var(--navy);
    background: transparent;
    vertical-align: 1px;
}

.compare-table__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.compare-table__remove:hover {
    background: none;
    color: var(--navy);
}

.compare-tray__slot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 0;
    background: none;
    border: 0;
    border-left: 1px solid rgba(255, 252, 248, 0.2);
    max-width: min(220px, 42vw);
}

.compare-tray__slot-thumb {
    width: 32px;
    height: 32px;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.25) center/cover no-repeat;
    flex-shrink: 0;
}

.compare-tray__slot-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-tray__slot-remove {
    border: 0;
    background: transparent;
    color: rgba(255, 252, 248, 0.75);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.compare-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-medium);
    background: transparent;
    color: var(--navy);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.compare-toggle-btn--active {
    border-color: var(--navy);
    background: rgba(42, 77, 115, 0.08);
}

.compare-chat-section,
.compare-chat-upsell {
    margin-top: 36px;
    padding: 22px 0 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.compare-chat-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.compare-chat-hint {
    margin: 0 0 16px;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 52rem;
}

.compare-table__view-btn {
    display: inline-flex;
    padding: 10px 16px;
    font-size: 13px;
}

.compare-empty {
    text-align: left;
    padding: 28px 0;
    border: 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    background: none;
}

.compare-empty-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
}

.compare-empty-sub {
    margin: 0 0 20px;
    color: var(--text-muted);
    line-height: 1.55;
}

@media (max-width: 900px) {
    .listings-toolbar__end {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .listings-pagination__controls {
        flex-direction: column;
    }

    .listings-page-btn--prev,
    .listings-page-btn--next {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 700px) {
    body.listings-page.compare-tray-open .listings-pagination {
        margin-bottom: 64px;
    }
}

/* Find dealers map page */
body.find-dealers-page {
    background: var(--bg-page, #f4f6f8);
}

.find-dealers-section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: clamp(16px, 2vw, 24px) clamp(16px, 2.5vw, 28px) 48px;
    box-sizing: border-box;
}

.find-dealers-hero {
    margin-bottom: 20px;
}

.find-dealers-hero__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 24px;
}

.find-dealers-hero__title {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.find-dealers-hero__lead {
    margin: 0;
    max-width: 36rem;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
}

.find-dealers-hero__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.find-dealers-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: 0;
    border-radius: 0;
}

.find-dealers-legend-chip--db .find-dealers-dot {
    background: #1a5f4a;
}

.find-dealers-legend-chip--google .find-dealers-dot {
    background: #6b7280;
}

.find-dealers-hero__admin {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.find-dealers-form {
    background: none;
    border: 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    padding: 16px 0 18px;
    margin-bottom: 20px;
    box-shadow: none;
}

.find-dealers-mode-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px 22px;
    padding: 0;
    margin: 0 0 16px;
    border: 0;
    border-radius: 0;
    background: none;
}

.find-dealers-location-modes {
    border: none;
}

.find-dealers-mode-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.find-dealers-mode-tab input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.find-dealers-mode-tab span {
    display: inline-block;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    border-radius: 0;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.find-dealers-mode-tab input:checked + span {
    color: var(--navy);
    border-bottom-color: var(--navy);
}

.find-dealers-mode-tab input:focus-visible + span {
    outline: 2px solid var(--accent, #1a5f4a);
    outline-offset: 2px;
}

.find-dealers-form__body {
    display: grid;
    gap: 16px;
}

@media (min-width: 768px) {
    .find-dealers-form__body {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 20px;
    }
}

.find-dealers-fields {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.find-dealers-panel[hidden] {
    display: none !important;
}

.find-dealers-panel--city {
    display: grid;
    grid-template-columns: 1fr 88px;
    gap: 12px;
    align-items: end;
}

.find-dealers-hint {
    margin: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    background: none;
    border-radius: 0;
}

.find-dealers-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.find-dealers-input,
.find-dealers-select {
    width: 100%;
    max-width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    font-size: 15px;
    background: var(--bg-card, #fff);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.find-dealers-input:focus,
.find-dealers-select:focus {
    outline: none;
    border-color: var(--accent, #1a5f4a);
    box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.12);
}

.find-dealers-input--state {
    text-transform: uppercase;
}

.find-dealers-form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.find-dealers-radius-row {
    min-width: 120px;
}

.find-dealers-radius-row .find-dealers-select {
    min-width: 120px;
}

.find-dealers-submit {
    min-width: 160px;
    margin: 0;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.find-dealers-status {
    margin: 14px 0 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
    border-radius: 0;
    background: none;
}

.find-dealers-status--error {
    color: #b42318;
}

.find-dealers-legend--results {
    display: none;
}

.find-dealers-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.find-dealers-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.find-dealers-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.find-dealers-legend-item--db .find-dealers-dot {
    background: #1a5f4a;
}

.find-dealers-legend-item--google .find-dealers-dot {
    background: #6b7280;
}

.find-dealers-legend-item--admin {
    color: var(--text-secondary);
}

.find-dealers-map-placeholder[hidden],
.find-dealers-sidebar-empty[hidden],
.find-dealers-list-wrap[hidden] {
    display: none !important;
}

.find-dealers-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 16px;
    align-items: stretch;
}

.find-dealers-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.find-dealers-sidebar-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    padding: 20px 0;
    background: none;
    border: 0;
    border-top: 1px solid var(--border-light);
    border-radius: 0;
    box-shadow: none;
}

.find-dealers-map-placeholder {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 0;
    border: 0;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.03) 25%, transparent 25%) -20px 0 / 40px 40px,
        linear-gradient(225deg, rgba(15, 23, 42, 0.03) 25%, transparent 25%) -20px 0 / 40px 40px,
        linear-gradient(315deg, rgba(15, 23, 42, 0.03) 25%, transparent 25%) 0 0 / 40px 40px,
        linear-gradient(45deg, rgba(15, 23, 42, 0.03) 25%, transparent 25%) 0 0 / 40px 40px,
        var(--bg-subtle, #eef1f4);
    pointer-events: none;
}

@media (min-width: 1200px) {
    .find-dealers-stage {
        grid-template-columns: minmax(0, 1fr) 380px;
    }

    .find-dealers-map,
    .find-dealers-map-shell,
    .find-dealers-sidebar,
    .find-dealers-list-wrap {
        min-height: min(68vh, 640px);
        max-height: min(68vh, 640px);
    }

    .find-dealers-map {
        height: min(68vh, 640px);
    }
}

.find-dealers-empty__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}

.find-dealers-empty__sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
}

.find-dealers-map-shell {
    position: relative;
    min-height: 520px;
    height: 520px;
    border-radius: 0;
    overflow: hidden;
    border: 0;
    box-shadow: none;
}

.find-dealers-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.find-dealers-list-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: none;
    border: 0;
    border-top: 1px solid var(--border-medium);
    border-radius: 0;
    max-height: 520px;
    overflow: hidden;
    box-shadow: none;
}

.find-dealers-list-head {
    padding: 12px 0 10px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-page);
    position: sticky;
    top: 0;
    z-index: 1;
}

.find-dealers-list-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
}

.find-dealers-list-count {
    font-weight: 600;
    color: var(--text-muted);
}

.find-dealers-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.find-dealers-list-item {
    padding: 12px 0 12px 12px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--border-light);
    border-left: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.find-dealers-list-item:hover .find-dealers-list-item__name {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.find-dealers-list-item--active {
    border-left-color: var(--navy);
}

.find-dealers-list-item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.find-dealers-list-item__name {
    font-weight: 600;
    color: var(--navy);
}

.find-dealers-list-badge {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0;
    border-radius: 0;
    background: none;
}

.find-dealers-list-badge--db {
    color: #065f46;
}

.find-dealers-list-badge--google {
    color: #4b5563;
}

.find-dealers-list-item__addr,
.find-dealers-list-item__meta {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

.find-dealers-list-link {
    color: var(--accent, #1a5f4a);
    font-weight: 600;
}

.find-dealers-list-muted {
    color: var(--text-muted);
}

.find-dealers-list-scraped,
.find-dealers-scraped {
    font-size: 12px;
    color: var(--accent, #1a5f4a);
    font-weight: 600;
}

.find-dealers-admin-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.3;
}

.find-dealers-admin-btn--inline {
    margin-top: 0;
}

.find-dealers-admin-btn--done {
    opacity: 0.85;
    pointer-events: none;
}

.find-dealers-list-item__admin {
    margin: 8px 0 0;
}

.find-dealers-admin-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.find-dealers-marker-pin {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.find-dealers-marker {
    background: transparent !important;
    border: none !important;
}

.find-dealers-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
}

.find-dealers-badge--db {
    color: #065f46;
}

.find-dealers-badge--google {
    color: #4b5563;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 960px) {
    .find-dealers-stage {
        grid-template-columns: 1fr;
    }

    .find-dealers-map,
    .find-dealers-map-shell,
    .find-dealers-sidebar {
        min-height: 380px;
    }

    .find-dealers-map {
        height: 380px;
    }

    .find-dealers-list-wrap {
        max-height: 400px;
    }

    .find-dealers-form__actions {
        width: 100%;
    }

    .find-dealers-submit {
        flex: 1;
    }

    .find-dealers-panel--city {
        grid-template-columns: 1fr;
    }
}

