/* ==========================================================================
   SWEETHEART MAP — Leaflet theme
   Depends on style.css being loaded first (uses its custom properties).
   ========================================================================== */

/* Frame wrapper — treat the map like any other keepsake frame */
.sweetheart-map-frame {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 0.6rem;
  box-shadow: var(--shadow-lift);
  border: 1px solid #f4e2ea;
}

.sweetheart-map {
  width: 100%;
  height: 340px;
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
  background: var(--blush-soft); /* shows while tiles load */
}

/* Soften OSM standard tiles to match the pastel theme */
.sweetheart-map .leaflet-tile-pane {
  filter: saturate(0.75) brightness(1.04) contrast(0.95);
}

.sweetheart-map-frame .caption {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--mauve-deep);
  text-align: center;
  margin: 0.6rem 0 0.2rem;
}

/* Leaflet control overrides */
.leaflet-control-zoom a {
  background: var(--paper) !important;
  color: var(--mauve-deep) !important;
  border-color: var(--blush) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--blush-soft) !important;
}
.leaflet-control-attribution {
  background: rgba(255, 253, 248, 0.8) !important;
  color: var(--plum-soft) !important;
  font-size: 0.68rem !important;
}
.leaflet-control-attribution a { color: var(--mauve-deep) !important; }

/* Popup theme */
.leaflet-popup-content-wrapper {
  background: var(--paper);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  padding: 0;
}
.leaflet-popup-content {
  margin: 0;
  min-width: 160px;
}
.leaflet-popup-tip {
  background: var(--paper);
}
.leaflet-popup-close-button {
  color: var(--mauve-deep) !important;
  font-size: 1.1rem !important;
  padding: 6px 8px !important;
}

.map-popup {
  padding: 0.9rem 1rem;
  text-align: center;
}
.map-popup .popup-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--plum);
  margin: 0 0 0.3rem;
}
.map-popup .popup-note {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--mauve-deep);
  margin: 0 0 0.3rem;
  line-height: 1.3;
}
.map-popup img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.map-popup .popup-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--blush);
  color: var(--mauve-deep);
}
.map-popup.is-found .popup-status {
  background: #e3ecd9;
  color: #5c7a4a;
}

/* Custom pin marker (teardrop, rotated square) */
.sweetheart-pin {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: var(--shadow-tiny);
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  display: flex;
  align-items: center;
  justify-content: center;
}
.sweetheart-pin .pin-icon {
  transform: rotate(45deg);
  font-size: 1rem;
  line-height: 1;
}
.sweetheart-pin.is-found {
  background: linear-gradient(135deg, #b9d19f, var(--sage));
}
.sweetheart-pin.is-locked {
  background: #ddc9d2;
  opacity: 0.65;
}

/* Reduced motion: no marker bounce/animation added beyond Leaflet defaults */
@media (prefers-reduced-motion: reduce) {
  .sweetheart-pin { transition: none !important; }
}

