.map-label-outer, .map-cluster-outer {
  position: absolute;
  left: 0;
  top: 0;
}

.map-label-outer {
  transform: translate(-50%, calc(-100% - 6px));
}

.map-cluster-outer {
  transform: translateY(-50%);
}

.map-label, .map-cluster {
  display: inline-block;
  padding: 5px 8px;
  background: #2c3e50;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform-origin: center bottom;
}

.map-cluster {
  background: #4600a3;
}

.map-label-arrow, .map-cluster-arrow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid #2c3e50;
}

.map-cluster-arrow {
  border-top: 7px solid #4600a3;
}


.map-label.map-pulse,
.map-cluster.map-pulse {
  animation: pulseScale 0.35s ease;
}



.map-label.is-hover {
  transform: scale(1.1);
  z-index: 1000;
}

.map-label.is-selected {
  background: #e74c3c;
  transform: scale(1.15);
}





/* ── Leaflet popup reset ── */
.leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.leaflet-popup-content {
    margin: 0;
    width: 224px !important;
}
.leaflet-popup-tip-container {
    margin-top: -1px;
}

/* ── Popup ── */
.map-popup {
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.map-popup-header {
    padding: 14px 14px 10px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}
.map-popup-name {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    margin: 0;
    line-height: 1.3;
    text-wrap-mode: nowrap;
}
.map-popup-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 10px 14px 4px;
}
.map-popup-price-label { font-size: 11px; color: #aaa; }
.map-popup-price       { font-size: 22px; font-weight: 500; color: #111; line-height: 1; }
.map-popup-price sup   { font-size: 13px; font-weight: 400; }

.map-popup-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 6px 14px 10px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    gap: 4px 0;
}
.map-popup-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
    padding: 2px 0;
}
.map-popup-chip svg { flex-shrink: 0; color: #aaa; }

.map-popup-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 10px 14px 14px;
    background: #111;
    color: #fff !important;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 0;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.15s;
}
.map-popup-cta:hover { opacity: 0.8; color: #fff; }
.map-popup-cta svg   { flex-shrink: 0; }




.map-popup-origin {
    padding: 16px 28px;
    text-align: center;
}
.map-popup-origin-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2c3e50;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 15px;
}
.map-popup-origin .map-popup-origin-icon {
    background: #2ecc71;
}
.map-popup-destination .map-popup-origin-icon {
    background: #e74c3c;
}
.map-popup-stop .map-popup-origin-icon {
    background: rgb(243, 156, 18);
}
.map-popup-origin-label {
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 3px;
}

.leaflet-popup.popup-origin .leaflet-popup-content {
    width: auto !important;
}