/**
 * Tripvance 2.0 - Experience Core, front end.
 *
 * What 2.0 adds to a tour or activity page: the route itinerary, the running
 * total, the shared request fields, the Classic / Editorial / Adventure
 * variants and the mobile pass. Loaded after the design's own stylesheet.
 *
 * Fonts are always inherited from the theme: nothing here sets a family.
 * Colours come from the plugin's tokens (tokens.css) with safe fallbacks.
 */

/* ------------------------------------------------------------ mobile pass */

/* What an editor pastes into the long description never pushes the page wider. */
.wptm-tour .wptm-prose img,
.wptm-tour .wptm-prose iframe,
.wptm-tour .wptm-prose video,
.wptm-tour .wptm-prose table,
.wptm-act__prose img,
.wptm-act__prose iframe,
.wptm-act__prose video,
.wptm-act__prose table {
	max-width: 100%;
}

.wptm-tour .wptm-prose img,
.wptm-act__prose img {
	height: auto;
}

.wptm-tour .wptm-prose table,
.wptm-act__prose table {
	display: block;
	overflow-x: auto;
}

.wptm-tour .wptm-block,
.wptm-act__main > * {
	min-width: 0;
	overflow-wrap: anywhere;
}

/* The mobile hero: a <picture> that adds no box of its own. */
.wptm-picture {
	display: contents;
}

/* Form controls never smaller than 16px on phones: iOS would zoom the page. */
@media (max-width: 600px) {
	.wptm-xbook input,
	.wptm-xbook select,
	.wptm-xbook textarea {
		font-size: 16px;
	}
}

/* The sticky bars already clear the home indicator (tour.css, activity.css). */

/* --------------------------------------------------------- route itinerary */

.wptm-xroute {
	--wptm-xr-accent: var(--wptm-accent, #b8653a);
	--wptm-xr-line: var(--wptm-line, rgba(0, 0, 0, 0.14));
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.wptm-xroute__stop {
	position: relative;
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
	margin: 0;
	padding: 0 0 18px;
}

.wptm-xroute__stop::before {
	content: "";
	position: absolute;
	inset-block: 32px 0;
	inset-inline-start: 15px;
	width: 2px;
	background: var(--wptm-xr-line);
}

.wptm-xroute__stop:last-child {
	padding-bottom: 0;
}

.wptm-xroute__stop:last-child::before {
	display: none;
}

.wptm-xroute__dot {
	position: relative;
	z-index: 1;
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid var(--wptm-xr-accent);
	background: var(--wptm-surface, #fff);
	color: var(--wptm-xr-accent);
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1;
}

.wptm-xroute__stop--start .wptm-xroute__dot,
.wptm-xroute__stop--end .wptm-xroute__dot {
	background: var(--wptm-xr-accent);
	color: #fff;
}

.wptm-xroute__body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 4px;
	min-width: 0;
}

.wptm-xroute__place {
	font-weight: 600;
	line-height: 1.35;
}

.wptm-xroute__note {
	opacity: 0.78;
	font-size: 0.9375em;
	line-height: 1.5;
}

/* From tablet up, a short route reads as one line: A → B → C. */
@media (min-width: 768px) {
	.wptm-xroute {
		display: flex;
		flex-wrap: wrap;
		gap: 12px 0;
	}

	.wptm-xroute__stop {
		grid-template-columns: auto;
		justify-items: start;
		gap: 8px;
		padding: 0 34px 0 0;
		flex: 0 1 auto;
		max-width: 220px;
	}

	.wptm-xroute__stop::before {
		inset-block: 15px auto;
		inset-inline: 32px 0;
		width: auto;
		height: 2px;
	}

	.wptm-xroute__stop:last-child {
		padding-inline-end: 0;
	}

	[dir="rtl"] .wptm-xroute__stop {
		padding: 0 0 0 34px;
	}
}

/* ------------------------------------------------------------ total box */

.wptm-xtotal {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 2px 12px;
	margin: 12px 0;
	padding: 12px 14px;
	border: 1px solid var(--wptm-line, rgba(0, 0, 0, 0.12));
	border-radius: var(--wptm-radius, 10px);
	background: var(--wptm-surface-2, rgba(0, 0, 0, 0.03));
}

.wptm-xtotal[aria-busy="true"] .wptm-xtotal__value {
	opacity: 0.55;
}

.wptm-xtotal__label {
	font-weight: 600;
}

.wptm-xtotal__value {
	font-size: 1.125em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.wptm-xtotal__line {
	grid-column: 1 / -1;
	font-size: 0.875em;
	opacity: 0.8;
	font-variant-numeric: tabular-nums;
	overflow-wrap: anywhere;
}

/* ------------------------------------------------------ request fields */

.wptm-xbook {
	margin: 12px 0;
}

.wptm-xbook--fold > summary {
	cursor: pointer;
	padding: 8px 0;
	/* At the size of the form's own text, not the page's: in a booking panel
	   the fold's title was the largest line in the form. */
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.5;
	list-style-position: inside;
}

.wptm-xbook--fold > summary:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 4px;
}

.wptm-xbook__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 12px;
}

.wptm-xbook__field {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	min-width: 0;
}

.wptm-xbook__field--half {
	grid-column: auto;
}

.wptm-xbook__field label {
	font-weight: 600;
	font-size: 0.9375em;
}

.wptm-xbook__field input,
.wptm-xbook__field select,
.wptm-xbook__field textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 44px;
}

