/* ============================================================
   Shared map-kit styles (RideMapKit.pinPicker)
   Gives the ride.php map look — Map/Clean/Satellite tabs, locate
   button, rounded zoom control and a professional pin — to any
   location-capture map (checkout, home-service booking, etc.).
   Load this wherever RideMapKit is used OUTSIDE ride pages
   (ride pages already ship these rules inside ride.css).
   ============================================================ */

.rm-map-wrap {
  position: relative;
  isolation: isolate; /* keep Leaflet panes under the chrome */
}

.rm-map {
  width: 100%;
  height: 100%;
}

/* Rounded, floating zoom control (bottom-right) */
.rm-map-wrap .leaflet-control-zoom {
  border: none !important;
  margin-right: 12px !important;
  margin-bottom: 12px !important;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.14) !important;
  border-radius: 12px !important;
  overflow: hidden;
}
.rm-map-wrap .leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  color: #1C1917 !important;
  border-bottom: 1px solid #E7E5E4 !important;
  background: var(--paper) !important;
}

.rm-map-wrap .leaflet-control-attribution {
  font-size: 9px !important;
  background: rgba(255, 255, 255, 0.75) !important;
}

/* ── Pins ── */
.rm-pin-wrap {
  background: transparent !important;
  border: none !important;
}
.rm-pin {
  display: block;
  position: relative;
}
.rm-pin--live {
  width: 28px;
  height: 28px;
}
.rm-pin__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.28);
  animation: rmLivePulse 1.8s ease-out infinite;
}
.rm-pin__core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #2563EB;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.45);
  box-sizing: border-box;
}
@keyframes rmLivePulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

.rm-pin--pickup,
.rm-pin--drop,
.rm-pin--location {
  width: 34px;
  height: 42px;
}
.rm-pin--pickup::after,
.rm-pin--drop::after,
.rm-pin--location::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 2px;
  z-index: 0;
}
.rm-pin--pickup { color: #810100; }
.rm-pin--drop { color: #810100; }
.rm-pin--location { color: #810100; }
.rm-pin--pickup .rm-pin__badge,
.rm-pin--drop .rm-pin__badge {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  border: 2px solid #fff;
}
.rm-pin--pickup .rm-pin__badge { background: #810100; }
.rm-pin--drop .rm-pin__badge { background: #810100; }
.rm-pin--pickup::after { background: #810100; }
.rm-pin--drop::after { background: #810100; }
.rm-pin--location::after { background: #810100; }

/* Location pin: solid green head + white center (no letter) */
.rm-pin--location .rm-pin__dot {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #810100;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
  z-index: 1;
  box-sizing: border-box;
}
.rm-pin--location .rm-pin__dot::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--paper);
}

/* ── Chrome bar: Map/Clean/Satellite + locate ── */
.rm-chrome {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 1200;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  pointer-events: none;
}
.rm-chrome > * { pointer-events: auto; }
.rm-chrome__layers {
  display: inline-flex;
  background: var(--paper-bright);
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.12);
  backdrop-filter: blur(8px);
}
.rm-chrome__chip {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 750;
  font-family: inherit;
  color: #78716C;
  cursor: pointer;
}
.rm-chrome__chip.is-active {
  background: #1C1917;
  color: #fff;
}
.rm-chrome__actions {
  margin-left: auto;
  display: inline-flex;
  gap: 6px;
}
.rm-chrome__btn {
  min-height: 40px;
  min-width: 40px;
  padding: 0 12px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: var(--paper-bright);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 750;
  font-family: inherit;
  color: #1C1917;
  cursor: pointer;
}
.rm-chrome__btn .fi { font-size: 16px; line-height: 1; }
.rm-route-dock {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1200;
  background: rgba(28, 25, 23, 0.92);
  color: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.2);
  pointer-events: none;
}
.rm-route-dock[hidden] { display: none !important; }

/* ============================================================
   BZLocationPicker widget (assets/js/location-picker.js)
   Two-option location capture: current-location GPS + fast
   manual search. Reused on signup (complete-profile.php) and
   the saved-addresses page (addresses.php).
   ============================================================ */
.bzlp { margin-bottom: 8px; }

.bzlp__actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.bzlp__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid rgba(129, 1, 0, 0.35);
  background: #fff5f0;
  color: #c2410c;
  border-radius: 12px;
  padding: 11px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
}
.bzlp__btn .fi { font-size: 15px; line-height: 1; }
.bzlp__btn:active { transform: scale(0.98); }
.bzlp__btn:disabled,
.bzlp__btn.is-busy { opacity: 0.6; pointer-events: none; }
.bzlp__btn:not(.bzlp__btn--primary) {
  background: var(--paper);
  border-color: #e5e7eb;
  color: #44403C;
}
.bzlp__btn.is-active {
  background: #1C1917;
  border-color: #1C1917;
  color: #fff;
}

.bzlp__status {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}
.bzlp__status.is-ok { color: #047857; }
.bzlp__status.is-err { color: #b91c1c; }
.bzlp__status.is-busy { color: #6b7280; }

.bzlp__search {
  margin-bottom: 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  background: var(--paper);
  overflow: hidden;
}
.bzlp__search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
}
.bzlp__search-box > .fi:first-child { color: #A8A29E; font-size: 15px; }
.bzlp__search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.85rem;
  font-family: inherit;
  color: #1C1917;
  background: transparent;
}
.bzlp__search-close {
  border: none;
  background: #f3f4f6;
  color: #78716C;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.bzlp__results {
  max-height: 260px;
  overflow-y: auto;
}
.bzlp__result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: none;
  border-top: 1px solid #f3f4f6;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  color: #1C1917;
}
.bzlp__result:first-child { border-top: none; }
.bzlp__result:hover,
.bzlp__result:active { background: #fff5f0; }
.bzlp__result .fi { color: #810100; font-size: 14px; flex-shrink: 0; }
.bzlp__result-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bzlp__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px;
  text-align: center;
  color: #A8A29E;
  font-size: 0.78rem;
}
.bzlp__empty .fi { font-size: 22px; }
.bzlp__empty--err { color: #b91c1c; }
.bzlp__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  border-top-color: #810100;
  animation: bzlpSpin 0.7s linear infinite;
}
@keyframes bzlpSpin { to { transform: rotate(360deg); } }

.bzlp__map-block { margin-bottom: 8px; }
.bzlp__map-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid #e5e7eb;
  background: #e5e7eb;
  isolation: isolate;
}
.bzlp__map {
  width: 100%;
  min-height: 180px;
}
.bzlp__map-wrap .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
}
.bzlp__map-fallback {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none; /* must stay none when [hidden] — do not use bare `display:flex` */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 0 24px;
  background: #f3f4f6;
  color: #78716C;
  font-size: 0.78rem;
  font-weight: 600;
}
.bzlp__map-fallback:not([hidden]) {
  display: flex;
}
.bzlp__map-fallback[hidden] {
  display: none !important;
}
.bzlp__map-fallback .fi { font-size: 26px; color: #A8A29E; }
.bzlp__map-hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #A8A29E;
  text-align: center;
  background: transparent;
}
