/* trip.css — the Trip section (tr-* classes). Uses the tokens from hub.css / station.css. */

.tile.trip { background: linear-gradient(160deg, #fff 60%, #fff1e6); border-color: #ffd3b0; }

.tr-title { font-family: "Fraunces", serif; font-size: 26px; font-weight: 700; color: var(--green-900); margin: 4px 0 12px; }
.tr-triplist { display: grid; gap: 12px; }
.tr-tripcard { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 2px solid var(--tile-ring, #cfe9d6); }
.tr-trip-emoji { font-size: 40px; line-height: 1; }

/* Tabs: seven of them, so the bar scrolls sideways on a phone. */
.tr-tabs { display: flex; gap: 4px; background: var(--green-100); border-radius: 18px; padding: 4px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tr-tabs::-webkit-scrollbar { display: none; }
.tr-tab { flex: 1 0 auto; min-width: 64px; min-height: 52px; padding: 0 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 14px; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--green-900); cursor: pointer; }
.tr-tab-ic { font-size: 18px; line-height: 1; }
.tr-tab.tr-on { background: var(--card); box-shadow: 0 1px 4px rgba(20, 119, 60, .25); }
.tr-tab:focus-visible, .tr-row:focus-visible, .tr-check:focus-visible { outline: 3px solid var(--green-900); outline-offset: 2px; }

.tr-body > div > * + * { margin-top: 12px; }
.tr-body .btn.big { width: 100%; }
.tr-chips { flex-wrap: wrap; gap: 8px; }
.tr-chips .chip { min-height: 40px; cursor: pointer; font: inherit; font-weight: 700; }
.tr-legend { margin-top: 8px; }

/* Plan */
.tr-day { display: grid; gap: 8px; }
.tr-day-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tr-day-date { font-weight: 800; color: var(--green-900); }
.tr-city { background: var(--green-100); color: var(--green-900); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
.tr-today { border: 2px solid var(--gold); }
.tr-plan p { margin: 0 0 6px; line-height: 1.5; }
.tr-stops { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-stop { background: var(--cream); border-radius: 10px; padding: 4px 8px; font-size: 13px; }

/* Rows (check-ins, expenses) */
.tr-list { padding: 4px 8px; }
.tr-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--green-100); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.tr-row:last-child, .tr-todo:last-child { border-bottom: 0; }
.tr-row-main { flex: 1; min-width: 0; }
.tr-row-title { font-weight: 800; overflow-wrap: anywhere; }
.tr-row-note { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-thumb { width: 52px; height: 52px; flex: none; border-radius: 12px; object-fit: cover; background: var(--green-100); }
.tr-thumb-none { display: flex; align-items: center; justify-content: center; font-size: 22px; }
.tr-amt { font-family: "Fraunces", serif; font-weight: 700; white-space: nowrap; }
.tr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tr-actions .btn-sm { min-height: 44px; }

/* Photos */
.tr-photo-box { margin: 10px 0; }
.tr-photo { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: 14px; background: #000; }
.tr-photo-loading { filter: blur(6px); }
.tr-photo-pick { min-height: 52px; display: flex; align-items: center; }
.tr-strip { display: flex; gap: 6px; overflow-x: auto; }
.tr-strip .tr-thumb { cursor: pointer; }

/* Map */
.tr-map { height: 56vh; min-height: 320px; border-radius: var(--radius); overflow: hidden; background: var(--green-100); z-index: 0; position: relative; }
.tr-pickmap { height: 240px; border-radius: var(--radius-sm); overflow: hidden; margin-top: 8px; position: relative; z-index: 0; }
.tr-pickmap[hidden] { display: none; }
.tr-pin { display: flex !important; align-items: center; justify-content: center; border-radius: 50%; background: var(--coral, #e4572e); color: #fff; font-weight: 800; font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.tr-pin-stop { border-radius: 50%; background: #fff; border: 3px solid var(--green-700); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.tr-pop { display: grid; gap: 4px; min-width: 150px; color: var(--ink); font-family: "Nunito", sans-serif; }

/* Money */
.tr-break + .tr-break { margin-top: 14px; }
.tr-bar-row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; }
.tr-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-bar { height: 10px; background: var(--green-100); border-radius: 999px; overflow: hidden; }
.tr-bar-fill { height: 100%; background: var(--green-700); border-radius: 999px; }
.tr-bar-amt { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Wallet */
.tr-wallet { display: grid; gap: 6px; }
.tr-zh { font-size: 20px; font-weight: 700; }
.tr-wline { line-height: 1.45; overflow-wrap: anywhere; }
.tr-wallet .btn-sm { justify-self: start; min-height: 44px; }
.tr-driver { position: fixed; inset: 0; z-index: 90; background: #fff; color: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.tr-driver-zh { font-size: clamp(30px, 9vw, 56px); font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; white-space: pre-line; }
.tr-driver-en { color: #555; font-size: 18px; }

/* Notes */
.tr-note-list { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.45; overflow-wrap: anywhere; }

/* List */
.tr-todo { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 4px; border-bottom: 1px solid var(--green-100); }
.tr-check { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 2px solid var(--green-700); background: #fff; color: #fff; font-size: 22px; font-weight: 800; cursor: pointer; }
.tr-done .tr-check { background: var(--green-700); }
.tr-done .tr-todo-text { text-decoration: line-through; color: var(--muted); }
.tr-todo-text { overflow-wrap: anywhere; }
.tr-todo .btn-sm { min-width: 44px; min-height: 44px; }

/* Diary */
.tr-entry { display: grid; gap: 2px; }
.tr-stars { color: var(--gold-d, #c98a00); font-size: 18px; letter-spacing: 2px; }

/* Sheet (forms and details) */
.tr-sheet-bd { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; }
.tr-sheet { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--card); color: var(--ink); border-radius: 20px 20px 0 0; padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px)); animation: tr-up .18s ease-out; }
.tr-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tr-sheet-head .btn-sm { min-height: 44px; }
@keyframes tr-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tr-sheet { animation: none; } }
.tr-form { display: grid; gap: 10px; }
.tr-form .btn.big { width: 100%; }
.tr-field { display: grid; gap: 4px; }
.tr-field input, .tr-textarea { width: 100%; box-sizing: border-box; }
.tr-textarea { font: inherit; padding: 10px 12px; border-radius: var(--radius-sm); border: 2px solid var(--green-100); background: #fff; color: var(--ink); resize: vertical; }
.tr-loc { background: var(--cream); border-radius: var(--radius-sm); padding: 10px; }
