/* Blog map popup styles (Leaflet) */

/* Override Leaflet popup defaults */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  width: 320px !important;
  margin: 0;
}

.leaflet-popup-tip {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Main popup container */
.map-image {
  position: relative;
  width: 320px;
  height: 220px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.map-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
  pointer-events: none;
}

/* Title overlay */
.map-image-title {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  padding: 0 16px;
  text-align: center;
}

.map-image-title a {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
  display: block;
}

.map-image-title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Info bar at bottom */
.map-image-info-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* Date badge */
.map-image-date {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 4px;
  position: static;
  text-shadow: none;
}

/* Stats container */
.map-image-stats {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Distance and time badges */
.map-image-distance,
.map-image-time-spent {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  position: static;
  text-shadow: none;
  width: auto;
  text-align: left;
}

.map-image-distance::before {
  content: '';
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

.map-image-time-spent::before {
  content: '';
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67V7z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}

/* Route type indicator (optional - shown on hover) */
.map-image-route-type {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* Close button styling */
.leaflet-popup-close-button {
  color: #fff !important;
  font-size: 24px !important;
  font-weight: 300 !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  right: 8px !important;
  top: 8px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border-radius: 50% !important;
  text-align: center !important;
  line-height: 30px !important;
  transition: background 0.2s ease !important;
}

.leaflet-popup-close-button:hover {
  background: rgba(0, 0, 0, 0.6) !important;
  color: #fff !important;
}
