/* Parks Path trip planner v2. Scoped under .trp-* */
.trp-panel { font: 14px var(--font, system-ui, sans-serif); color: var(--ink, #1e2a2f); background: var(--paper, #fbf5ea); overflow-y: auto; padding: 12px; box-sizing: border-box; }
.trp-head { position: sticky; top: -12px; background: var(--paper, #fbf5ea); padding: 4px 0 8px; z-index: 2; border-bottom: 1px solid var(--line, #e2d6c1); }
.trp-title { font: 600 1.15rem var(--display, Georgia, serif); width: 100%; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 8px; color: #1e2a2f; }
.trp-title:hover, .trp-title:focus { border-color: var(--line, #e2d6c1); background: #fff; }
.trp-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-top: 6px; }
.trp-row label, .trp-editor label { display: flex; flex-direction: column; font-size: 0.72rem; color: var(--ink-soft, #48565c); gap: 2px; }
.trp-row input, .trp-row select, .trp-editor input, .trp-editor select, .trp-editor textarea { font: inherit; font-size: 0.85rem; padding: 4px 6px; border: 1px solid var(--line, #e2d6c1); border-radius: 6px; background: #fff; color: var(--ink, #1e2a2f); }
.trp-tools button, .trp-versions button { font: inherit; font-size: 0.8rem; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line, #e2d6c1); background: #fff; cursor: pointer; }
.trp-tools button:disabled { opacity: 0.45; cursor: default; }
.trp-status { margin-left: auto; font-size: 0.75rem; color: var(--ink-soft, #48565c); }
.trp-status-conflict, .trp-status-error { color: #c62828; font-weight: 600; }
.trp-error { margin-top: 6px; background: #fde4e4; color: #8e1c1c; padding: 6px 8px; border-radius: 8px; font-size: 0.8rem; }
.trp-day { margin: 12px 0; padding: 8px; border-radius: 12px; background: #fff; border: 1px solid var(--line, #e2d6c1); }
.trp-day.drop-into { outline: 2px dashed var(--accent, #e8691e); }
.trp-unassigned { background: #f1e7d6; border-style: dashed; }
.trp-day h3 { margin: 0 0 6px; font: 600 0.9rem var(--font, system-ui); color: #1e2a2f; display: flex; justify-content: space-between; gap: 8px; }
.trp-day h3 small { font-weight: 400; color: var(--ink-soft, #48565c); }
.trp-stops { list-style: none; margin: 0; padding: 0; min-height: 4px; }
.trp-stop { display: grid; grid-template-columns: 14px 22px 1fr auto auto auto; align-items: center; gap: 6px; padding: 6px 4px; border-radius: 8px; border-top: 2px solid transparent; border-bottom: 2px solid transparent; cursor: grab; }
.trp-stop:hover { background: #fbf5ea; }
.trp-stop:focus { outline: 2px solid var(--accent, #e8691e); outline-offset: 1px; }
.trp-stop.is-selected { background: #ffe9d6; }
.trp-stop.is-dragging { opacity: 0.4; }
.trp-stop.drop-before { border-top-color: var(--accent, #e8691e); }
.trp-stop.drop-after { border-bottom-color: var(--accent, #e8691e); }
.trp-stop.is-waypoint .trp-name strong { font-weight: 400; font-style: italic; }
.trp-handle { color: #a59c8e; font-size: 0.8rem; letter-spacing: -2px; }
.trp-num { width: 22px; height: 22px; border-radius: 50%; background: #1e2a2f; color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; }
.trp-stop.is-visited .trp-num { background: var(--park-visited, #5c8f66); }
.trp-name { display: flex; flex-direction: column; min-width: 0; }
.trp-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
.trp-name small { color: var(--ink-soft, #48565c); font-size: 0.72rem; }
.trp-pill { font: inherit; font-size: 0.68rem; border: 0; border-radius: 999px; padding: 2px 8px; background: #ffe9d6; color: #0e4a5c; cursor: pointer; }
.trp-pill.visited { background: #e3f3e6; color: #1f6b2e; }
.trp-icon { border: 0; background: transparent; cursor: pointer; font-size: 0.85rem; color: var(--ink-soft, #48565c); padding: 2px 4px; border-radius: 6px; }
.trp-icon:hover { background: #f1e7d6; }
.trp-editor { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; padding: 8px; background: #fbf5ea; border-radius: 8px; margin-top: 4px; cursor: default; }
.trp-editor .trp-wide { grid-column: 1 / -1; }
.trp-editor .trp-check { flex-direction: row; align-items: center; gap: 6px; }
.trp-empty { color: #a59c8e; font-size: 0.75rem; margin: 2px 0; }
.trp-daynote { color: #6b6257; font-size: 0.75rem; margin: 2px 0 4px; line-height: 1.35; }
.trp-flexible { background: #faf7f1; }
.trp-flexible .trp-empty { font-style: italic; }
.trp-warn { margin: 4px 0; padding: 4px 8px 4px 22px; background: #fbf5ea; color: #0e4a5c; border-radius: 8px; font-size: 0.75rem; }
.trp-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.trp-history { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%); background: #fff; box-shadow: var(--shadow, 0 12px 36px rgba(74,23,48,.22)); overflow-y: auto; padding: 12px; z-index: 20; box-sizing: border-box; }
.trp-history header { display: flex; justify-content: space-between; align-items: center; }
.trp-history h3 { margin: 0; font: 600 1rem var(--display, Georgia, serif); }
.trp-versions { list-style: none; padding: 0; margin: 8px 0; }
.trp-versions li { padding: 8px; border-bottom: 1px solid var(--line, #e2d6c1); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trp-versions li > div { flex: 1 1 100%; display: flex; flex-direction: column; }
.trp-versions li small { color: var(--ink-soft, #48565c); font-size: 0.72rem; }
.trp-versions li.is-current { background: #fbf5ea; }
.trp-versions .trp-primary { background: var(--accent, #e8691e); color: #1E2A2F; border-color: var(--accent, #e8691e); }
.trp-preview { flex: 1 1 100%; margin: 4px 0 0; font-size: 0.75rem; color: #1e2a2f; }
.trp-leg.is-stale { opacity: 0.5; }
.trp-leg.is-noroute { stroke: #c62828; }
.trp-marker { cursor: pointer; }
/* Inside the main app (index.html trips panel) */
.trp-host .trp-panel { overflow: visible; padding: 0; background: transparent; }
.trp-host .trp-head { top: 0; background: var(--paper, #fbf5ea); }
.trp-loading { padding: 8px 0; }
.trp-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9998; background: #1e2a2f; color: #fff; padding: 10px 14px; border-radius: 10px; font: 14px var(--font, system-ui, sans-serif); box-shadow: 0 6px 20px rgba(0,0,0,.35); max-width: 92vw; }
.trp-toast[data-kind="error"] { background: #8e1c1c; }
.trp-toast[hidden] { display: none; }
.trp-history-layer { position: fixed; inset: 0; z-index: 9000; background: rgba(42, 12, 28, 0.35); }
.trp-history-layer .trp-history { position: absolute; top: 0; right: 0; bottom: 0; }

.trp-head-compact .trp-title { font-size: 1.15rem; }
.trp-dates label { min-width: 0; flex: 1 1 110px; }
.trp-dates input[type="date"] { min-height: 36px; width: 100%; box-sizing: border-box; }
.trp-tools { margin-top: 4px; }
.trp-head-compact .trp-tools { margin-top: 4px; }
.trp-dates-hint { margin: 8px 0 4px; padding: 8px 10px; background: #fbf5ea; color: #0e4a5c; border-radius: 8px; font-size: 0.8rem; }
.trp-day-pick { font: inherit; font-size: 0.72rem; padding: 3px 6px; margin-top: 3px; border: 1px solid var(--line, #e2d6c1); border-radius: 6px; background: #fff; color: var(--ink, #1e2a2f); max-width: 100%; }
.trip-v2-chrome { margin: 8px 0 4px; padding: 8px 0; border-bottom: 1px solid var(--line, #e2d6c1); }
.trip-v2-chrome .add-stop-row { margin-bottom: 8px; }
@media (max-width: 840px) {
  .trp-dates input[type="date"],
  .trp-dates select,
  .trp-tools button,
  .trp-day-pick { min-height: 44px; }
}

/* Stop photos (public/trips/stop-photos.js) */
.trp-stop { grid-template-columns: 14px 22px 1fr auto auto auto auto; }
.trp-name-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sph-row-thumb { position: relative; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 1px solid #dce7ea; border-radius: 6px; overflow: hidden; background: #f1e7d6; cursor: pointer; }
.sph-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sph-count { position: absolute; right: 1px; bottom: 1px; background: #0e4a5c; color: #fbf5ea; font: 600 0.62rem/1 Jost, system-ui, sans-serif; padding: 2px 4px; border-radius: 4px; }
.trp-icon.sph-cam { font-size: 0.95rem; }
.sph-gallery { display: flex; flex-direction: column; gap: 6px; }
.sph-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sph-title { font-size: 0.72rem; color: var(--ink-soft, #48565c); }
.sph-add { font: 600 0.8rem Jost, system-ui, sans-serif; color: #fbf5ea; background: #0e4a5c; border: 0; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.sph-add[disabled] { opacity: 0.6; cursor: default; }
.sph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sph-fig { margin: 0; background: #fff; border: 1px solid #e2d6c1; border-radius: 8px; overflow: hidden; }
.sph-big { display: block; width: 100%; padding: 0; border: 0; background: #f1e7d6; cursor: zoom-in; }
.sph-big img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sph-fig figcaption { display: flex; justify-content: space-between; padding: 4px 6px; }
.sph-act { border: 0; background: transparent; color: #0e4a5c; font: 600 0.75rem Jost, system-ui, sans-serif; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.sph-act:hover { background: #f1e7d6; }
.sph-del { color: #9b2c1c; }
.sph-empty, .sph-msg { margin: 0; font-size: 0.75rem; color: var(--ink-soft, #48565c); }
.sph-msg:empty { display: none; }
.sph-msg { color: #9b2c1c; }
.sph-lb { position: fixed; inset: 0; z-index: 10000; background: rgba(14, 30, 36, 0.88); display: flex; align-items: center; justify-content: center; }
.sph-lb-img { max-width: 94vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.sph-lb button { position: absolute; border: 0; background: rgba(251, 245, 234, 0.92); color: #0e4a5c; font: 600 1.4rem/1 Jost, system-ui, sans-serif; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.sph-lb-x { top: 16px; right: 16px; }
.sph-lb-prev { left: 16px; top: 50%; }
.sph-lb-next { right: 16px; top: 50%; }
.stop-photo-guest { margin-top: 6px; font: 600 0.78rem Jost, system-ui, sans-serif; color: #0e4a5c; background: #fbf5ea; border: 1px dashed #0e4a5c; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.tooltip .tt-photo { display: block; width: 140px; height: 96px; object-fit: cover; border-radius: 6px; margin: 0 auto 4px; }
