/**
 * Unseen Place — Core Interactive Map Layout & Marker Styles
 *
 * @package Unseen_Place
 * @since 3.0.0
 */

:root {
  --up-green: #006a4e;
  --up-dark-green: #032b1b;
  --up-teal: #0284c7;
  --up-blue: #2563eb;
  --up-red: #ef4444;
  --up-white: #ffffff;
  --up-border: #e2e8f0;
}

/* Master Three-Column Discovery Layout */
.unseen-map-layout {
  display: flex;
  width: 100%;
  height: 780px;
  max-height: calc(100vh - 80px);
  min-height: 580px;
  background: #f8fafc;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  position: relative;
}

/* Fullscreen mode */
.unseen-map-layout.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  z-index: 999999 !important;
}

/* Center Map Container */
.tourist-map {
  flex: 1;
  position: relative;
  height: 100%;
  background: #eaf4ea;
  overflow: hidden;
}

#unseen-leaflet-map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* =========================================================================
   CUSTOM MAP MARKERS (SVG & CSS Category Pins)
   ========================================================================= */

.up-marker-pin {
  width: 32px;
  height: 38px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.up-marker-pin:hover {
  transform: translateY(-4px) scale(1.1);
  z-index: 900 !important;
}

.up-marker-svg {
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.25));
  width: 100%;
  height: 100%;
}

.up-marker-icon-symbol {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  pointer-events: none;
  line-height: 1;
}

/* Active Selected Marker Pulse & Ring */
.up-marker-pin.is-active {
  transform: translateY(-6px) scale(1.22);
  z-index: 9999 !important;
}

.up-marker-pin.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  filter: blur(2px);
}

.up-marker-pulse-ring {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--up-red, #ef4444);
  animation: upMarkerPulse 1.8s infinite;
  pointer-events: none;
}

@keyframes upMarkerPulse {
  0% { transform: translateX(-50%) scale(0.8); opacity: 1; }
  100% { transform: translateX(-50%) scale(2.2); opacity: 0; }
}

/* Category Colors */
.up-marker-beach .up-marker-fill { fill: #f59e0b; }
.up-marker-hill .up-marker-fill { fill: #16a34a; }
.up-marker-forest .up-marker-fill { fill: #047857; }
.up-marker-waterfall .up-marker-fill { fill: #0284c7; }
.up-marker-island .up-marker-fill { fill: #0d9488; }
.up-marker-historical .up-marker-fill { fill: #dc2626; }
.up-marker-nature .up-marker-fill { fill: #059669; }
.up-marker-default .up-marker-fill { fill: #006a4e; }

/* Custom Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.leaflet-popup-content {
  margin: 0;
  line-height: 1.4;
  min-width: 230px;
  max-width: 280px;
}

.up-popup-card {
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.up-popup-thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.up-popup-body {
  flex: 1;
  min-width: 0;
}

.up-popup-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.up-popup-location {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}

.up-popup-btn {
  display: inline-block;
  background: var(--up-color-primary, #006a4e);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.up-popup-btn:hover {
  background: #005840;
}
