@import url('https://fonts.googleapis.com/css2?family=Overpass:wght@400;600;700&display=swap');

/* ---------- locator shell ---------- */
.sps-locator {
    max-width: 1280px;
    margin: 0 auto 64px;
    padding: 16px 24px 0;
    font-family: 'Overpass', sans-serif;
    color: #101828;
}

/* toolbar */
.sps-loc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    margin-bottom: 16px;
}
.sps-loc-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 260px;
    min-width: 220px;
    background: #f9fafb;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    padding: 0 12px;
    color: #667085;
}
.sps-loc-search:focus-within { border-color: #BF0101; box-shadow: 0 0 0 3px rgba(191, 1, 1, .12); }
.sps-loc-search input {
    flex: 1;
    border: 0 !important;
    background: transparent !important;
    padding: 11px 0 !important;
    font: 400 15px 'Overpass', sans-serif !important;
    color: #101828 !important;
    outline: none !important;
    box-shadow: none !important;
}
.sps-loc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sps-loc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    background: #fff;
    color: #344054;
    font: 600 13px 'Overpass', sans-serif;
    cursor: pointer;
    transition: all .15s ease;
}
.sps-loc-chip:hover { border-color: #BF0101; color: #BF0101; }
.sps-loc-chip.is-active { background: #BF0101; border-color: #BF0101; color: #fff; }
.sps-loc-chip.is-active .sps-loc-dot { background: #fff !important; }
.sps-loc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sps-loc-nearme {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid #BF0101;
    border-radius: 999px;
    background: #fff;
    color: #BF0101;
    font: 600 13px 'Overpass', sans-serif;
    cursor: pointer;
    transition: all .15s ease;
    margin-left: auto;
}
.sps-loc-nearme:hover { background: #fdecec; }
.sps-loc-nearme.is-active { background: #BF0101; color: #fff; }
.sps-loc-nearme:disabled { opacity: .6; cursor: wait; }

/* body: list + map */
.sps-loc-body {
    display: grid;
    grid-template-columns: minmax(320px, 400px) 1fr;
    gap: 16px;
    align-items: stretch;
}
.sps-locator--listright .sps-loc-body { grid-template-columns: 1fr minmax(320px, 400px); }
.sps-locator--listright .sps-loc-list { order: 2; }
.sps-loc-list {
    max-height: 680px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 2px 6px 2px 2px;
    scrollbar-width: thin;
}
.sps-loc-count { color: #667085; font-size: 13px; font-weight: 600; padding: 2px 4px; }
.sps-loc-empty {
    padding: 28px 16px;
    text-align: center;
    color: #667085;
    background: #f9fafb;
    border: 1px dashed #e4e7ec;
    border-radius: 12px;
}

/* cards */
.sps-loc-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto; /* prevent squashing inside the fixed-height list */
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.sps-loc-card:hover {
    border-color: #f2b0b0;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .08);
    transform: translateY(-1px);
}
.sps-loc-card.is-selected {
    border-color: #BF0101;
    box-shadow: 0 0 0 3px rgba(191, 1, 1, .14), 0 4px 14px rgba(16, 24, 40, .08);
}
.sps-loc-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #f2f4f7;
    display: block;
}
.sps-loc-cardbody { min-width: 0; padding: 12px 14px 14px; }
.sps-loc-badge {
    display: inline-block;
    padding: 2px 9px 1px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--badge, #667085);
    background: color-mix(in srgb, var(--badge, #667085) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--badge, #667085) 28%, #fff);
    margin-bottom: 5px;
}
.sps-loc-name { font-size: 16.5px; font-weight: 700; margin: 0 0 3px; color: #101828; line-height: 1.25; }
.sps-loc-addr { font-size: 13.5px; color: #475467; margin: 0 0 10px; line-height: 1.4; }
/* Co-located facilities note (e.g. Tulsa Flat-Rolled + Tulsa Service Center
   sharing one site) — shown on the card so it doesn't rely on a visitor
   noticing two adjacent dots on the map. */
.sps-loc-colocated {
    font-size: 12px;
    font-weight: 700;
    color: #BF0101;
    margin: -4px 0 10px;
}
.sps-loc-dist { color: #BF0101; font-weight: 700; white-space: nowrap; }
.sps-loc-actions { display: flex; flex-wrap: nowrap; gap: 8px; }
.sps-loc-actions .sps-loc-btn {
    flex: 1 1 0;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.sps-loc-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px 6px;
    border-radius: 8px;
    border: 1px solid #e4e7ec;
    background: #fff;
    color: #344054 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all .15s ease;
}
.sps-loc-btn:hover { border-color: #BF0101; color: #BF0101 !important; }
.sps-loc-btn--primary { background: #BF0101; border-color: #BF0101; color: #fff !important; }
.sps-loc-btn--primary:hover { background: #a30101; color: #fff !important; }

/* map */
.sps-loc-map {
    position: relative;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    overflow: hidden;
    min-height: 680px;
}
.pim-map-wrapper {
    width: 100%;
    height: 100%;
    min-height: 680px;
    position: relative;
    background: transparent;
    font-family: 'Overpass', sans-serif;
}
.sps-loc-reset {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    padding: 7px 13px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    color: #344054;
    font: 600 12.5px 'Overpass', sans-serif;
    cursor: pointer;
    backdrop-filter: blur(3px);
}
.sps-loc-reset:hover { border-color: #BF0101; color: #BF0101; }

/* map tooltip */
.sps-loc-tip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    font-family: 'Overpass', sans-serif;
    max-width: 260px;
}
.sps-loc-tip strong { color: #101828; font-size: 14.5px; }
.sps-loc-tip span { color: #475467; font-size: 12.5px; }
.sps-loc-tip em { color: #BF0101; font-size: 11.5px; font-style: normal; font-weight: 600; margin-top: 3px; }
.sps-loc-tip-mates { color: #BF0101; font-size: 11.5px; font-weight: 700; margin-top: 3px; }
.sps-loc-tip-mates:empty { display: none; margin: 0; }
.sps-loc-tip-actions { display: flex; gap: 8px; margin-top: 9px; }
.sps-loc-tip-actions .sps-loc-btn { font-size: 12.5px; padding: 6px 11px 5px; }

/* "fly in" detail view */
.sps-loc-detail {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    background: #0b1220;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}
.sps-loc-detail.is-open { opacity: 1; pointer-events: auto; }
.sps-loc-detail iframe { flex: 1; width: 100%; border: 0; }
.sps-loc-detail-gmap { flex: 1; width: 100%; }
.sps-loc-detail-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid #e4e7ec;
}
.sps-loc-detail-bar > img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #f2f4f7;
}
.sps-loc-detail-txt { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.sps-loc-detail-txt strong { font-size: 15px; color: #101828; line-height: 1.25; }
.sps-loc-detail-txt span { font-size: 12.5px; color: #475467; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sps-loc-detail-close {
    cursor: pointer;
    flex: 0 0 auto;
    font-family: 'Overpass', sans-serif;
    font-weight: 600;
}
@media (max-width: 600px) {
    .sps-loc-detail-bar { flex-wrap: wrap; }
    .sps-loc-detail-txt { flex-basis: calc(100% - 60px); }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .sps-loc-body { grid-template-columns: 1fr; }
    .sps-loc-map, .pim-map-wrapper { min-height: 420px; }
    .sps-loc-map { order: -1; }
    .sps-loc-list { max-height: none; }
    .sps-loc-nearme { margin-left: 0; }
}
@media (max-width: 480px) {
    .sps-locator { padding: 12px 14px 0; }
    .sps-loc-map, .pim-map-wrapper { min-height: 340px; }
    .sps-loc-thumb { height: 130px; }
}
