/**
 * Deals Near Me Map Styles
 */

.ndc-deals-near-me {
  max-width: 1140px;
  margin: 0 auto;
  padding: 15px;
}

.ndc-deals-near-me-header {
  text-align: center;
  margin-bottom: 24px;
}

.ndc-deals-near-me-title {
  font-size: 30px;
  font-weight: 800;
  color: #ff7a1a;
  margin-bottom: 8px;
}

.ndc-deals-near-me-subtitle {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

.ndc-map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding: 12px;
  background: rgba(255,255,255,0.8);
  border-radius: 8px;
}

.ndc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
}

.ndc-legend-marker {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ndc-legend-marker.blue {
  background: #3388ff;
}

.ndc-legend-marker.green {
  background: #33cc33;
}

.ndc-legend-marker.orange {
  background: #ff8800;
}

.ndc-legend-marker.blue-entertainment {
  background: #3388ff;
}

.ndc-legend-marker.yellow {
  background: #ffcc00;
}

.ndc-legend-marker.red-user {
  background: #dc2626;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #dc2626;
}

.ndc-map-container {
  width: 100%;
  height: 500px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  z-index: 1;
  margin-top: 24px;
}

/* Leaflet map container adjustments */
.ndc-map-container .leaflet-container {
  height: 100%;
  width: 100%;
  border-radius: 22px;
}

#ndc-deals-list-container {
  margin-top: 15px;
}

.ndc-deals-list {
  padding: 20px;
  max-height: none;
  overflow-y: visible;
}

.ndc-deals-list-title {
  font-size: 24px;
  font-weight: 800;
  color: #ff7a1a;
  margin-bottom: 20px;
}

.ndc-deals-nearby-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ndc-deal-nearby-item {
  padding: 16px;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
}

.ndc-deal-nearby-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.ndc-deal-nearby-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.ndc-deal-nearby-offer {
  font-size: 16px;
  color: #ff7a1a;
  font-weight: 600;
  margin-bottom: 6px;
}

.ndc-deal-nearby-distance {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.ndc-deal-nearby-link {
  display: inline-block;
  padding: 8px 16px;
  background: #ff7a1a;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.ndc-deal-nearby-link:hover {
  background: #e66a15;
}

.ndc-no-deals {
  text-align: center;
  color: #666;
  padding: 40px 20px;
}

.ndc-location-status {
  padding: 16px 20px;
  border-radius: 8px;
  margin-top: 16px;
  text-align: left;
  font-weight: 500;
  line-height: 1.6;
}

.ndc-location-status strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.ndc-location-status-loading {
  background: #e3f2fd;
  color: #1976d2;
  text-align: center;
}

.ndc-location-status-success {
  background: #e8f5e9;
  color: #2e7d32;
  text-align: center;
}

.ndc-location-status-error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #c62828;
}

.ndc-map-info-window {
  padding: 12px;
  min-width: 250px;
  max-width: 300px;
  background: #fff;
  border-radius: 12px;
}

.ndc-map-info-window h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ff7a1a;
}

.ndc-map-info-window p {
  font-size: 14px;
  margin: 6px 0;
  color: #666;
  line-height: 1.4;
}

.ndc-popup-deal {
  color: #ff7a1a !important;
  font-weight: 600;
}

.ndc-popup-category {
  text-transform: capitalize;
}

.ndc-popup-address {
  color: #333;
}

.ndc-popup-phone a {
  color: #ff7a1a;
  text-decoration: none;
}

.ndc-popup-phone a:hover {
  text-decoration: underline;
}

.ndc-popup-distance {
  color: #666;
  font-style: italic;
}

.ndc-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.ndc-popup-btn {
  display: inline-block;
  padding: 8px 16px;
  background: #ff7a1a;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s;
}

.ndc-popup-btn:hover {
  background: #e66a15;
  color: #fff;
  text-decoration: none;
}

.ndc-popup-btn-website {
  background: #333;
}

.ndc-popup-btn-website:hover {
  background: #555;
}

/* Leaflet tooltip styling */
.leaflet-tooltip {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Leaflet popup styling - ensure background on mobile */
.leaflet-popup-content-wrapper {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  padding: 0 !important;
}

.leaflet-popup-tip {
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .ndc-map-container {
    height: 400px;
  }
  
  /* Ensure popup has proper styling on mobile */
  .leaflet-popup-content-wrapper {
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
    min-width: 280px !important;
    max-width: 90vw !important;
  }
  
  .ndc-map-info-window {
    padding: 16px !important;
    min-width: 280px !important;
    max-width: 90vw !important;
  }
}
