/* ============================================================
   Europe Trip 2027 — Trip Planner
   ============================================================ */

:root {
  --color-london: #1d4ed8;
  --color-london-bg: #eff6ff;
  --color-london-border: #bfdbfe;
  --color-paris: #7c3aed;
  --color-paris-bg: #f5f3ff;
  --color-paris-border: #ddd6fe;
  --color-rome: #dc2626;
  --color-rome-bg: #fef2f2;
  --color-rome-border: #fecaca;
  --color-travel: #4b5563;
  --color-travel-bg: #f9fafb;
  --color-travel-border: #e5e7eb;

  --surface: #ffffff;
  --bg: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --tag-must: #15803d;
  --tag-must-bg: #dcfce7;
  --tag-optional: #92400e;
  --tag-optional-bg: #fef3c7;
  --tag-heavy: #991b1b;
  --tag-heavy-bg: #fee2e2;
  --tag-light: #065f46;
  --tag-light-bg: #d1fae5;
  --tag-travel: #1e3a5f;
  --tag-travel-bg: #dbeafe;
  --tag-flexible: #5b21b6;
  --tag-flexible-bg: #ede9fe;

  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --transition: 200ms ease;

  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* ============================================================
   Header
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--text);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  height: var(--header-h);
  max-width: 960px;
  margin: 0 auto;
}

.header-title { flex-shrink: 0; }

.header-title h1 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-title .subtitle {
  font-size: 12px;
  opacity: 0.6;
  margin-top: -2px;
}

.header-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  flex: 1;
}

.header-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  opacity: 0.75;
}

.header-meta-item svg { opacity: 0.6; flex-shrink: 0; }

/* ============================================================
   City Nav
   ============================================================ */
#city-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-h);
  z-index: 90;
}

.city-nav-inner {
  display: flex;
  gap: 4px;
  padding: 10px 20px;
  max-width: 960px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.city-nav-inner::-webkit-scrollbar { display: none; }

.city-btn {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.city-btn:hover { background: var(--bg); color: var(--text); }

.city-btn.active { border-color: transparent; color: #fff; background: var(--text); }
.city-btn[data-city="london"].active { background: var(--color-london); }
.city-btn[data-city="paris"].active  { background: var(--color-paris); }
.city-btn[data-city="rome"].active   { background: var(--color-rome); }
.city-btn[data-city="travel"].active { background: var(--color-travel); }

/* ============================================================
   Main layout
   ============================================================ */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ============================================================
   Global heat banner
   ============================================================ */
#global-heat-banner {
  display: none;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #9a3412;
  line-height: 1.5;
}

/* ============================================================
   Planning Timeline
   ============================================================ */
#planning-timeline {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

#planning-timeline .section-header {
  margin-bottom: 16px;
}

#planning-timeline .section-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

#planning-timeline .section-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.timeline-col {
  flex: 0 0 auto;
  min-width: 160px;
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1.5px solid var(--border);
}

.timeline-col.urgency-critical {
  background: #fef2f2;
  border-color: #fca5a5;
}

.timeline-col.urgency-high {
  background: #fff7ed;
  border-color: #fdba74;
}

.timeline-col.urgency-medium {
  background: #fefce8;
  border-color: #fde047;
}

.timeline-col.urgency-low {
  background: #f0fdf4;
  border-color: #86efac;
}

.timeline-when {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  color: var(--text);
}

