/**
 * Drokpa Travel - look of the [dtf_itinerario] shortcode.
 *
 * Taken from the "viaje-spiti" mock-up (viaje-spiti.css and the base rules of
 * styles.css it relies on), with every class renamed to dtf-it* and the colour
 * variables scoped to the shortcode, so nothing leaks into the theme.
 */
.dtf-it {
	--dtf-ink: #102f32;
	--dtf-green: #102b2e;
	--dtf-cream: #fffcf5;
	--dtf-gold: #b89a61;
	--dtf-gold-dark: #786037;
	--dtf-line: #ded3be;
	--dtf-muted: #5d625a;
	--dtf-serif: Spectral, Georgia, serif;
	--dtf-sans: "DM Sans", system-ui, sans-serif;

	box-sizing: border-box;
	width: 100%;
	padding: 24px clamp(14px, 3vw, 36px) 40px;
	background: var(--dtf-green);
	color: var(--dtf-cream);
	font: 15px/1.55 var(--dtf-sans);
}

.dtf-it--plain {
	padding: 0;
	background: transparent;
}

/* Scoped base rules (the mock-up sets them on the whole page). */
.dtf-it *,
.dtf-it *::before,
.dtf-it *::after {
	box-sizing: border-box;
}

.dtf-it h3,
.dtf-it p {
	margin: 0;
}

.dtf-it h3 {
	color: inherit;
	font-family: var(--dtf-serif);
	font-size: 27px;
	font-weight: 500;
	letter-spacing: -0.04em;
	line-height: 1.12;
}

.dtf-it ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dtf-it a {
	color: inherit;
	text-decoration: none;
}

.dtf-it button,
.dtf-it summary {
	cursor: pointer;
}

.dtf-it button {
	font: inherit;
}

.dtf-it :focus-visible {
	outline: 2px solid #a57a39;
	outline-offset: 4px;
}

/* Layout */
.dtf-it__layout {
	display: grid;
	grid-template-columns: minmax(0, 2.45fr) minmax(216px, 1fr);
	align-items: start;
	gap: clamp(16px, 3vw, 36px);
	max-width: 1160px;
	margin-inline: auto;
}

.dtf-it__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 7px;
	margin-bottom: 12px;
}

.dtf-it__tools h3 {
	font-size: 24px;
}

.dtf-it__text-button {
	padding: 0;
	border: 0;
	background: transparent;
	color: #f0d49c;
	font-size: 13px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Timeline */
.dtf-it__timeline {
	list-style: none;
}

.dtf-it__stage {
	position: relative;
	padding-bottom: 9px;
	padding-left: 22px;
	scroll-margin-top: 12px;
}

.dtf-it__stage:not(:last-child)::before {
	position: absolute;
	top: 27px;
	bottom: -27px;
	left: 4px;
	width: 1px;
	background: #b89a6180;
	content: "";
}

.dtf-it__stage::after {
	position: absolute;
	top: 25px;
	left: 0;
	width: 9px;
	height: 9px;
	background: var(--dtf-green);
	border: 1px solid var(--dtf-gold);
	border-radius: 50%;
	content: "";
}

.dtf-it__stage:has(details[open])::after {
	background: #e5bf79;
}

.dtf-it__stage details {
	background: #17373a;
	border: 1px solid #b89a617a;
	border-radius: 5px;
}

.dtf-it__stage details[open] {
	background: #1a3b3d;
	border-color: #bc9a5b;
}

.dtf-it__stage summary {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) 15px;
	gap: 12px;
	align-items: center;
	min-height: 54px;
	padding: 8px 12px;
	list-style: none;
}

.dtf-it__stage summary::-webkit-details-marker {
	display: none;
}

.dtf-it__stage summary::after {
	justify-self: center;
	width: 8px;
	height: 8px;
	border: solid #e5c589;
	border-width: 0 1.5px 1.5px 0;
	content: "";
	transform: rotate(45deg);
}

.dtf-it__stage details[open] summary::after {
	transform: rotate(225deg);
}

