/* Leaflet skin for Nyika & Beyond. Loaded after the vendor stylesheet. */
.leaflet-container {
  background: #e5ece3;
  color: #29251f;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
}
.leaflet-container a { color: #813d28; }
.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(38, 61, 43, 0.2) !important;
  border-radius: 0.7rem !important;
  box-shadow: 0 10px 24px -18px rgba(24, 39, 28, 0.7) !important;
}
.leaflet-control-zoom a {
  width: 32px !important;
  height: 32px !important;
  line-height: 30px !important;
  background: rgba(246, 240, 229, 0.96) !important;
  color: #263d2b !important;
  font-size: 18px !important;
}
.leaflet-control-zoom a:hover { background: #fff !important; color: #813d28 !important; }
.leaflet-control-attribution {
  border-radius: 0.45rem 0 0 0;
  background: rgba(246, 240, 229, 0.82) !important;
  color: #615c52 !important;
  font-size: 9px !important;
  padding: 2px 6px !important;
  backdrop-filter: blur(4px);
}
.leaflet-control-attribution a { color: #475a49 !important; }

.nb-map-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #f6f0e5;
  border-radius: 50% 50% 50% 4px;
  background: #b85c38;
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(24, 39, 28, 0.8);
  transform: rotate(-45deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nb-map-pin > span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(24, 39, 28, 0.24);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  transform: rotate(45deg);
}
.nb-map-pin--safari { background: #b85c38; }
.nb-map-pin--rift { background: #426b4e; }
.nb-map-pin--coast { background: #2f7f8f; }
.nb-map-pin--city { background: #8a6a3b; }
.nb-map-pin--culture { background: #8c4a5a; }
.nb-legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #d7b778; }
.nb-route-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #d7b778; }
.nb-route-dot--safari, .nb-route-dot--classic { background: #b85c38; }
.nb-route-dot--rift { background: #426b4e; }
.nb-route-dot--coast { background: #2f7f8f; }
.nb-route-dot--city { background: #8a6a3b; }
.nb-route-dot--culture { background: #8c4a5a; }
.nb-legend-safari { background: #b85c38; }
.nb-legend-rift { background: #426b4e; }
.nb-legend-coast { background: #2f7f8f; }
.nb-legend-city { background: #8a6a3b; }
.nb-legend-culture { background: #8c4a5a; }
.nb-map-pin.is-active,
.leaflet-marker-icon:hover .nb-map-pin {
  transform: rotate(-45deg) scale(1.16);
  box-shadow: 0 12px 24px -9px rgba(24, 39, 28, 0.9);
}
.nb-map-pin.is-active::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(215, 183, 120, 0.9);
  border-radius: 50%;
  animation: pin-pulse 1.8s ease-out infinite;
}
@keyframes pin-pulse {
  0% { opacity: 0.7; transform: scale(0.82); }
  100% { opacity: 0; transform: scale(1.6); }
}

.leaflet-popup-content-wrapper {
  border: 1px solid rgba(215, 183, 120, 0.55);
  border-radius: 1rem;
  background: #fbf7ef;
  box-shadow: 0 26px 60px -28px rgba(24, 39, 28, 0.75);
  padding: 0;
  overflow: hidden;
}
.leaflet-popup-content { width: 252px !important; margin: 0; }
.leaflet-popup-tip { background: #fbf7ef; border: 1px solid rgba(215, 183, 120, 0.55); }
.leaflet-container a.leaflet-popup-close-button {
  z-index: 2;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(24, 39, 28, 0.65);
  color: #f6f0e5 !important;
  font: 18px/22px Inter, sans-serif;
  text-align: center;
}
.leaflet-container a.leaflet-popup-close-button:hover { background: #813d28; }
.nb-map-popup-media { position: relative; height: 112px; overflow: hidden; background: #263d2b; }
.nb-map-popup-media img { width: 100%; height: 100%; object-fit: cover; }
.nb-map-popup-body { padding: 0.8rem 0.9rem 0.95rem; }
.nb-map-popup-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  background: rgba(38, 61, 43, 0.08);
  color: #426b4e;
  padding: 0.2rem 0.45rem;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nb-map-popup-cat::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.nb-map-popup h3 { margin: 0.35rem 0 0; color: #263d2b; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.35rem; font-weight: 600; line-height: 1; }
.nb-map-popup p { margin: 0.3rem 0 0; color: #686155; font-size: 0.7rem; line-height: 1.5; }
.nb-map-popup-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.nb-map-popup-meta span { border: 1px solid rgba(215, 183, 120, 0.5); border-radius: 999px; background: #fff; color: #5f594f; padding: 0.18rem 0.4rem; font-size: 8px; font-weight: 700; }
.nb-map-popup-actions { display: flex; gap: 0.35rem; margin-top: 0.65rem; }
.nb-map-popup-actions a {
  flex: 1;
  border-radius: 999px;
  padding: 0.42rem 0.35rem;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.nb-map-popup-view { border: 1px solid rgba(38, 61, 43, 0.25); color: #263d2b; }
.nb-map-popup-book { background: #813d28; color: #fff !important; }
.nb-map-popup-view:hover { background: #263d2b; color: #f6f0e5; }

.nb-map-tile-error {
  position: absolute;
  z-index: 460;
  left: 50%;
  bottom: 0.8rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  transform: translateX(-50%);
  border: 1px solid rgba(246, 240, 229, 0.24);
  border-radius: 0.6rem;
  background: rgba(24, 39, 28, 0.88);
  color: #f6f0e5;
  padding: 0.45rem 0.7rem;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
  backdrop-filter: blur(6px);
}
.nb-map-tile-error[hidden] { display: none; }
.nb-map-route-line { filter: drop-shadow(0 2px 4px rgba(24, 39, 28, 0.3)); }
.nb-map-route-casing { filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.5)); }

@media (max-width: 480px) {
  .leaflet-popup-content { width: 224px !important; }
  .nb-map-popup-media { height: 96px; }
}

@media (max-width: 640px) {
  .nb-map-legend {
    left: 0.55rem;
    right: 0.55rem;
    bottom: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.55rem;
    padding: 0.38rem 0.5rem;
    font-size: 0.53rem;
    line-height: 1.5;
  }
  .nb-map-legend span { margin-right: 0; }
  .nb-map-badge { top: 0.65rem; left: 0.65rem; font-size: 0.52rem; padding: 0.35rem 0.55rem; }
  .leaflet-control-scale-line { font-size: 8px; }
  .leaflet-control-attribution { font-size: 8px !important; }
}
