/* Trip planner ([cl_trip_planner], assets/js/planner.js). Uses the theme
   tokens with fallbacks; loaded only on pages that hold the planner. */

.cl-tp {
	--tp-ink: var(--cl-ink, #14343b);
	--tp-teal: var(--cl-teal, #0e7c86);
	--tp-teal-dark: var(--cl-teal-dark, #0a5d65);
	--tp-sand: var(--cl-sand, #f6f1e7);
	--tp-line: var(--cl-line, #e3e8ea);
	--tp-muted: var(--cl-muted, #4a5a60);
	--tp-warn: #8a4b00;
	--tp-radius: var(--cl-radius, 10px);
	margin: 1.5rem 0 2.5rem;
	color: var(--cl-text, #1b2b31);
}
.cl-tp *, .cl-tp *::before, .cl-tp *::after { box-sizing: border-box; }
/* The planner page uses the full container, not the 760 px reading column. */
.cl-page:has(.cl-tp) { max-width: var(--cl-container, 1200px); }
.cl-page:has(.cl-tp) > p { max-width: 760px; }
.cl-tp { line-height: 1.5; font-size: 16px; }
.cl-tp button, .cl-tp select, .cl-tp input, .cl-tp textarea { font: inherit; font-size: 16px; }
.cl-tp__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bars and fields */
.cl-tp__bar {
	display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end;
	padding: 1rem; background: var(--tp-sand); border-radius: var(--tp-radius);
}
.cl-tp__barextra { display: contents; }
.cl-tp__field { display: flex; flex-direction: column; gap: .25rem; font-weight: 700; font-size: .85rem; color: var(--tp-ink); }
.cl-tp__field select, .cl-tp__inline select, .cl-tp__inline input, .cl-tp__notes textarea {
	min-height: 44px; padding: .4rem .6rem; border: 1px solid #b9c4c8; border-radius: 6px; background: #fff; color: inherit;
}
.cl-tp__dest { min-width: 14rem; }
.cl-tp__inline { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--tp-muted); }
.cl-tp__inline > span { white-space: nowrap; }
.cl-tp__inline select, .cl-tp__inline input { min-height: 40px; }
.cl-tp__grow { flex: 1 1 12rem; }
.cl-tp__grow input { width: 100%; }

/* Buttons */
.cl-tp__btn {
	min-height: 40px; padding: .45rem .9rem; border: 1px solid var(--tp-teal); border-radius: 6px;
	background: #fff; color: var(--tp-teal-dark); font-weight: 700; cursor: pointer;
}
.cl-tp__btn:hover:not([disabled]) { background: #e8f4f5; }
.cl-tp__btn--primary { background: var(--tp-teal); color: #fff; }
.cl-tp__btn--primary:hover { background: var(--tp-teal-dark) !important; }
.cl-tp__btn--add { min-height: 36px; padding: .3rem .7rem; font-size: .85rem; }
.cl-tp__btn[disabled] { border-color: var(--tp-line); color: var(--tp-muted); cursor: default; }
.cl-tp__icon {
	width: 40px; height: 40px; border: 1px solid #b9c4c8; border-radius: 6px; background: #fff; color: var(--tp-ink); cursor: pointer; font-size: 1.1rem;
}
.cl-tp__icon[disabled] { opacity: .35; cursor: default; }
.cl-tp__link { min-height: 40px; padding: 0 .25rem; border: 0; background: none; color: var(--tp-teal-dark); text-decoration: underline; cursor: pointer; }
.cl-tp button:focus-visible, .cl-tp select:focus-visible, .cl-tp input:focus-visible, .cl-tp textarea:focus-visible, .cl-tp a:focus-visible, .cl-tp h3:focus-visible {
	outline: 3px solid var(--cl-mango, #e89b2e); outline-offset: 2px;
}

/* Tabs (phones only) */
.cl-tp__tabs { display: none; }
@media (max-width: 899px) {
	.cl-tp__tabs {
		display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: .75rem 0; position: sticky; top: 0; z-index: 5;
		background: #fff; border: 1px solid var(--tp-teal); border-radius: 8px; overflow: hidden;
	}
	.cl-tp__tabs button { min-height: 48px; border: 0; background: #fff; color: var(--tp-teal-dark); font-weight: 700; }
	.cl-tp__tabs button[aria-pressed="true"] { background: var(--tp-teal); color: #fff; }
	.cl-tp__cols[data-view="explore"] .cl-tp__plan, .cl-tp__cols[data-view="plan"] .cl-tp__explore { display: none; }
}

/* Two columns from 900 px */
.cl-tp__cols { margin-top: 1rem; }
@media (min-width: 900px) {
	.cl-tp__cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2rem; align-items: start; }
	.cl-tp__plan { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; padding-right: .25rem; }
}

/* Explore list */
.cl-tp__intro, .cl-tp__loading { margin: 1rem 0; color: var(--tp-muted); }
.cl-tp__listtitle, .cl-tp__ready h3 { margin: 1.25rem 0 .5rem; font-size: 1rem; color: var(--tp-ink); }
.cl-tp__ready { padding: .75rem 1rem; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); }
.cl-tp__ready h3 { margin-top: 0; }
.cl-tp__ready ul { margin: 0; padding: 0; list-style: none; }
.cl-tp__ready li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .3rem 0; }
.cl-tp__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.cl-tp__chips button { min-height: 36px; padding: .25rem .8rem; border: 1px solid #b9c4c8; border-radius: 999px; background: #fff; cursor: pointer; }
.cl-tp__chips button[aria-pressed="true"] { background: var(--tp-ink); border-color: var(--tp-ink); color: #fff; }
.cl-tp__cards { margin: 0; padding: 0; list-style: none; }
.cl-tp__card { display: flex; gap: .85rem; padding: .85rem 0; border-top: 1px solid var(--tp-line); }
.cl-tp__card img, .cl-tp__noimg { flex: 0 0 72px; align-self: flex-start; width: 72px !important; height: 72px !important; max-width: none; object-fit: cover; border-radius: 6px; background: var(--tp-sand); }
.cl-tp__cardbody { min-width: 0; flex: 1; }
.cl-tp__kind { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tp-muted); }
.cl-tp__cardtitle { margin: .1rem 0 .2rem; font-size: 1.05rem; line-height: 1.3; }
.cl-tp__cardtitle a { color: var(--tp-ink); }
.cl-tp__where, .cl-tp__summary { margin: .15rem 0; font-size: .9rem; }
.cl-tp__where { color: var(--tp-teal-dark); }
.cl-tp__details { margin: .35rem 0; font-size: .9rem; }
.cl-tp__details summary { cursor: pointer; color: var(--tp-teal-dark); min-height: 32px; display: inline-flex; align-items: center; }
.cl-tp__details ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.cl-tp__adds { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }

/* Plan and timeline */
.cl-tp__plantitle { margin: 0 0 .5rem; font-size: 1.3rem; color: var(--tp-ink); }
.cl-tp__day { margin: 0 0 1.25rem; padding: 1rem; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); background: #fff; }
.cl-tp__dayhead { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .75rem; }
.cl-tp__dayhead h3 { margin: 0 auto 0 0; font-size: 1.1rem; color: var(--tp-ink); }
.cl-tp__timeline { position: relative; margin: 0; padding: 0 0 0 1.25rem; list-style: none; }
.cl-tp__timeline::before { content: ""; position: absolute; left: .35rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--tp-line); }
.cl-tp__timeline > li { position: relative; padding: .35rem 0 .35rem .5rem; }
.cl-tp__point::before, .cl-tp__stop::before {
	content: ""; position: absolute; left: -1.15rem; top: .75rem; width: 12px; height: 12px; border-radius: 50%; background: var(--tp-teal); border: 2px solid #fff;
}
.cl-tp__point::before { background: var(--tp-ink); }
.cl-tp__stop--own::before { background: var(--cl-mango, #e89b2e); }
.cl-tp__point { display: flex; gap: .75rem; align-items: baseline; }
.cl-tp__point p { margin: 0; color: var(--tp-muted); }
.cl-tp__time { display: inline-block; min-width: 6.5rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--tp-ink); }
.cl-tp__stop { display: flex; flex-wrap: wrap; gap: .25rem .75rem; padding: .6rem 0 .6rem .5rem !important; }
.cl-tp__stopbody { flex: 1 1 16rem; min-width: 0; }
.cl-tp__stoptitle { margin: 0; font-weight: 700; }
.cl-tp__stoptitle a { color: var(--tp-ink); }
.cl-tp__controls { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin-top: .35rem; }
.cl-tp__leg { font-size: .85rem; color: var(--tp-teal-dark); padding-left: 7rem !important; }
.cl-tp__leg--unknown { color: var(--tp-warn); }
.cl-tp__live { white-space: nowrap; font-weight: 700; }
.cl-tp__empty { color: var(--tp-muted); font-style: italic; }
.cl-tp__stop--missing .cl-tp__stoptitle { color: var(--tp-warn); }
.cl-tp__custom { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--tp-line); }
.cl-tp__muted { margin: .25rem 0; font-size: .85rem; color: var(--tp-muted); }
.cl-tp__warn { margin: .5rem 0; padding: .5rem .75rem; border-left: 4px solid var(--cl-mango, #e89b2e); background: #fff7ea; color: var(--tp-warn); font-size: .9rem; }
.cl-tp__undo { margin: 0 0 .75rem; padding: .5rem .75rem; background: var(--tp-sand); border-radius: 6px; }
.cl-tp__notes { display: flex; flex-direction: column; gap: .3rem; margin: 1rem 0; font-weight: 700; font-size: .85rem; }
.cl-tp__notes textarea { width: 100%; font-weight: 400; }
.cl-tp__printbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1rem; padding: 1rem; background: var(--tp-sand); border-radius: var(--tp-radius); }
.cl-tp__btn--print { min-height: 48px; padding: .6rem 1.4rem; font-size: 1rem; }
@media (max-width: 599px) {
	.cl-tp__leg { padding-left: .5rem !important; }
	.cl-tp__time { min-width: 0; display: block; }
	.cl-tp__dest { min-width: 0; width: 100%; }
	.cl-tp__bar > .cl-tp__field { flex: 1 1 100%; }
	.cl-tp__barextra .cl-tp__field { flex: 1 1 40%; }
	.cl-tp__barextra .cl-tp__field select { width: 100%; }
}

/* ---- Friendlier plan (owner 2026-10-06: "more user friendly and mobile optimized") ---- */
.cl-tp__icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.cl-tp__icon--remove { color: #8a2d1f; }
.cl-tp__addday { min-height: 40px; padding: .3rem .5rem; border: 1px solid #b9c4c8; border-radius: 6px; background: #fff; }
.cl-tp__adds { align-items: center; }
.cl-tp__inplan { font-size: .85rem; font-weight: 700; color: var(--tp-teal-dark); }
.cl-tp__daytitle { margin-right: auto; }
.cl-tp__daytitle h3 { margin: 0; }
.cl-tp__daysum { margin: .1rem 0 0; font-size: .85rem; color: var(--tp-muted); }
.cl-tp__daysum.is-over { color: var(--tp-warn); font-weight: 700; }
.cl-tp__daytimes { display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.cl-tp__stop { display: block; padding: .4rem 0 !important; }
.cl-tp__stopcard { padding: .75rem .85rem; border: 1px solid var(--tp-line); border-left: 4px solid var(--tp-teal); border-radius: 8px; background: #fff; }
.cl-tp__stop--own .cl-tp__stopcard { border-left-color: var(--cl-mango, #e89b2e); background: #fffaf2; }
.cl-tp__stop::before { top: 1.2rem; }
.cl-tp__stoptop { display: flex; justify-content: space-between; gap: .5rem; margin: 0 0 .15rem; }
.cl-tp__stoptop .cl-tp__time { min-width: 0; }
.cl-tp__len { font-size: .85rem; color: var(--tp-muted); white-space: nowrap; }
.cl-tp__stoptitle { font-size: 1.05rem; }
.cl-tp__controls { justify-content: space-between; gap: .5rem; }
.cl-tp__stay { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--tp-muted); }
.cl-tp__stay select, .cl-tp__moveday { min-height: 44px; padding: .3rem .5rem; border: 1px solid #b9c4c8; border-radius: 6px; background: #fff; }
.cl-tp__actions { display: inline-flex; align-items: center; gap: .35rem; }
.cl-tp__hint { margin: .35rem 0 0; font-size: .8rem; color: var(--tp-muted); }
.cl-tp__leg { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .15rem 0 .15rem 1rem !important; font-size: .85rem; }
.cl-tp__leg svg { flex: none; }
.cl-tp__live { font-size: .8rem; }
.cl-tp__toast {
	position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50;
	display: flex; align-items: center; gap: .75rem; max-width: calc(100vw - 32px); padding: .7rem .8rem .7rem 1rem;
	background: var(--tp-ink); color: #fff; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
	transform: translate(-50%, 150%); opacity: 0; transition: transform .2s ease, opacity .2s ease; pointer-events: none; font-size: .95rem;
}
.cl-tp__toast.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.cl-tp__toast button { min-height: 40px; padding: .3rem .8rem; border: 0; border-radius: 6px; background: var(--cl-mango, #e89b2e); color: var(--tp-ink); font-weight: 800; white-space: nowrap; }
@media (min-width: 900px) { .cl-tp__toast button { display: none; } }
@media (max-width: 899px) {
	.cl-tp__chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.cl-tp__chips li { flex: none; }
	.cl-tp__summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.cl-tp__day { padding: .85rem .75rem; }
	.cl-tp__timeline { padding-left: 1rem; }
	.cl-tp__point::before, .cl-tp__stop::before { left: -.95rem; }
	.cl-tp__timeline::before { left: .25rem; }
	.cl-tp__printbar { position: sticky; bottom: 0; z-index: 4; margin: 0 -.25rem 1rem; box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
	.cl-tp__btn--print { flex: 1 1 100%; }
	.cl-tp__printbar .cl-tp__muted { display: none; }
}
@media (max-width: 599px) {
	.cl-tp__dayhead { align-items: flex-start; }
	.cl-tp__daytimes { width: 100%; }
	.cl-tp__daytimes .cl-tp__inline { flex: 1 1 40%; }
	.cl-tp__daytimes input { width: 100%; }
	.cl-tp__controls { flex-wrap: wrap; }
	.cl-tp__stay { flex: 1 1 100%; }
	.cl-tp__stay select { flex: 1; }
	.cl-tp__actions { width: 100%; justify-content: flex-end; }
	.cl-tp__custom .cl-tp__grow { flex: 1 1 100%; }
	.cl-tp__custom select { flex: 1; }
	.cl-tp__cardbody .cl-tp__adds .cl-tp__btn--add { min-height: 44px; padding: .4rem 1rem; }
}

/* Print sheet: built by planner.js, hidden on screen, the only thing printed */
.cl-tp-sheet { display: none; }
@media print {
	@page { size: A4; margin: 14mm 12mm; }
	body > *:not(#cl-tp-sheet) { display: none !important; }
	body { background: #fff !important; }
	.cl-tp-sheet { display: block !important; font: 10.5pt/1.4 "Nunito Sans", "Segoe UI", Arial, sans-serif; color: #000; }
	.cl-tp-sheet h1 { margin: 0 0 2mm; font: 700 17pt/1.2 Montserrat, Arial, sans-serif; }
	.cl-tp-sheet header p { margin: 0 0 5mm; font-size: 9pt; color: #333; }
	.cl-tp-sheet .day { break-inside: auto; margin-bottom: 6mm; }
	.cl-tp-sheet h2 { margin: 0 0 2mm; padding-bottom: 1mm; border-bottom: 1.5pt solid #0e7c86; font: 700 12.5pt/1.3 Montserrat, Arial, sans-serif; break-after: avoid; }
	.cl-tp-sheet table { width: 100%; border-collapse: collapse; }
	.cl-tp-sheet td { padding: 1.6mm 2mm 1.6mm 0; vertical-align: top; border-bottom: .5pt solid #ccc; }
	.cl-tp-sheet tr { break-inside: avoid; }
	.cl-tp-sheet td.t { width: 30mm; font-weight: 700; white-space: nowrap; }
	.cl-tp-sheet tr.leg td { font-size: 9pt; color: #333; font-style: italic; }
	.cl-tp-sheet .u { font-size: 8.5pt; color: #333; word-break: break-all; }
	.cl-tp-sheet .w { font-weight: 700; }
	.cl-tp-sheet .notes { break-inside: avoid; }
	.cl-tp-sheet .ln { height: 8mm; border-bottom: .5pt solid #999; }
	.cl-tp-sheet footer { margin-top: 5mm; font-size: 8.5pt; color: #333; }
}
