.wb-dealer-locator {
    --wb-dealer-primary: #0b3b82;
    --wb-dealer-text: #172033;
    --wb-dealer-muted: #64748b;
    --wb-dealer-border: #dbe2ea;
    --wb-dealer-panel: #fff;
    --wb-dealer-soft: #eef4ff;
    --wb-dealer-radius: 10px;
    --wb-dealer-widget-height: 700px;
    color: var(--wb-dealer-text);
    width: 100%;
    font-family: inherit;
}

.wb-dealer-locator *, .wb-dealer-locator *::before, .wb-dealer-locator *::after { box-sizing: border-box; }
.wb-dealer-locator svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.wb-dealer-locator__toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(170px, .38fr) minmax(165px, .35fr) auto auto;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 14px;
}

.wb-dealer-locator__search-field,
.wb-dealer-locator__select-wrap {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--wb-dealer-border);
    border-radius: 8px;
    padding: 0 14px;
    background: var(--wb-dealer-panel);
    color: var(--wb-dealer-primary);
    transition: border-color .2s, box-shadow .2s;
}

.wb-dealer-locator__search-field:focus-within,
.wb-dealer-locator__select-wrap:focus-within { border-color: var(--wb-dealer-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wb-dealer-primary) 12%, transparent); }
.wb-dealer-locator__search-field input, .wb-dealer-locator__select-wrap select, .wb-dealer-locator__sort { appearance: none; border: 0; outline: 0; box-shadow: none; background: transparent; color: var(--wb-dealer-text); font: inherit; width: 100%; min-height: 46px; padding: 0; }
.wb-dealer-locator__select-wrap select option,
.wb-dealer-locator__sort option {
    padding: 10px 14px;
    text-indent: 8px;
    line-height: 1.7;
    color: var(--wb-dealer-text);
    background: #fff;
}
.wb-dealer-locator__search-field input::placeholder { color: #94a3b8; opacity: 1; }
.wb-dealer-locator__select-wrap { position: relative; }
.wb-dealer-locator__select-wrap::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -4px 2px 0 0; color: var(--wb-dealer-muted); pointer-events: none; }

