/**
 * Location Map Styles
 */

.olaf-location-map-container {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.olaf-location-map-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #0a1018;
}

.olaf-location-map,
#olaf-location-map {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08), 0 32px 70px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

/* Leaflet marker customization */
.leaflet-marker-icon {
  border-radius: 50%;
  background: linear-gradient(135deg, #2b8cff 0%, #1f73d8 100%);
  border: 3px solid #ffffff;
  box-shadow: 0 4px 12px rgba(43, 140, 255, 0.4);
  width: 32px !important;
  height: 32px !important;
  margin-left: -16px !important;
  margin-top: -16px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: #ffffff;
}

.leaflet-marker-icon.home {
  background: linear-gradient(135deg, #34c759 0%, #2d9c52 100%);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.4);
  width: 40px !important;
  height: 40px !important;
  margin-left: -20px !important;
  margin-top: -20px !important;
}

.leaflet-marker-icon.golf {
  background: linear-gradient(135deg, #ff9500 0%, #e68000 100%);
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.4);
}

.leaflet-marker-icon.attraction {
  background: linear-gradient(135deg, #2b8cff 0%, #1f73d8 100%);
  box-shadow: 0 4px 12px rgba(43, 140, 255, 0.4);
}

.leaflet-marker-icon.restaurant {
  background: linear-gradient(135deg, #ff3b30 0%, #d32a23 100%);
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
}

/* Popup styling */
.leaflet-popup.olaf-location-popup .leaflet-popup-content-wrapper {
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(248, 245, 242, 0.98));
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16), 0 28px 70px rgba(15, 23, 42, 0.12);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup.olaf-location-popup .leaflet-popup-content {
  font-family: inherit;
  font-size: 0.95rem;
  margin: 0;
  padding: 0.85rem 1rem 0.95rem;
}

.leaflet-popup.olaf-location-popup .leaflet-popup-content h4 {
  margin: 0 0 0.4rem 0;
  font-weight: 700;
  color: #0a1018;
  letter-spacing: -0.01em;
}

.leaflet-popup.olaf-location-popup .leaflet-popup-content p {
  margin: 0.25rem 0 0;
  color: rgba(15, 23, 42, 0.7);
  font-size: 0.85rem;
  line-height: 1.4;
}

.leaflet-popup.olaf-location-popup .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

/* Map Legend */
.olaf-map-legend {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--wp--preset--color--paper);
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.06);
  display: grid;
  gap: 1rem;
}

.olaf-map-legend-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--wp--preset--color--midnight);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.olaf-map-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}

.olaf-map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  background: linear-gradient(135deg, var(--wp--preset--color--paper) 0%, var(--wp--preset--color--mist) 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: left;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.olaf-map-legend-item:hover {
  background: var(--wp--preset--color--paper);
  border-color: var(--wp--preset--color--ocean);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(43, 140, 255, 0.12);
}

.olaf-map-legend-item:active {
  transform: translateY(-1px);
}

.olaf-map-legend-item .legend-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  line-height: 1;
}

.olaf-map-legend-item .legend-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.olaf-map-legend-item .legend-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--wp--preset--color--midnight);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.olaf-map-legend-item .legend-time {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.55);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

/* Responsive */
@media (max-width: 768px) {
  .olaf-location-map,
  #olaf-location-map {
    height: 420px;
  }

  .olaf-location-map-title {
    font-size: 1.25rem;
  }

  .leaflet-marker-icon {
    width: 28px !important;
    height: 28px !important;
    margin-left: -14px !important;
    margin-top: -14px !important;
  }

  .olaf-map-legend {
    padding: 1rem;
  }

  .olaf-map-legend-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 0.5rem;
  }

  .olaf-map-legend-item {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
  }

  .olaf-map-legend-item .legend-icon {
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
  }

  .olaf-map-legend-item .legend-name {
    font-size: 0.85rem;
  }

  .olaf-map-legend-item .legend-time {
    font-size: 0.7rem;
  }
}