.urgency-critical .timeline-when { color: #b91c1c; }
.urgency-high     .timeline-when { color: #c2410c; }
.urgency-medium   .timeline-when { color: #713f12; }
.urgency-low      .timeline-when { color: #15803d; }

.timeline-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-items li {
  font-size: 12px;
  color: var(--text-muted);
  padding-left: 10px;
  position: relative;
  line-height: 1.4;
}

.timeline-items li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-light);
}

/* ============================================================
   Trip summary bar
   ============================================================ */
.trip-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.city-summary-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.city-summary-card:hover { box-shadow: var(--shadow-md); }

.city-summary-card[data-city="london"] { border-color: var(--color-london-border); }
.city-summary-card[data-city="paris"]  { border-color: var(--color-paris-border); }
.city-summary-card[data-city="rome"]   { border-color: var(--color-rome-border); }

.city-summary-card .city-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.city-summary-card[data-city="london"] .city-name { color: var(--color-london); }
.city-summary-card[data-city="paris"]  .city-name { color: var(--color-paris); }
.city-summary-card[data-city="rome"]   .city-name { color: var(--color-rome); }

.city-summary-card .city-range  { font-size: 12px; color: var(--text-muted); }
.city-summary-card .city-nights { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* ============================================================
   Day Cards
   ============================================================ */
.days-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.day-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.day-card:hover { box-shadow: var(--shadow-md); }

/* City-specific left border accent */
.day-card[data-city="London"]  { border-left: 4px solid var(--color-london); }
.day-card[data-city="Paris"]   { border-left: 4px solid var(--color-paris); }
.day-card[data-city="Rome"]    { border-left: 4px solid var(--color-rome); }
.day-card[data-city="Travel"]  { border-left: 4px solid var(--color-travel); }

/* Card header (always visible) */
.day-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  flex-wrap: wrap;
}

.day-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.day-card[data-city="London"]  .day-number { background: var(--color-london); }
.day-card[data-city="Paris"]   .day-number { background: var(--color-paris); }
.day-card[data-city="Rome"]    .day-number { background: var(--color-rome); }
.day-card[data-city="Travel"]  .day-number { background: var(--color-travel); }

.day-header-text { flex: 1; min-width: 0; }

.day-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.day-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}


.day-tags {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  white-space: nowrap;
}

.tag-travel    { background: var(--tag-travel-bg);   color: var(--tag-travel); }
.tag-heavy     { background: var(--tag-heavy-bg);    color: var(--tag-heavy); }
.tag-light     { background: var(--tag-light-bg);    color: var(--tag-light); }
.tag-flexible  { background: var(--tag-flexible-bg); color: var(--tag-flexible); }
.tag-iconic    { background: #f0f9ff; color: #0369a1; }
.tag-must-book { background: #fff7ed; color: #c2410c; }
.tag-day-trip  { background: #fdf4ff; color: #7e22ce; }
.tag-art       { background: #fef9c3; color: #713f12; }
.tag-history   { background: #f0fdf4; color: #166534; }
.tag-arrival   { background: #f8fafc; color: #475569; }
.tag-jet-lag   { background: #fef3c7; color: #92400e; }
.tag-walking   { background: #ecfdf5; color: #047857; }
.tag-half-day  { background: #f5f3ff; color: #5b21b6; }
.tag-overnight-flight { background: #eff6ff; color: #1d4ed8; }
.tag-flight    { background: #eff6ff; color: #1d4ed8; }
.tag-train     { background: #f0fdf4; color: #15803d; }
.tag-departure { background: #f9fafb; color: #4b5563; }
.tag-transition { background: #f9fafb; color: #4b5563; }

.chevron {
  flex-shrink: 0;
  color: var(--text-light);
  transition: transform var(--transition);
  margin-left: auto;
}

.day-card.expanded .chevron { transform: rotate(180deg); }

/* Card body (collapsible) */
.day-body {
  display: none;
  border-top: 1px solid var(--border);
}

.day-card.expanded .day-body { display: block; }

/* ============================================================
   Folder Tabs
   ============================================================ */
.tab-bar {
  display: flex;
  gap: 0;
  padding: 0 16px;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  bottom: -2px;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-muted);
  background: rgba(255,255,255,0.6);
}

.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  border-bottom-color: var(--surface);
}

/* City-colored active tab accent */
.day-card[data-city="London"]  .tab-btn.active { border-top: 3px solid var(--color-london); }
.day-card[data-city="Paris"]   .tab-btn.active { border-top: 3px solid var(--color-paris); }
.day-card[data-city="Rome"]    .tab-btn.active { border-top: 3px solid var(--color-rome); }
.day-card[data-city="Travel"]  .tab-btn.active { border-top: 3px solid var(--color-travel); }

.tab-panels { padding: 20px; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tab-empty {
  color: var(--text-light);
  font-size: 13px;
  font-style: italic;
  padding: 12px 0;
}

/* ============================================================
   Overview meta card — all day-level info in one grouped block
   ============================================================ */
.overview-meta-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.meta-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}

.meta-row:last-child { border-bottom: none; }

.meta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  padding-top: 1px;
  white-space: nowrap;
}

.meta-row--heat     { background: #fff7ed; color: #9a3412; }
.meta-row--heat .meta-label { color: #c2410c; }

.meta-row--booking  { background: #fafbfc; color: var(--text-muted); }
.meta-row--booking.difficulty-high   { background: #fff1f2; color: #9f1239; }
.meta-row--booking.difficulty-medium { background: #fffbeb; color: #78350f; }
.meta-row--booking.difficulty-low    { background: #f0fdf4; color: #14532d; }

.meta-row--backup   { background: #fafbfc; color: var(--text-muted); }
.meta-row--strategy { background: #fffbeb; color: #78350f; }
.meta-row--strategy .meta-label { color: #92400e; }

.meta-row--plan     { background: #eff6ff; color: #1e40af; }
.meta-row--plan .meta-label { color: #1d4ed8; }

.plan-choices {
  list-style: none;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.plan-choices li {
  font-size: 12px;
  padding-left: 14px;
  position: relative;
  line-height: 1.4;
}

.plan-choices li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #3b82f6;
}


/* ============================================================
   Schedule timeline (Overview tab)
   ============================================================ */
.schedule-timeline {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 4px;
}

.schedule-slot {
  flex: 1;
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  min-width: 0;
}

.schedule-slot:last-child { border-right: none; }

.schedule-slot-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  margin-bottom: 6px;
  white-space: nowrap;
}

.schedule-slot-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.schedule-slot-items li {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   Options comparison grid
   ============================================================ */
.options-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  margin-bottom: 4px;
}

.option-card {
  flex: 0 0 auto;
  width: 240px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--surface);
}

.option-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-md);
}



.opt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.opt-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.opt-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.opt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.opt-duration, .opt-cost, .opt-kid { white-space: nowrap; }

.opt-booking-req {
  font-size: 11px;
  font-weight: 600;
  color: #c2410c;
  background: #fff7ed;
  padding: 2px 7px;
  border-radius: 100px;
}

.opt-booking-free {
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 7px;
  border-radius: 100px;
}

.opt-notes {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.opt-pros-cons {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}

.opt-pros-cons .pro { color: #15803d; }
.opt-pros-cons .con { color: #b45309; }

/* Considerations */
.considerations {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.considerations-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 4px;
}

.considerations ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.considerations li {
  font-size: 12px;
  color: #4338ca;
  padding-left: 12px;
  position: relative;
  line-height: 1.4;
}

.considerations li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #6366f1;
  font-size: 11px;
}


/* ============================================================
   Section headers
   ============================================================ */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-top: 20px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* Notes block */
.notes-block {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  border: 1px solid var(--border);
}

/* Links */
.links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.booking-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
}

.booking-link:hover {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.booking-link svg { opacity: 0.5; transition: opacity var(--transition); }
.booking-link:hover svg { opacity: 1; }

/* ============================================================
   Stars
   ============================================================ */

/* ============================================================
   Hidden / filtered
   ============================================================ */
.day-card.hidden { display: none; }

/* ============================================================
   Controls bar
   ============================================================ */
.controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.controls-left { font-size: 13px; color: var(--text-muted); }
.controls-right { display: flex; gap: 8px; }

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-sm:hover { background: var(--bg); color: var(--text); border-color: #cbd5e1; }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .schedule-timeline {
    flex-direction: column;
  }
  .schedule-slot {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .schedule-slot:last-child { border-bottom: none; }

  .timeline-grid { flex-wrap: nowrap; }

  .options-grid { flex-wrap: nowrap; }
  .option-card { width: 210px; }
}

@media (max-width: 640px) {
  .trip-summary { grid-template-columns: 1fr; }
  .day-tags { display: none; }
  .header-meta { display: none; }
  .header-inner { gap: 12px; }
  .day-header { padding: 14px 16px; }
  .day-body { padding: 0 16px 16px; }
}

@media (max-width: 480px) {
  main { padding: 16px 12px 60px; }
  .day-badges { gap: 4px; }
  .energy-badge { font-size: 10px; padding: 2px 6px; }
}
