/* ===== MosquePro map tiles, pins & clusters ===== */

.leaflet-map-host {
  overflow: hidden;
}

.leaflet-map-host--light {
  background: #f1f5f9;
}

.leaflet-map-host--dark {
  background: #0f172a;
}

.leaflet-map-host .leaflet-container {
  background: transparent;
}

.leaflet-map-host--light .leaflet-control-zoom a {
  background: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
}

.leaflet-map-host--dark .leaflet-control-zoom a {
  background: #1e293b;
  color: #f8fafc;
  border-color: #334155;
}

/* App-style MapPin bubble (MosqueProV03/components/MapPin.tsx) */
.mp-app-pin-leaflet {
  background: transparent !important;
  border: none !important;
}

.mp-app-pin {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  user-select: none;
}

.mp-app-pin-pill {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}

.mp-app-pin-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 13px;
  padding: 0 8px;
  border-radius: 5px;
  background: var(--mp-pin-pill, #32cd32);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-transform: capitalize;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.mp-app-pin-shell {
  position: relative;
  width: 100%;
}

.mp-app-pin-svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  overflow: visible;
  pointer-events: none;
}

.mp-app-pin-body {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border-radius: 8px 8px 6px 6px;
}

.mp-app-pin-media {
  width: 45%;
  height: 80%;
  margin-left: 2.5%;
  border-radius: 6px;
  object-fit: cover;
  align-self: center;
  flex-shrink: 0;
}

.mp-app-pin-media--icon,
.mp-app-pin-media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  color: #a7adb3;
  font-size: 1.15rem;
}

.mp-app-pin-media--placeholder {
  background: #334155;
  color: #94a3b8;
}

.mp-app-pin-info {
  flex: 1;
  min-width: 0;
  padding: 4px 8px 4px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mp-app-pin-title {
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-app-pin-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 2px;
  min-width: 0;
}

.mp-app-pin-main {
  color: #e6e8eb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mp-app-pin-sub {
  color: #b8bdc3;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Legacy teardrop pin (static mockups) */
.mp-mosque-pin-wrap {
  background: transparent !important;
  border: none !important;
}

.mp-mosque-pin {
  position: relative;
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, #1b6b4d 0%, #145a40 100%);
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 16px rgba(15, 23, 42, 0.35),
    0 0 0 3px rgba(255, 255, 255, 0.96);
  border: 2px solid #fff;
}

.mp-mosque-pin-wrap--verified .mp-mosque-pin {
  background: linear-gradient(145deg, #22c55e 0%, #15803d 100%);
  box-shadow:
    0 6px 18px rgba(34, 197, 94, 0.45),
    0 0 0 3px rgba(255, 255, 255, 0.96),
    0 0 0 6px rgba(245, 158, 11, 0.55);
}

.mp-mosque-pin-wrap--listed .mp-mosque-pin {
  background: linear-gradient(145deg, #1b6b4d 0%, #0f5132 100%);
}

.mp-mosque-pin-icon {
  transform: rotate(45deg);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-mosque-pin-icon svg {
  display: block;
}

/* Marker clusters */
.mp-cluster-wrap {
  background: transparent !important;
  border: none !important;
}

.mp-cluster {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.82rem;
  color: #fff;
  background: linear-gradient(145deg, #1b6b4d 0%, #145a40 100%);
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}

.mp-cluster--sm {
  width: 38px;
  height: 38px;
  font-size: 0.75rem;
}

.mp-cluster--lg {
  width: 52px;
  height: 52px;
  font-size: 0.9rem;
}

.leaflet-map-host--dark .mp-cluster {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

/* Popups */
.leaflet-map-host .leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.leaflet-map-host--dark .leaflet-popup-content-wrapper {
  background: #1e293b;
  color: #f8fafc;
}

.leaflet-map-host--dark .leaflet-popup-tip {
  background: #1e293b;
}

.mp-map-popup {
  font-size: 0.88rem;
  line-height: 1.4;
  min-width: 140px;
}

.mp-map-popup strong {
  display: block;
  margin-bottom: 4px;
}

.mp-verified-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  font-weight: 700;
  font-size: 0.72rem;
}

.leaflet-map-host--dark .mp-verified-tag {
  background: rgba(34, 197, 94, 0.22);
  color: #4ade80;
}

/* User location dot */
.mp-you-are-here {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.35);
}