.dtf-it__day {
	padding: 4px 7px;
	background: #e8c683;
	border-radius: 3px;
	color: #102b2e;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

.dtf-it__stage-title {
	font: 500 clamp(20px, 2.3vw, 27px) / 1.18 var(--dtf-serif);
	letter-spacing: -0.025em;
}

.dtf-it__stage-body {
	margin-inline: 12px;
	padding: 11px 0 14px;
	border-top: 1px solid #b89a6150;
	color: #f2e7d4;
	font-size: 14px;
}

.dtf-it__stage-body p + p {
	margin-top: 0.7em;
}

/* Side box: main stops */
.dtf-it__route {
	position: sticky;
	top: 12px;
	padding: 17px;
	background: var(--dtf-cream);
	border-top: 3px solid var(--dtf-gold);
	border-radius: 5px;
	color: var(--dtf-ink);
}

.dtf-it__eyebrow {
	color: var(--dtf-gold-dark);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.19em;
	text-transform: uppercase;
}

.dtf-it__route h3 {
	margin-top: 4px;
	font-size: 28px;
}

.dtf-it__stops {
	margin: 9px 0 13px;
}

.dtf-it__stops li {
	border-bottom: 1px solid var(--dtf-line);
}

.dtf-it__stops a {
	display: flex;
	gap: 7px;
	align-items: baseline;
	justify-content: space-between;
	padding-block: 6px;
	font-size: 13px;
	font-weight: 700;
}

.dtf-it__stops a:hover {
	text-decoration: underline;
}

.dtf-it__stops span {
	flex: none;
	color: var(--dtf-gold-dark);
	font-size: 11px;
}

.dtf-it__button {
	display: inline-flex;
	gap: 9px;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 43px;
	padding: 9px 17px;
	background: var(--dtf-green);
	border: 1px solid transparent;
	border-radius: 4px;
	color: var(--dtf-cream);
	font-size: 13px;
	font-weight: 700;
	transition: background 0.18s;
}

.dtf-it__button:hover {
	background: #24484a;
	color: var(--dtf-cream);
}

.dtf-it-notice {
	padding: 12px 16px;
	border: 1px dashed #c00;
	color: #c00;
	font-size: 14px;
}

@media (max-width: 740px) {
	.dtf-it__layout {
		grid-template-columns: 1fr;
	}

	.dtf-it__route {
		position: static;
	}
}

@media (max-width: 520px) {
	.dtf-it__stage {
		padding-left: 14px;
	}

	.dtf-it__stage summary {
		gap: 7px;
		padding-inline: 7px;
	}

	.dtf-it__stage-title {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dtf-it *,
	.dtf-it *::before,
	.dtf-it *::after {
		transition: none !important;
	}
}

/* Print: only the itinerary, without the side box, on white. */
@media print {
	html.dtf-it-printing body * {
		visibility: hidden;
	}

	html.dtf-it-printing .dtf-it.is-printing,
	html.dtf-it-printing .dtf-it.is-printing * {
		visibility: visible;
	}

	html.dtf-it-printing .dtf-it.is-printing {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		padding: 0;
		background: #fff;
		color: #111;
	}

	html.dtf-it-printing .dtf-it.is-printing .dtf-it__layout {
		display: block;
	}

	html.dtf-it-printing .dtf-it.is-printing .dtf-it__route,
	html.dtf-it-printing .dtf-it.is-printing .dtf-it__text-button {
		display: none !important;
	}

	html.dtf-it-printing .dtf-it.is-printing .dtf-it__stage details,
	html.dtf-it-printing .dtf-it.is-printing .dtf-it__stage details[open] {
		background: #fff;
		color: #111;
	}

	html.dtf-it-printing .dtf-it.is-printing .dtf-it__stage-body {
		color: #222;
	}

	html.dtf-it-printing .dtf-it.is-printing .dtf-it__stage {
		padding-left: 0;
		break-inside: avoid;
	}

	html.dtf-it-printing .dtf-it.is-printing .dtf-it__stage::before,
	html.dtf-it-printing .dtf-it.is-printing .dtf-it__stage::after,
	html.dtf-it-printing .dtf-it.is-printing .dtf-it__stage summary::after {
		display: none;
	}
}
