/* ======================================================================
   Pit o Cuixa — Delivery Map Component
   
   Styles for the Leaflet interactive map, delivery area chicken SVG overlay,
   and town tags on the Menu page.
   ====================================================================== */

.delivery-map-section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
  background-color: var(--color-surface-container-low);
  border-top: 1px solid var(--color-border);
}

.delivery-map-section__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.delivery-map-section__title {
  font-family: var(--font-family);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-on-surface);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.delivery-map-section__subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
}

.delivery-map-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--color-primary);
  background: var(--color-surface-container-lowest);
}

/* Map Canvas Container */
.delivery-map-container {
  width: 100%;
  height: 380px;
  background-color: #e5e3df;
  z-index: 1;
}

@media (max-width: 640px) {
  .delivery-map-container {
    height: 300px;
  }
}

/* Towns Badges Strip below Map */
.delivery-map-towns {
  padding: var(--space-md);
  background-color: var(--color-surface-container-lowest);
  border-top: 1px solid var(--color-border);
}

.delivery-map-towns__label {
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  color: var(--color-on-surface);
  margin-bottom: var(--space-sm);
}

.delivery-map-towns__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  padding: 0;
  margin: 0;
}

.delivery-map-towns__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--color-primary);
  color: var(--color-on-surface);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.delivery-map-towns__tag:hover {
  transform: translateY(-1px);
}

.delivery-map-towns__tag--hub {
  background-color: var(--color-secondary);
  color: #ffffff;
}

/* Directions CTA (DMC-001, DMC-004, DMC-005) */
.delivery-map-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 300px;
  margin: 0 var(--space-md) var(--space-md);
  background-color: var(--color-secondary);
  color: #ffffff;
  border-radius: 25px;
  padding: var(--space-sm) var(--space-lg);
  font-weight: var(--font-weight-semibold);
  font-size: calc(1rem - 25%) !important;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.delivery-map-card__cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.08);
}

.delivery-map-card__cta:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── Mobile CTA ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .delivery-map-card__cta {
    min-width: 0;
    width: auto;
    max-width: calc(100% - 32px);
    font-size: 13px !important;
    padding: 12px 18px;
  }
  .delivery-map-card__icon {
    width: 28px;
    margin-left: 10px;
  }
}

.delivery-map-card__icon {
  width: 28px;
  height: auto;
  margin-left: 10px;
}

.delivery-map-note {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: #fff8e1;
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--color-on-surface);
  font-weight: var(--font-weight-medium);
}

/* Custom Leaflet SVG Chicken Overlay styling */
.chicken-poly-path {
  stroke: var(--color-secondary);
  stroke-width: 3;
  stroke-dasharray: 6 4;
  fill: #d32f2f;
  fill-opacity: 0.15;
  filter: drop-shadow(0 2px 4px rgba(211, 47, 47, 0.3));
  animation: pulse-border 3s ease-in-out infinite alternate;
}

@keyframes pulse-border {
  from {
    stroke-opacity: 0.75;
    fill-opacity: 0.12;
  }
  to {
    stroke-opacity: 1;
    fill-opacity: 0.22;
  }
}

/* Custom Hub Marker */
.pit-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 50%;
  border: 3px solid var(--color-primary);
  box-shadow: var(--shadow-md);
  font-size: 18px;
}