.wb-dealer-locator .wb-dealer-locator__search-button,
.wb-dealer-locator .wb-dealer-locator__location-button {
    min-height: 48px;
    border-radius: 8px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, background-color .2s, color .2s, border-color .2s;
}
.wb-dealer-locator .wb-dealer-locator__search-button { border: 1px solid var(--wb-dealer-primary); background: var(--wb-dealer-primary); color: #fff; }
.wb-dealer-locator .wb-dealer-locator__location-button { border: 1px solid var(--wb-dealer-border); background: var(--wb-dealer-panel); color: var(--wb-dealer-primary); margin-left: 10px; }
.wb-dealer-locator .wb-dealer-locator__search-button:hover, .wb-dealer-locator .wb-dealer-locator__search-button:focus { filter: brightness(1.08); color: #fff; }
.wb-dealer-locator .wb-dealer-locator__location-button:hover, .wb-dealer-locator .wb-dealer-locator__location-button:focus { border-color: var(--wb-dealer-primary); background: var(--wb-dealer-soft); color: var(--wb-dealer-primary); }
.wb-dealer-locator .wb-dealer-locator__search-button:active, .wb-dealer-locator .wb-dealer-locator__location-button:active { transform: translateY(1px); }
.wb-dealer-locator .wb-dealer-locator__search-button[disabled], .wb-dealer-locator .wb-dealer-locator__location-button[disabled] { opacity: .55; cursor: wait; }

.wb-dealer-locator__notice { min-height: 0; margin: 0 0 10px; color: var(--wb-dealer-muted); font-size: 13px; }
.wb-dealer-locator__notice:empty { display: none; }
.wb-dealer-locator__notice.is-error { color: #b42318; }
.wb-dealer-locator__notice.is-success { color: #067647; }

.wb-dealer-locator__body { display: flex; height: var(--wb-dealer-widget-height); min-height: 0; max-height: var(--wb-dealer-widget-height); border: 1px solid var(--wb-dealer-border); border-radius: var(--wb-dealer-radius); overflow: hidden; background: var(--wb-dealer-panel); }
.wb-dealer-locator__results-panel { width: 35%; min-width: 340px; min-height: 0; height: 100%; overflow: hidden; padding: 16px; display: flex; flex-direction: column; background: var(--wb-dealer-panel); border-right: 1px solid var(--wb-dealer-border); }
.wb-dealer-locator__map-panel { width: 65%; height: 100%; position: relative; min-width: 0; min-height: 0; background: #eef2f6; }
.wb-dealer-locator__map { width: 100%; height: 100%; min-height: 0; z-index: 1; }
.wb-dealer-locator__results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 13px; }
.wb-dealer-locator__results-head strong { font-size: 18px; }
.wb-dealer-locator__results-head label { width: 170px; border: 1px solid var(--wb-dealer-border); border-radius: 7px; padding: 0 10px; position: relative; }
.wb-dealer-locator__results-head label::after { content: ''; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border-right: 1px solid; border-bottom: 1px solid; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.wb-dealer-locator__sort { min-height: 36px; font-size: 13px; padding-right: 18px; }
.wb-dealer-locator__results { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 0 7px 4px 2px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--wb-dealer-primary) 35%, transparent) transparent; flex: 1 1 auto; }
.wb-dealer-locator__results::-webkit-scrollbar { width: 6px; }
.wb-dealer-locator__results::-webkit-scrollbar-track { background: transparent; }
.wb-dealer-locator__results::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--wb-dealer-primary) 30%, #cbd5e1); border-radius: 999px; }
.wb-dealer-locator__empty { min-height: 170px; display: grid; place-items: center; text-align: center; color: var(--wb-dealer-muted); padding: 24px; border: 1px dashed var(--wb-dealer-border); border-radius: 8px; }

.wb-dealer-card { border: 1px solid var(--wb-dealer-border); border-radius: 9px; padding: 15px; background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.wb-dealer-card:hover, .wb-dealer-card:focus-within, .wb-dealer-card.is-active { border-color: color-mix(in srgb, var(--wb-dealer-primary) 55%, var(--wb-dealer-border)); box-shadow: 0 8px 22px rgba(15, 35, 65, .08); transform: translateY(-1px); }
.wb-dealer-card__head { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.wb-dealer-card__number { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--wb-dealer-primary); color: #fff; font-size: 12px; font-weight: 700; }
.wb-dealer-card__title { margin: 0; font-size: 16px; line-height: 1.35; color: var(--wb-dealer-text); }
.wb-dealer-card__branch { display: inline-flex; align-items: center; margin-top: 4px; padding: 3px 8px; background: var(--wb-dealer-soft); color: var(--wb-dealer-primary); border-radius: 4px; font-size: 11px; font-weight: 600; }
.wb-dealer-card__distance { color: var(--wb-dealer-muted); font-size: 12px; white-space: nowrap; padding-top: 4px; }
.wb-dealer-card__meta { margin: 11px 0 0 38px; display: grid; gap: 8px; color: var(--wb-dealer-muted); font-size: 13px; }
.wb-dealer-card__row { display: flex; align-items: flex-start; gap: 8px; }
.wb-dealer-card__row svg { width: 16px; height: 16px; margin-top: 1px; }
.wb-dealer-card__row a { color: inherit; text-decoration: none; }
.wb-dealer-card__row a:hover { color: var(--wb-dealer-primary); text-decoration: underline; }
.wb-dealer-locator .wb-dealer-card__directions { margin-left: auto; color: var(--wb-dealer-primary) !important; font-weight: 600; white-space: nowrap; }

.wb-dealer-locator__contact { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 14px; padding: 12px 14px; border: 1px solid #cbdaf4; border-radius: 8px; background: linear-gradient(135deg, #f5f8ff, var(--wb-dealer-soft)); }
.wb-dealer-locator__contact-icon { color: var(--wb-dealer-primary); }.wb-dealer-locator__contact-icon svg { width: 30px; height: 30px; }
.wb-dealer-locator__contact-copy { min-width: 0; }
.wb-dealer-locator__contact-title { color: var(--wb-dealer-primary); font-size: 13px; font-weight: 700; }
.wb-dealer-locator__contact-description { color: var(--wb-dealer-muted); font-size: 11px; margin-top: 2px; }
.wb-dealer-locator__contact-title > :first-child, .wb-dealer-locator__contact-description > :first-child { margin-top: 0; }
.wb-dealer-locator__contact-title > :last-child, .wb-dealer-locator__contact-description > :last-child { margin-bottom: 0; }
.wb-dealer-locator__contact-title a, .wb-dealer-locator__contact-description a { color: inherit; text-decoration: underline; }
.wb-dealer-locator__contact > a { display: inline-flex; padding: 8px 14px; border: 1px solid var(--wb-dealer-primary); border-radius: 6px; color: var(--wb-dealer-primary); text-decoration: none; font-size: 12px; font-weight: 600; }
.wb-dealer-locator__contact > a:hover { background: var(--wb-dealer-primary); color: #fff; }

.wb-dealer-locator .wb-dealer-locator__fullscreen { position: absolute; top: 12px; right: 12px; z-index: 500; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--wb-dealer-border); border-radius: 7px; background: rgba(255,255,255,.94); color: var(--wb-dealer-primary); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.wb-dealer-locator .wb-dealer-locator__fullscreen:hover,
.wb-dealer-locator .wb-dealer-locator__fullscreen:focus,
.wb-dealer-locator .wb-dealer-locator__fullscreen[aria-pressed="true"] { background: var(--wb-dealer-primary); color: #fff; }
.wb-dealer-locator__map-panel.is-expanded {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    background: #eef2f6;
}
.wb-dealer-locator__map-panel.is-expanded .wb-dealer-locator__map {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
}
.wb-dealer-locator__map-panel.is-expanded .wb-dealer-locator__fullscreen { top: 18px; right: 18px; }
.wb-dealer-locator__map-warning { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); z-index: 600; width: min(420px,85%); padding: 16px; border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 12px 30px rgba(0,0,0,.16); text-align: center; color: #b42318; }

.wb-dealer-marker { background: transparent; border: 0; }
.wb-dealer-marker__pin { position: relative; width: 34px; height: 42px; display: flex; justify-content: center; padding-top: 7px; color: #fff; font-size: 13px; font-weight: 700; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
.wb-dealer-marker__pin::before { content: ''; position: absolute; inset: 0 3px 8px; background: var(--wb-dealer-primary, #0b3b82); border: 2px solid #fff; border-radius: 50% 50% 50% 3px; transform: rotate(-45deg); z-index: -1; }
.wb-dealer-marker.is-active .wb-dealer-marker__pin { transform: scale(1.12); }

.wb-dealer-marker__pin--icon, .wb-dealer-marker__pin--mix {
    background-position: center top; background-size: contain; background-repeat: no-repeat;
    padding-top: 8px; text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.wb-dealer-marker__pin--icon { background-image: var(--wb-dealer-pin-icon); }
.wb-dealer-marker__pin--mix  { background-image: var(--wb-dealer-pin-mix); }

.wb-dealer-marker__pin--icon::before, .wb-dealer-marker__pin--mix::before { display: none; }
.wb-dealer-user-location { width: 18px; height: 18px; border: 4px solid #fff; border-radius: 50%; background: #2e7df6; box-shadow: 0 0 0 7px rgba(46,125,246,.22),0 2px 6px rgba(0,0,0,.25); }
.wb-dealer-locator .leaflet-control-zoom a { color: var(--wb-dealer-primary); }
.wb-dealer-locator .leaflet-popup-content { margin: 12px 16px; color: var(--wb-dealer-text); }.wb-dealer-locator .leaflet-popup-content strong { display: block; margin-bottom: 4px; }
.wb-dealer-popup__phone { margin-top: 6px; font-size: 13px; color: var(--wb-dealer-muted); }
.wb-dealer-popup__phone a { color: var(--wb-dealer-primary); text-decoration: none; font-weight: 600; }
.wb-dealer-popup__phone a:hover { text-decoration: underline; }

.wb-dealer-tin-badge {
    display: inline-block;
    width: 22px; height: 22px;
    background-image: var(--wb-dealer-tin-badge);
    background-size: contain; background-position: center; background-repeat: no-repeat;
    vertical-align: middle;
    margin-left: 6px;
    flex-shrink: 0;
}

.wb-dealer-card__title .wb-dealer-tin-badge { width: 24px; height: 24px; }
.wb-dealer-card--tin .wb-dealer-card__title { display: inline-flex; align-items: center; gap: 2px; }

@media (max-width: 1180px) {
    .wb-dealer-locator__toolbar { grid-template-columns: minmax(250px, 1fr) minmax(160px,.45fr) auto auto; }
    .wb-dealer-locator__select-wrap:has(.wb-dealer-locator__type) { display: none; }
    .wb-dealer-locator .wb-dealer-locator__location-button { margin-left: 0; }
}

@media (max-width: 900px) {
    .wb-dealer-locator__toolbar { grid-template-columns: 1fr 1fr; }
    .wb-dealer-locator__search-field { grid-column: 1 / -1; }
    .wb-dealer-locator .wb-dealer-locator__search-button, .wb-dealer-locator .wb-dealer-locator__location-button { padding: 0 14px; }
    .wb-dealer-locator__body { flex-direction: column-reverse; height: auto !important; min-height: 0; max-height: none; }
    .wb-dealer-locator__map-panel, .wb-dealer-locator__results-panel { width: 100% !important; min-width: 0; }
    .wb-dealer-locator__map { height: 440px; min-height: 440px !important; }
    .wb-dealer-locator__results-panel { border-right: 0; border-top: 1px solid var(--wb-dealer-border); max-height: none; }
    .wb-dealer-locator__results { height: 520px; max-height: 520px; flex: 0 0 520px; }
}

@media (max-width: 580px) {
    .wb-dealer-locator__toolbar { grid-template-columns: 1fr; gap: 9px; }
    .wb-dealer-locator__search-field { grid-column: auto; }
    .wb-dealer-locator .wb-dealer-locator__search-button, .wb-dealer-locator .wb-dealer-locator__location-button { width: 100%; }
    .wb-dealer-locator__map { height: 360px; min-height: 360px !important; }
    .wb-dealer-locator__results-panel { padding: 12px; }
    .wb-dealer-locator__results-head { align-items: flex-start; flex-direction: column; }
    .wb-dealer-locator__results-head label { width: 100%; }
    .wb-dealer-card { padding: 13px; }.wb-dealer-card__head { grid-template-columns: 26px minmax(0,1fr); }.wb-dealer-card__distance { grid-column: 2; padding: 0; }.wb-dealer-card__meta { margin-left: 36px; }
    .wb-dealer-locator__contact { grid-template-columns: 34px 1fr; }.wb-dealer-locator__contact > a { grid-column: 1 / -1; justify-content: center; }
}
