/* =====================================================================
   Unified itinerary design — shared across the three itinerary types.

   Provides the hero card, per-type accent theming and the day-number
   badge used by the AI planner (type-a, teal), the Flex chunk planner
   (type-b, purple) and the day planner (type-c, amber).

   A container gets its palette from a `.type-a` / `.type-b` / `.type-c`
   modifier; every rule below reads the accent through CSS custom
   properties so the same markup recolours per type. Component internals
   (chunk cards, day groups, packing, tabs) keep their own per-page CSS
   and simply consume these accent tokens.
   ===================================================================== */

/* ---- Palette tokens ---- */
.type-a, .type-b, .type-c {
  --b-line:    #e5e9ee;
  --b-ink:     #0f172a;
  --b-muted:   #64748b;
  --b-surface: #ffffff;
}
.type-a {
  --b-accent: #43b0b3;
  --b-accent-ink: #2f7d80;
  --b-accent-soft: #e2f4f3;
  --b-accent-glow: rgba(67, 176, 179, 0.35);
}
.type-b {
  --b-accent: #7589d5;
  --b-accent-ink: #4655a6;
  --b-accent-soft: #eaedf9;
  --b-accent-glow: rgba(117, 137, 213, 0.35);
}
.type-c {
  --b-accent: #f59e0b;
  --b-accent-ink: #b45309;
  --b-accent-soft: #fef3c7;
  --b-accent-glow: rgba(245, 158, 11, 0.35);
}

/* ---- Hero card ---- */
.itin-hero {
  display: flex;
  border: 1px solid var(--b-line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.10);
  margin-bottom: 20px;
}
.itin-hero-photo {
  position: relative;
  width: 320px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(150deg, var(--b-accent), var(--b-accent-ink));
}
.itin-hero-photo.has-img { background-image: none; }
.itin-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 20, 30, 0.55), transparent 55%);
}
.itin-hero-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--b-accent);
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.itin-hero-weather {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.itin-hero-body {
  flex: 1;
  min-width: 0;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
}
.itin-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.itin-hero-headings { min-width: 0; }
.itin-hero-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--b-accent-ink);
  margin-bottom: 6px;
}
.itin-hero-title,
.itin-hero .itinerary-title,
.itin-hero .trip-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--b-ink);
  margin: 0;
}
.itin-hero-dates,
.itin-hero .itinerary-dates,
.itin-hero .trip-dates {
  font-size: 0.82rem;
  color: var(--b-muted);
  font-weight: 600;
  margin: 7px 0 0;
}
.itin-hero-desc,
.itin-hero .itinerary-description,
.itin-hero .trip-desc {
  font-size: 0.85rem;
  color: var(--b-muted);
  line-height: 1.5;
  margin: 8px 0 0;
}
.itin-hero-countdown {
  text-align: center;
  flex-shrink: 0;
  border-left: 1px solid #eef1f5;
  padding-left: 20px;
}
.itin-hero-countdown .num {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 0.9;
  color: var(--b-accent);
  letter-spacing: -0.02em;
}
.itin-hero-countdown .lbl {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-top: 5px;
}
.itin-hero-stats {
  display: flex;
  gap: 26px;
  align-items: center;
  margin: 18px 0;
  padding: 14px 0;
  border-top: 1px solid #eef1f5;
  border-bottom: 1px solid #eef1f5;
  flex-wrap: wrap;
}
.itin-hero-stats:empty { display: none; }
.itin-hero-stat .val { font-size: 1.05rem; font-weight: 800; color: var(--b-ink); }
.itin-hero-stat .cap {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.itin-hero-packing { flex: 1; max-width: 180px; min-width: 130px; }
.itin-hero-packing .row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}
.itin-hero-packing .bar {
  height: 6px;
  border-radius: 4px;
  background: #eef2f6;
  overflow: hidden;
}
.itin-hero-packing .bar > span {
  display: block;
  height: 100%;
  background: var(--b-accent);
}
.itin-hero-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}

