/* Itinerary tile (F3.d) — optional photo strip on top, content in the body.
   Layout inspired by the "TripGoGo Site Redesign" handoff (title-below-banner
   variant). Every colour/font/radius comes from the existing design tokens in
   tripgogo/static/tripgogo/styles.css — only neutral black-alpha shadows are
   literal. Loaded after itinerary.css, so the card overrides below win. */

/* ── Card shell ── */
.itinerary-item {
  margin-left: 0; /* number disc lives in the body header now — no offset */
  overflow: hidden; /* clip the photo strip to the rounded top corners */
  background: #fff;
  border: 1px solid var(--border);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.itinerary-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* ── Optional photo strip ── */
.itinerary-photo {
  width: 100%;
  height: 168px;
  background: var(--gray-100);
}

.itinerary-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lazy loader slot reserves no space — collapses to nothing if no photo. */
.itinerary-photo-lazy {
  display: none;
}

/* ── Body ── */
.itinerary-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px 16px;
}

.itinerary-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.itinerary-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Number disc keeps the per-type colour coding via the shared pin-label-*
   classes (green/blue/orange/golden) — same palette as the map pins. */
.itinerary-number-disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.itinerary-time-text {
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.itinerary-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--gray-400);
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.itinerary-delete-btn:hover {
  background: var(--gray-100);
  color: var(--gray-700);
}

.itinerary-body .activity-title {
  margin: 0;
  color: var(--neutral-dark);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

/* ── Action row ── */
.itinerary-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.tile-book-btn,
.tile-change-btn,
.tile-details-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.tile-book-btn {
  padding: 0 18px;
  border: none;
  background: var(--accent);
  color: var(--neutral-dark);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.tile-book-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.tile-change-btn {
  padding: 0 16px;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border);
}

.tile-change-btn:hover {
  background: var(--teal-50);
  border-color: var(--primary);
}

.tile-details-btn {
  padding: 0 6px;
  background: transparent;
  border: none;
  color: var(--gray-600);
}

.tile-details-btn:hover {
  color: var(--primary);
}

/* Keep the reaction/chat cluster on the right of the action row. */
.itinerary-action-row .reactions-and-chat {
  margin-left: auto;
}

/* ── "+" inserter — dashed circle hinting "add a stop" (existing behaviour) ── */
.add-item-btn {
  background: #fff;
  color: var(--gray-500);
  border: 1.5px dashed var(--gray-300);
}

.add-item-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateX(-50%) scale(1.08);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .itinerary-photo {
    height: 140px;
  }
}
