/* ProBlend Dealer Locator — front-end */

.pbdl-locator {
  --pbdl-ink: #2a2118;
  --pbdl-muted: #6b5c4c;
  --pbdl-line: #e4d8c8;
  --pbdl-paper: #faf7f2;
  --pbdl-panel: #ffffff;
  --pbdl-accent: #e36a1a;
  --pbdl-accent-deep: #c4530f;
  --pbdl-forest: #3d5a3c;
  --pbdl-radius: 4px;
  --pbdl-shadow: 0 12px 40px rgba(42, 33, 24, 0.12);
  color: var(--pbdl-ink);
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0 auto 2rem;
  max-width: 1200px;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.pbdl-toolbar {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.6fr auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 0.65rem;
  padding: 1rem;
  background: var(--pbdl-paper);
  border: 1px solid var(--pbdl-line);
}

.pbdl-search,
.pbdl-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.pbdl-filter span {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pbdl-muted);
  font-weight: 600;
}

.pbdl-search input,
.pbdl-filter select {
  width: 100%;
  border: 1px solid var(--pbdl-line);
  background: #fff;
  color: var(--pbdl-ink);
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  border-radius: var(--pbdl-radius);
  line-height: 1.2;
}

.pbdl-search input:focus,
.pbdl-filter select:focus {
  outline: 2px solid rgba(227, 106, 26, 0.35);
  border-color: var(--pbdl-accent);
}

.pbdl-near-me,
.pbdl-locator button.pbdl-near-me {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: var(--pbdl-accent) !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 0.85rem 1rem;
  border-radius: var(--pbdl-radius);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pbdl-near-me:hover,
.pbdl-locator button.pbdl-near-me:hover {
  background: var(--pbdl-accent-deep) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.pbdl-near-me:disabled,
.pbdl-locator button.pbdl-near-me:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.pbdl-status {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--pbdl-muted);
}

.pbdl-status[hidden] {
  display: none !important;
}

.pbdl-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 0;
  min-height: 620px;
  border: 1px solid var(--pbdl-line);
  box-shadow: var(--pbdl-shadow);
  background: var(--pbdl-panel);
  overflow: hidden;
}

.pbdl-directory {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--pbdl-line);
  background: #fff;
  max-height: 680px;
}

.pbdl-directory-meta {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--pbdl-line);
  font-size: 0.85rem;
  color: var(--pbdl-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--pbdl-paper);
}

.pbdl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.pbdl-card {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--pbdl-line);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
  border-left: 3px solid transparent;
}

.pbdl-card:hover {
  background: #fcf9f4;
}

.pbdl-card.is-active {
  background: #fff6ee;
  border-left-color: var(--pbdl-accent);
}

.pbdl-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.pbdl-name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--pbdl-ink);
}

.pbdl-distance {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pbdl-forest);
  background: rgba(61, 90, 60, 0.1);
  padding: 0.2rem 0.45rem;
}

.pbdl-address {
  margin: 0.45rem 0 0;
  color: var(--pbdl-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-line;
}

.pbdl-branch {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pbdl-accent-deep);
  font-weight: 600;
}

.pbdl-card-actions {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

.pbdl-card-actions a {
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--pbdl-accent-deep);
}

.pbdl-card-actions a:hover {
  text-decoration: underline;
}

.pbdl-empty,
.pbdl-loading {
  padding: 2rem 1.25rem;
  color: var(--pbdl-muted);
  text-align: center;
}

.pbdl-map-wrap {
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow: hidden;
  min-height: 620px;
  background: #dfe7df;
}

.pbdl-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pbdl-map.leaflet-container {
  width: 100%;
  height: 100%;
  background: #dfe7df;
  z-index: 0;
}

.pbdl-map .leaflet-pane,
.pbdl-map .leaflet-top,
.pbdl-map .leaflet-bottom,
.pbdl-map .leaflet-control {
  z-index: auto;
}

.pbdl-map .leaflet-map-pane { z-index: 2; }
.pbdl-map .leaflet-tile-pane { z-index: 2; }
.pbdl-map .leaflet-overlay-pane { z-index: 3; }
.pbdl-map .leaflet-shadow-pane { z-index: 4; }
.pbdl-map .leaflet-marker-pane { z-index: 5; }
.pbdl-map .leaflet-tooltip-pane { z-index: 6; }
.pbdl-map .leaflet-popup-pane { z-index: 7; }
.pbdl-map .leaflet-top,
.pbdl-map .leaflet-bottom { z-index: 8; }
.pbdl-map .leaflet-control { z-index: 9; }

.pbdl-map img.leaflet-tile,
.pbdl-map .leaflet-container img,
.pbdl-map img {
  max-width: none !important;
  max-height: none !important;
}

.pbdl-detail {
  position: absolute;
  z-index: 20;
  right: 1rem;
  bottom: 1rem;
  left: auto;
  width: min(360px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--pbdl-line);
  box-shadow: 0 18px 48px rgba(42, 33, 24, 0.22);
  padding: 1.15rem 2.4rem 1.25rem 1.2rem;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.pbdl-detail.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pbdl-detail[hidden] {
  display: block !important;
  visibility: hidden;
}

.pbdl-detail.is-open[hidden] {
  visibility: visible;
}

.pbdl-detail-body {
  overflow: auto;
  max-height: calc(100% - 0.25rem);
}

.pbdl-detail-close,
.pbdl-locator button.pbdl-detail-close {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--pbdl-muted) !important;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-decoration: none !important;
  text-indent: 0;
  cursor: pointer;
  transform: none !important;
}

