/* Route 66 Copilot v2, part 3: rich cards (stops + map, trip plan, weather, follow-ups, Near me) and print. */
.rich { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--hair); }
.msg-ai-head + .rich { margin-top: 0; padding-top: 0; border-top: 0; }
.rich-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rust-ink); }

/* ---------- Stops ---------- */
.stop-map { height: 220px; border-radius: 16px; overflow: hidden; border: 1px solid var(--hair); margin-bottom: 12px; background: var(--sand); z-index: 0; position: relative; }
.stop-map .leaflet-control-attribution { font-size: 14px; line-height: 1.4; padding: 2px 6px; color: var(--ink); background: rgba(255,253,248,.92); }
.stop-map .leaflet-control-attribution a { color: var(--rust-ink); }
.stop-map .leaflet-control-zoom a { width: 48px; height: 48px; line-height: 48px; font-size: 22px; color: var(--ink); }
.stop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stop { border: 1px solid var(--hair); border-radius: 18px; padding: 14px; background: var(--cream); box-shadow: var(--inner-hl); }
.stop-top { display: flex; gap: 12px; align-items: flex-start; }
.stop-ico { width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--paper); color: var(--rust-ink); border: 1px solid var(--hair); }
.stop-body { min-width: 0; flex: 1; }
.stop-name { margin: 0; font-family: var(--head); font-weight: 800; font-size: 1.4rem; line-height: 1.05; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.stop-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 0.9rem; color: var(--ink-2); font-weight: 600; }
.stop-page { display: inline-flex; align-items: center; gap: 6px; color: var(--rust-ink); }
.stop-desc { margin: 8px 0 0; font-size: 1rem; }
.nav-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.btn-nav { width: 100%; background: var(--paper); }

/* ---------- Trip plan ---------- */
.plan-hero { padding: 16px; border-radius: 18px; background: var(--ink); color: var(--paper); margin-bottom: 14px; position: relative; overflow: hidden; }
.plan-hero::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 10px; height: 2px; background: repeating-linear-gradient(90deg, var(--yellow) 0 18px, transparent 18px 34px); opacity: .8; }
.plan-route { margin: 0 0 10px; font-family: var(--head); font-weight: 800; font-size: 1.8rem; line-height: 1.02; letter-spacing: -0.01em; }
.plan-totals { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 1rem; padding-bottom: 12px; }
.plan-totals strong { font-weight: 700; }
.plan-days { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan-day { display: flex; gap: 14px; padding: 14px; border-radius: 18px; background: var(--cream); border: 1px solid var(--hair); }
.plan-day-num { flex-shrink: 0; width: 60px; text-align: center; border-right: 1px dashed var(--line); padding-right: 12px; }
.plan-day-num span { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.plan-day-num strong { display: block; font-family: var(--head); font-size: 2.2rem; line-height: 1; color: var(--rust-ink); }
.plan-day-body { min-width: 0; flex: 1; }
.plan-day-title { margin: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.plan-day-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; color: var(--ink-2); font-size: 0.95rem; font-weight: 600; }
.plan-day-meta span { display: inline-flex; align-items: center; gap: 6px; }
.plan-stops { margin: 10px 0 0; padding-left: 20px; }
.plan-stops li { margin-bottom: 4px; }
.plan-stops li::marker { color: var(--rust-ink); }
.plan-stop-page { margin-left: 8px; font-size: 0.9rem; color: var(--ink-2); white-space: nowrap; }
.plan-open { margin-top: 12px; width: 100%; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.saved-note { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-weight: 700; color: var(--ink); }

/* ---------- Weather: wraps, never hides a scroll ---------- */
.wx-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.wx { padding: 12px; border-radius: 16px; background: var(--cream); border: 1px solid var(--hair); }
.wx-day { font-size: 0.9rem; font-weight: 700; color: var(--ink-2); }
.wx-temp { margin-top: 2px; font-size: 1rem; color: var(--ink-2); }
.wx-temp strong { font-family: var(--head); font-size: 1.9rem; line-height: 1; color: var(--ink); }
.wx-sum { font-size: 0.95rem; line-height: 1.35; margin-top: 4px; }
.wx-note { font-size: 0.85rem; color: var(--error-ink); font-weight: 700; margin-top: 4px; }

/* ---------- Follow-up chips ---------- */
.suggest { margin: 12px 4px 0; }
.suggest-label { font-size: 0.8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.suggest-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 48px; padding: 10px 14px 10px 18px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--paper); font-weight: 600; font-size: 1rem; text-align: left; display: inline-flex; align-items: center; gap: 10px;
  box-shadow: var(--inner-hl); transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.chip .ico { color: var(--rust-ink); }
.chip:hover:not(:disabled) { background: var(--sand); }
.chip:active:not(:disabled) { transform: scale(.98); }
.chip:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Near me ---------- */
.nearme { margin-top: 14px; padding: 18px; border-radius: var(--r-shell); background: var(--paper); border: 1px solid var(--hair); box-shadow: var(--inner-hl), var(--shadow-warm); animation: rise .5s var(--ease) both; }
.nearme p { margin: 0 0 10px; }
.nearme-hint { color: var(--ink-2); }
.nearme-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

@media (max-width: 460px) {
  .nav-btns { grid-template-columns: 1fr; }
  .plan-day { flex-direction: column; gap: 8px; }
  .plan-day-num { width: auto; text-align: left; border-right: 0; padding-right: 0; display: flex; align-items: baseline; gap: 8px; }
}

/* ---------- Print: only the plan ---------- */
@media print {
  body::before { display: none; }
  html, body, #root, .app, .main, .scroll { height: auto !important; overflow: visible !important; background: #fff !important; }
  body.printing-plan .app * { visibility: hidden; }
  body.printing-plan [data-print="on"], body.printing-plan [data-print="on"] * { visibility: visible; }
  body.printing-plan [data-print="on"] { position: absolute; left: 0; top: 0; width: 100%; border: 0; margin: 0; padding: 0; }
  body.printing-plan .side, body.printing-plan .topbar, body.printing-plan .composer { display: none !important; }
  [data-print="on"] .no-print { display: none !important; }
  [data-print="on"] .plan-hero { background: #fff; color: #000; border: 2px solid #000; }
  [data-print="on"] .plan-day { break-inside: avoid; background: #fff; }
  [data-print="on"] .btn-nav::after { content: " " attr(href); font-size: 14px; font-weight: 400; word-break: break-all; }
}

/* ---------- Light look (20/11): stop cards with a photo on top (AllTrails style) ---------- */
.stop { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: none; }
.stop-photo { margin: -14px -14px 12px; }
.stop-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--sand); }
.stop-photo figcaption { padding: 6px 14px 0; font-size: 0.8rem; color: var(--ink-2); }
.stop-name { font-weight: 700; letter-spacing: -0.01em; }
.stop-ico { background: var(--sand); border: 0; color: var(--ink); }
.stop-page { color: var(--ink-2); }
.stop-map .leaflet-control-attribution { background: rgba(255, 255, 255, 0.94); }
.stop-map .leaflet-control-attribution a { color: var(--ink); }
.chip { border-color: #CFD0CB; }
.chip .ico { color: var(--ink); }
.rich-head { color: var(--ink-2); }
.plan-day-num strong, .plan-stops li::marker { color: var(--ink); }
