/* ── Itinerary Maps — Inline Leaflet maps for island itineraries ── */

.itin-map {
  position: relative;
  width: 100%;
  margin: 15px 0 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  background: #e8eee8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.itin-map-canvas {
  width: 100%;
  height: 360px;
}

@media (max-width: 640px) {
  .itin-map-canvas {
    height: 280px;
  }
}

@media (min-width: 1024px) {
  .itin-map-canvas {
    height: 420px;
  }
}

/* Override Leaflet attribution for better fit */
.itin-map .leaflet-control-attribution {
  font-size: 11px;
  background: rgba(255,255,255,0.8);
  border-radius: 4px 0 0 0;
}

/* Popup styling — sized for comfortable reading on the guidebook page,
   where the map is the primary visual anchor for each day. 16px body /
   17px title matches the rest of the day-card prose. */
.itin-map .leaflet-popup-content-wrapper {
  border-radius: 8px;
  font-family: inherit;
  box-shadow: 0 3px 14px rgba(0,0,0,0.2);
}
.itin-map .leaflet-popup-content {
  margin: 12px 16px;
  font-size: 16px;
  line-height: 1.45;
}
.itin-map .leaflet-popup-content strong {
  font-size: 17px;
  display: block;
  margin-bottom: 4px;
}

/* ── Day section card styling ── */

.itin-day-section {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 20px 24px;
  margin: 20px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.itin-day-section h3 {
  margin-top: 0;
  padding-top: 0;
}

.itin-day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.itin-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.itin-day-num.oahu { background: #F27A24; }
.itin-day-num.maui { background: #1866B4; }
.itin-day-num.kauai { background: #1D9771; }
.itin-day-num.big-island { background: #c3232f; }

.itin-stops-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.itin-stops-list li {
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
  font-size: 16px;
  line-height: 1.5;
}

.itin-stops-list li:last-child {
  border-bottom: none;
}

.itin-stop-num {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-right: 8px;
  vertical-align: middle;
}

.itin-stop-num.oahu { background: #F27A24; }
.itin-stop-num.maui { background: #1866B4; }
.itin-stop-num.kauai { background: #1D9771; }
.itin-stop-num.big-island { background: #c3232f; }

/* ── Map Key clickable rows (things-to-do pages) ── */
.ttd-map-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #222;
  text-decoration: none;
  transition: background 0.12s ease, transform 0.12s ease;
}
.ttd-map-link:hover,
.ttd-map-link:focus {
  background: #f2f6fb;
  text-decoration: none;
  transform: translateX(2px);
  color: #222;
}
.ttd-map-link:hover .ttd-map-label,
.ttd-map-link:focus .ttd-map-label {
  text-decoration: underline;
}
.ttd-map-link .ttd-map-num {
  margin-right: 0;
  flex-shrink: 0;
}

/* ── Print styles ── */
@media print {
  .itin-map {
    border: 1px solid #ccc;
    box-shadow: none;
    page-break-inside: avoid;
  }
  .itin-map-canvas {
    height: 300px;
  }
}