.pbdl-detail-close:hover,
.pbdl-detail-close:focus,
.pbdl-locator button.pbdl-detail-close:hover,
.pbdl-locator button.pbdl-detail-close:focus {
  background: var(--pbdl-paper) !important;
  color: var(--pbdl-accent-deep) !important;
  transform: none !important;
}

.pbdl-detail-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pbdl-muted);
  font-weight: 700;
}

.pbdl-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding-right: 1.5rem;
}

.pbdl-detail-name {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 700;
}

.pbdl-detail-dl {
  margin: 1rem 0 0;
}

.pbdl-detail-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--pbdl-line);
}

.pbdl-detail-row dt {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pbdl-muted);
  font-weight: 700;
  padding-top: 0.15rem;
}

.pbdl-detail-row dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--pbdl-ink);
}

.pbdl-detail-row a {
  color: var(--pbdl-accent-deep);
  font-weight: 600;
  text-decoration: none;
}

.pbdl-detail-row a:hover {
  text-decoration: underline;
}

.pbdl-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.pbdl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-radius: var(--pbdl-radius);
  border: 1px solid transparent;
  box-shadow: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pbdl-locator a.pbdl-btn,
.pbdl-locator a.pbdl-btn:visited,
.pbdl-locator a.pbdl-btn:focus,
.pbdl-detail-actions a.pbdl-btn {
  text-decoration: none !important;
}

.pbdl-btn-primary,
.pbdl-locator a.pbdl-btn-primary,
.pbdl-locator a.pbdl-btn-primary:visited,
.pbdl-locator a.pbdl-btn-primary:focus,
.pbdl-detail-actions a.pbdl-btn-primary {
  background: var(--pbdl-accent);
  color: #fff !important;
  text-decoration: none !important;
}

.pbdl-btn-primary:hover,
.pbdl-locator a.pbdl-btn-primary:hover,
.pbdl-detail-actions a.pbdl-btn-primary:hover {
  background: var(--pbdl-accent-deep);
  color: #fff !important;
  text-decoration: none !important;
}

.pbdl-btn-ghost {
  background: transparent;
  color: var(--pbdl-ink);
  border-color: var(--pbdl-line);
}

.pbdl-btn-ghost:hover {
  border-color: var(--pbdl-accent);
  color: var(--pbdl-accent-deep);
}

.pbdl-map-label {
  background: #fff !important;
  border: 1px solid var(--pbdl-line) !important;
  border-radius: 3px !important;
  color: var(--pbdl-ink) !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  padding: 4px 8px !important;
  box-shadow: 0 2px 10px rgba(42, 33, 24, 0.14) !important;
  white-space: nowrap;
}

.pbdl-map-label::before {
  border-top-color: var(--pbdl-line) !important;
}

.pbdl-pin {
  background: transparent;
  border: 0;
}

.pbdl-pin span {
  display: block;
  width: 18px;
  height: 18px;
  margin: 4px auto 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--pbdl-accent);
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(42, 33, 24, 0.35);
}

.pbdl-pin.is-active span {
  background: var(--pbdl-forest);
  transform: rotate(-45deg) scale(1.15);
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(227, 106, 26, 0.2) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: var(--pbdl-accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
}

/* Homepage map preview (non-interactive linked map) */
.pbdl-preview {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--pbdl-line);
  box-shadow: var(--pbdl-shadow);
  text-decoration: none !important;
  color: inherit;
  max-width: 1200px;
  margin: 0 auto 2rem;
  isolation: isolate;
}

.pbdl-preview:hover,
.pbdl-preview:focus {
  text-decoration: none !important;
  color: inherit;
}

.pbdl-preview-map {
  width: 100%;
  height: 420px;
  background: #dfe7df;
  pointer-events: none !important;
}

.pbdl-preview-map.leaflet-container,
.pbdl-preview-map .leaflet-pane,
.pbdl-preview-map .leaflet-control,
.pbdl-preview-map .leaflet-marker-icon,
.pbdl-preview-map .marker-cluster {
  pointer-events: none !important;
  cursor: pointer;
}

.pbdl-preview-map img.leaflet-tile,
.pbdl-preview-map img {
  max-width: none !important;
  max-height: none !important;
}

.pbdl-preview-cta {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  z-index: 5;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pbdl-accent);
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--pbdl-radius);
  box-shadow: 0 10px 28px rgba(42, 33, 24, 0.22);
  pointer-events: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pbdl-preview:hover .pbdl-preview-cta,
.pbdl-preview:focus .pbdl-preview-cta {
  background: var(--pbdl-accent-deep);
  transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 900px) {
  .pbdl-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .pbdl-search {
    grid-column: 1 / -1;
  }

  .pbdl-near-me {
    grid-column: 1 / -1;
  }

  .pbdl-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .pbdl-directory {
    max-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--pbdl-line);
    order: 2;
  }

  .pbdl-map-wrap {
    min-height: 360px;
    height: 420px;
    order: 1;
  }

  .pbdl-detail {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    max-height: 55%;
  }

  .pbdl-preview-map {
    height: 320px !important;
  }
}