:where(.wptm-xbook__field) :where(input, select, textarea) {
	padding: 10px 12px;
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font: inherit;
}

.wptm-act-book .wptm-xbook__field label {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--wptm-navy, inherit);
}

@media (max-width: 380px) {
	.wptm-xbook__field--half {
		grid-column: 1 / -1;
	}
}

/* ----------------------------------------------------------- variants */

/*
 * Classic / Editorial / Adventure: the same markup and the same data, dressed
 * three ways. Classic is the design's own look and adds nothing here. No rule
 * sets a font family: every variant inherits the theme's typography.
 *
 * Activity selectors carry the page class (.wptm-act--editorial/-adventure);
 * tour selectors carry the layout class the tour layout registry prints
 * (.wptm-tour--editorial/-adventure).
 */

/* ======================================================== Editorial === */

.wptm-act--editorial {
	--wptm-xp-ed-line: var(--wptm-line, rgba(0, 0, 0, 0.12));
	--act-section: clamp(44px, 6vw, 84px);
}

/* The banner: paper instead of a coloured band, the photograph leading. */
.wptm-act--editorial .wptm-act__banner {
	background: transparent;
	border-block-end: 1px solid var(--wptm-xp-ed-line);
}

.wptm-act--editorial .wptm-act__kicker {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.wptm-act--editorial .wptm-act__title {
	font-weight: 400;
	letter-spacing: -0.02em;
	line-height: 1.08;
}

.wptm-act--editorial .wptm-act__strip {
	box-shadow: none;
	border: 1px solid var(--wptm-xp-ed-line);
	background: transparent;
}

.wptm-act--editorial .wptm-act__hero-img {
	border-radius: 2px;
}

@media (min-width: 1000px) {
	.wptm-act--editorial .wptm-act__banner--media .wptm-act__bannerinner {
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	}
}

/* Headings: lighter weight and a hairline instead of the short accent bar. */
.wptm-act--editorial .wptm-act__h2,
.wptm-tour--editorial .wptm-block__title {
	font-weight: 400;
	letter-spacing: -0.01em;
}

.wptm-act--editorial .wptm-act__h2::after {
	inline-size: 100%;
	block-size: 1px;
	border-radius: 0;
	background: var(--wptm-xp-ed-line);
}

.wptm-act--editorial .wptm-act__lead {
	font-size: clamp(1.125rem, 1.6vw, 1.3rem);
	line-height: 1.6;
}

/* Long-form reading: a measure, generous leading, a ragged edge. */
.wptm-act--editorial .wptm-act__prose {
	max-width: 68ch;
	font-size: 1.0625rem;
	line-height: 1.8;
}

.wptm-act.wptm-act--editorial .wptm-act__prose p,
.wptm-act.wptm-act--editorial .wptm-act__prose li {
	text-align: start;
	hyphens: manual;
	-webkit-hyphens: manual;
}

/* Lighter cards: hairlines, no fills, no shadows. */
.wptm-act--editorial .wptm-act__quicklist {
	border-color: var(--wptm-xp-ed-line);
	border-radius: 2px;
	background: transparent;
}

.wptm-act--editorial .wptm-act__quickitem {
	background: transparent;
}

.wptm-act--editorial .wptm-act__items--card .wptm-act__item,
.wptm-act--editorial .wptm-act__items--note .wptm-act__item {
	border: 0;
	border-block-start: 1px solid var(--wptm-xp-ed-line);
	border-radius: 0;
	background: transparent;
}

.wptm-act--editorial .wptm-act__list,
.wptm-act--editorial .wptm-act__meetingcard,
.wptm-act--editorial .wptm-act__cancelcard,
.wptm-act--editorial .wptm-act-book {
	box-shadow: none;
	border-color: var(--wptm-xp-ed-line);
	border-radius: 2px;
}

/* Image-led gallery: the first photograph across the column. */
.wptm-act--editorial .wptm-act__shots {
	gap: clamp(8px, 1.4vw, 16px);
}

.wptm-act--editorial .wptm-act__shot {
	border-radius: 2px;
}

@media (min-width: 600px) {
	.wptm-act--editorial .wptm-act__shot:first-child {
		grid-column: 1 / -1;
		aspect-ratio: 16 / 9;
	}
}

/* A quieter call to action. */
.wptm-act--editorial .wptm-act__cta,
.wptm-act--editorial .wptm-act-book .wptm-act-book__submit {
	border-radius: 2px;
	font-size: 0.8125rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.wptm-tour--editorial .wptm-layout__main > .wptm-block + .wptm-block {
	margin-top: clamp(2rem, 5vw, 3.5rem);
}

/* ======================================================== Adventure === */

.wptm-act--adventure,
.wptm-tour--adventure {
	--wptm-xp-adv: var(--wptm-gold, #d98a1f);
	--wptm-xp-adv-dark: var(--wptm-navy, #1b2330);
}

/* The banner: a dark, high-contrast band. */
.wptm-act--adventure .wptm-act__banner {
	background: var(--wptm-xp-adv-dark);
	color: #fff;
}

.wptm-act--adventure .wptm-act__banner .wptm-act__title {
	color: #fff;
	font-weight: 800;
	letter-spacing: -0.015em;
}

.wptm-act--adventure .wptm-act__banner .wptm-act__crumbs,
.wptm-act--adventure .wptm-act__banner .wptm-act__crumbs a {
	color: rgba(255, 255, 255, 0.78);
}

.wptm-act--adventure .wptm-act__kicker,
.wptm-act--adventure .wptm-act__kicker a {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--wptm-xp-adv);
	color: var(--wptm-xp-adv-dark);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}

.wptm-act--adventure .wptm-act__hero-img {
	border-radius: calc(var(--wptm-radius, 10px) + 6px);
}

/* Headings: uppercase, heavy, a thick accent bar. */
.wptm-act--adventure .wptm-act__h2,
.wptm-tour--adventure .wptm-block__title {
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.wptm-act--adventure .wptm-act__h2::after {
	inline-size: 64px;
	block-size: 5px;
	border-radius: 3px;
	background: var(--wptm-xp-adv);
}

.wptm-tour--adventure .wptm-block__title::after {
	content: "";
	display: block;
	width: 64px;
	height: 5px;
	margin-top: 0.4em;
	border-radius: 3px;
	background: var(--wptm-xp-adv);
}

/* Facts first: bold cells with filled icons and big values. */
.wptm-act--adventure .wptm-act__quicklist {
	border: 0;
	gap: 10px;
	background: transparent;
	overflow: visible;
}

.wptm-act--adventure .wptm-act__quickitem {
	border-radius: calc(var(--wptm-radius, 10px) + 2px);
	border-block-start: 4px solid var(--wptm-xp-adv);
	box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.45);
}

.wptm-act--adventure .wptm-act__quickicon {
	display: inline-grid;
	place-items: center;
	inline-size: 40px;
	block-size: 40px;
	border-radius: 50%;
	background: var(--wptm-xp-adv);
	color: var(--wptm-xp-adv-dark);
}

.wptm-act--adventure .wptm-act__quickvalue {
	font-size: 1.0625rem;
	font-weight: 800;
}

/* Highlights as strong cards. */
.wptm-act--adventure .wptm-act__items--card .wptm-act__item {
	border-inline-start: 5px solid var(--wptm-xp-adv);
	font-weight: 700;
}

.wptm-act--adventure .wptm-act__list,
.wptm-act--adventure .wptm-act__meetingcard,
.wptm-act--adventure .wptm-act__cancelcard {
	border-inline-start: 5px solid var(--wptm-xp-adv);
}

/* The itinerary: bigger stops, a thicker line, square markers. */
.wptm-act--adventure .wptm-xroute__dot,
.wptm-tour--adventure .wptm-xroute__dot {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	border-width: 3px;
	font-size: 0.9375rem;
	font-weight: 800;
	border-color: var(--wptm-xp-adv);
	color: var(--wptm-xp-adv-dark);
}

.wptm-act--adventure .wptm-xroute__stop--start .wptm-xroute__dot,
.wptm-act--adventure .wptm-xroute__stop--end .wptm-xroute__dot,
.wptm-tour--adventure .wptm-xroute__stop--start .wptm-xroute__dot,
.wptm-tour--adventure .wptm-xroute__stop--end .wptm-xroute__dot {
	background: var(--wptm-xp-adv);
}

.wptm-act--adventure .wptm-xroute__stop,
.wptm-tour--adventure .wptm-xroute__stop {
	grid-template-columns: 38px minmax(0, 1fr);
}

.wptm-act--adventure .wptm-xroute__stop::before,
.wptm-tour--adventure .wptm-xroute__stop::before {
	inset-block-start: 38px;
	inset-inline-start: 17px;
	width: 4px;
	background: var(--wptm-xp-adv);
	opacity: 0.35;
}

.wptm-act--adventure .wptm-xroute__place,
.wptm-tour--adventure .wptm-xroute__place {
	font-size: 1.0625em;
	font-weight: 800;
}

@media (min-width: 768px) {
	.wptm-act--adventure .wptm-xroute__stop,
	.wptm-tour--adventure .wptm-xroute__stop {
		grid-template-columns: auto;
	}

	.wptm-act--adventure .wptm-xroute__stop::before,
	.wptm-tour--adventure .wptm-xroute__stop::before {
		inset-block-start: 17px;
		inset-inline-start: 38px;
		width: auto;
		height: 4px;
	}
}

/* A strong call to action. */
.wptm-act--adventure .wptm-act__cta,
.wptm-act--adventure .wptm-act-book .wptm-act-book__submit,
.wptm-tour--adventure .wptm-salma__next,
.wptm-tour--adventure .wptm-salma__submit {
	background: var(--wptm-xp-adv);
	color: var(--wptm-xp-adv-dark);
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	box-shadow: 0 10px 22px -12px var(--wptm-xp-adv);
}

.wptm-act--adventure .wptm-act__cta:hover,
.wptm-act--adventure .wptm-act__cta:focus-visible,
.wptm-act--adventure .wptm-act-book .wptm-act-book__submit:hover,
.wptm-act--adventure .wptm-act-book .wptm-act-book__submit:focus-visible,
.wptm-tour--adventure .wptm-salma__next:hover,
.wptm-tour--adventure .wptm-salma__submit:hover {
	background: var(--wptm-xp-adv-dark);
	color: #fff;
}

.wptm-act--adventure .wptm-act-book,
.wptm-tour--adventure .wptm-tk {
	border-block-start: 5px solid var(--wptm-xp-adv);
}

.wptm-act--adventure .wptm-xtotal,
.wptm-tour--adventure .wptm-xtotal {
	border-color: var(--wptm-xp-adv);
	border-width: 2px;
}

.wptm-act--adventure .wptm-xtotal__value,
.wptm-tour--adventure .wptm-xtotal__value {
	font-size: 1.375em;
	font-weight: 800;
}

@media (max-width: 600px) {
	.wptm-act--adventure .wptm-act__quicklist {
		gap: 8px;
	}

	.wptm-act--adventure .wptm-act__quickitem {
		padding: 14px 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wptm-xtotal__value {
		transition: none;
	}
}