/* Small decorative sun glyph for the weather chip (not a control). */
.itin-hero .upcoming-sun {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #ffd27a, #ff914d);
  box-shadow: 0 0 0 2px rgba(255, 145, 77, 0.22);
  display: inline-block;
  flex-shrink: 0;
}

/* Primary action pill follows the type accent. */
.type-a .trip-action-btn.is-primary,
.type-b .trip-action-btn.is-primary,
.type-c .trip-action-btn.is-primary {
  color: var(--b-accent-ink);
  border-color: var(--b-accent);
}
.type-a .trip-action-btn.is-primary:hover,
.type-b .trip-action-btn.is-primary:hover,
.type-c .trip-action-btn.is-primary:hover {
  background: var(--b-accent);
  border-color: var(--b-accent);
  color: #fff;
}

/* ---- Day-number badge (day-card / day-group headers) ---- */
.day-num-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--b-accent-soft);
}
.day-num-badge .dnb-cap {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--b-accent-ink);
  opacity: 0.85;
}
.day-num-badge .dnb-num {
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  color: var(--b-accent-ink);
}

/* ---- Mobile: stack hero, tighten padding ---- */
@media (max-width: 760px) {
  .itin-hero { flex-direction: column; }
  .itin-hero-photo { width: 100%; height: 150px; }
  .itin-hero-body { padding: 16px 16px 18px; }
  .itin-hero-countdown { padding-left: 14px; }
  .itin-hero-title,
  .itin-hero .itinerary-title,
  .itin-hero .trip-title { font-size: 1.35rem; }
  .itin-hero-stats { gap: 18px; }
  .day-num-badge { width: 42px; height: 42px; }
}
@media (max-width: 420px) {
  .itin-hero-stats { gap: 14px; }
  .itin-hero-actions .trip-action-btn { flex: 1; justify-content: center; }
}

/* ---- Tabs follow the type accent (base .tab-btn lives in overview.css) ---- */
.type-a .tab-btn:hover,
.type-b .tab-btn:hover,
.type-c .tab-btn:hover { color: var(--b-accent-ink); }
.type-a .tab-btn.active,
.type-b .tab-btn.active,
.type-c .tab-btn.active {
  color: var(--b-accent-ink);
  border-bottom-color: var(--b-accent);
}

/* ---- Google Places category chooser follows the type accent ---- */
.type-b .place-option.chosen,
.type-c .place-option.chosen {
  border-color: var(--b-accent);
  box-shadow: 0 0 0 3px var(--b-accent-soft), 0 6px 16px rgba(15, 23, 42, 0.1);
}
.type-b .place-choose-btn,
.type-c .place-choose-btn {
  border-color: var(--b-accent);
  color: var(--b-accent-ink);
}
.type-b .place-choose-btn:hover:not(:disabled),
.type-c .place-choose-btn:hover:not(:disabled) {
  background: var(--b-accent);
  color: #fff;
}

/* =====================================================================
   Back-to-overview link + consistent top spacing above the hero.
   Modus A gets its top padding from .itin-shell; give the Flex and
   Dagplanner wrappers the same so all three pages line up.
   ===================================================================== */
.trip-header-col.type-b,
.dp-page.type-c { padding-top: 24px; }

.itin-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--b-muted);
  background: #fff;
  border: 1px solid var(--b-line);
  border-radius: 999px;
  padding: 7px 15px 7px 12px;
  margin-bottom: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.itin-back:hover { background: #f1f5f9; color: var(--b-ink); border-color: #d7dde4; }
.itin-back .itin-back-arrow { font-size: 1.05em; line-height: 1; }

@media (max-width: 760px) {
  .trip-header-col.type-b,
  .dp-page.type-c { padding-top: 14px; }
  .itin-back { font-size: 0.8rem; padding: 6px 13px 6px 11px; margin-bottom: 12px; }
}
