.trip-context-card { margin-top: 12px; padding: 12px; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; }
.trip-context-card h4 { margin: 0 0 6px; color: #1e40af; font-size: 14px; }
.trip-context-card p { margin: 4px 0 10px; font-size: 12px; color: #334155; }
.trip-overlay { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 18px; background: rgba(15,23,42,.55); }
.trip-dialog { box-sizing: border-box; width: min(760px, 100%); max-height: min(820px, calc(100vh - 36px)); overflow-y: auto; overflow-x: hidden; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.35); padding: 18px; color: #0f172a; }
.trip-head, .trip-row, .trip-actions, .trip-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.trip-head { justify-content: space-between; border-bottom: 1px solid #e2e8f0; padding-bottom: 12px; }
.trip-head h2 { margin: 0; font-size: 20px; }
.trip-dest-summary { margin-top: 12px; padding: 8px 12px; background: #f1f5f9; border-radius: 8px; font-size: 13px; color: #334155; }
.trip-badge-info { display: inline-block; padding: 2px 7px; border-radius: 6px; background: #e0f2fe; color: #0369a1; font-weight: 700; font-size: 11px; margin-right: 4px; }
.trip-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #dbeafe; color: #1e40af; font-weight: 700; font-size: 11px; margin-bottom: 4px; }
.trip-dest-section { margin-top: 14px; padding: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; }
.trip-select, .trip-search-input { box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 14px; background: #fff; color: #0f172a; }
.trip-search-input { flex: 1 1 180px; }
.trip-section { margin-top: 18px; }
.trip-section h3 { margin: 0 0 8px; font-size: 16px; }
.trip-card, .trip-entry { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; margin: 8px 0; }
.trip-entry { background: #f8fafc; }
.trip-grow { flex: 1 1 180px; min-width: 0; }
.trip-card strong, .trip-entry strong { display: block; overflow-wrap: anywhere; }
.trip-card-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.trip-link-btn { display: inline-flex; align-items: center; min-height: 32px !important; padding: 4px 8px !important; font-size: 12px !important; border: 1px solid #cbd5e1; border-radius: 6px; background: #f8fafc; color: #1e293b !important; text-decoration: none; cursor: pointer; }
.trip-link-btn:hover { background: #e2e8f0; }
.trip-dialog button, .trip-context-card button { min-height: 44px; border: 1px solid #cbd5e1; border-radius: 9px; padding: 7px 10px; background: #fff; color: #1e293b; font: inherit; font-weight: 700; cursor: pointer; }
.trip-dialog button:hover:not(:disabled), .trip-context-card button:hover:not(:disabled) { background: #eff6ff; }
.trip-dialog button:disabled { opacity: .48; cursor: not-allowed; }
.trip-primary { background: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }
.trip-secondary { background: #f8fafc !important; border-color: #cbd5e1 !important; color: #1e293b !important; }
.trip-danger { color: #b91c1c !important; }
.trip-muted { font-size: 12px; color: #64748b; }
.trip-status { min-height: 22px; font-size: 13px; }
.trip-status.error { color: #b91c1c; }
.trip-status.ok { color: #047857; }
.trip-dialog textarea { box-sizing: border-box; width: 100%; min-height: 78px; padding: 9px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; }
.trip-note { min-height: 76px; resize: vertical; }
.trip-dialog a { color: #1d4ed8; }
.trip-attractions { display: grid; gap: 7px; margin-top: 10px; }
.trip-attraction { display: flex; gap: 8px; justify-content: space-between; align-items: center; border-top: 1px solid #e2e8f0; padding-top: 7px; }
.trip-attraction span { min-width: 0; overflow-wrap: anywhere; }
.trip-route-links a { display: inline-block; margin: 4px 8px 0 0; }
.trip-error { border-color: #fecaca; background: #fff1f2; }
.trip-ics-card { margin-top: 10px; padding: 12px; border: 1px solid #bfdbfe; border-radius: 12px; background: #f0f7ff; }
.trip-date-input { box-sizing: border-box; min-height: 44px; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 14px; background: #fff; color: #0f172a; flex: 1 1 140px; }
.trip-timeline { position: relative; margin: 8px 0; }
.trip-leg-transition { margin: 10px 0 10px 14px; padding: 10px 12px; background: #f0fdf4; border: 1px dashed #86efac; border-left: 3px solid #16a34a; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.trip-leg-flow { display: flex; flex-direction: column; gap: 3px; flex: 1 1 200px; min-width: 0; }
.trip-leg-badge { display: inline-block; width: fit-content; padding: 2px 7px; border-radius: 4px; background: #dcfce7; color: #15803d; font-size: 11px; font-weight: 700; }
.trip-leg-places { font-size: 13px; color: #0f172a; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.trip-leg-places strong { overflow-wrap: anywhere; }
.trip-leg-arrow { color: #16a34a; font-weight: 700; }
.trip-leg-attractions { font-size: 12px; color: #475569; overflow-wrap: anywhere; }
.trip-leg-action { display: flex; align-items: center; flex: 0 0 auto; }
.trip-leg-link { display: inline-flex; align-items: center; min-height: 34px !important; padding: 4px 10px !important; font-size: 12px !important; font-weight: 700 !important; color: #15803d !important; background: #fff !important; border: 1px solid #86efac !important; border-radius: 6px !important; text-decoration: none !important; cursor: pointer; }
.trip-leg-link:hover { background: #dcfce7 !important; border-color: #4ade80 !important; }
.trip-leg-notice { font-size: 11px; color: #64748b; }
@media (max-width: 640px) {
  .trip-overlay { padding: 0; align-items: stretch; }
  .trip-dialog { width: 100%; max-height: none; border-radius: 0; padding: 14px; }
  .trip-head { position: sticky; top: 0; background: #fff; z-index: 1; padding-top: 14px; }
  .trip-row > button { flex: 1 1 44px; }
  .trip-context-card button { width: 100%; }
  .trip-leg-transition { margin-left: 0; flex-direction: column; align-items: stretch; }
  .trip-leg-action { width: 100%; margin-top: 4px; }
  .trip-leg-link { width: 100%; justify-content: center; min-height: 40px !important; box-sizing: border-box; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .trip-overlay, .trip-dialog { scroll-behavior: auto; }
}
