/**
 * Custom Timeline Block — shared editor + frontend styling.
 *
 * To match your site's exact red everywhere, change ONLY this one line:
 */
.tlb-timeline,
.tlb-editor-timeline {
	--tlb-accent: #852c23; /* sampled from your site screenshot (date/tag red) */
}

/* ------------------------------------------------------------------ *
 * Toggle
 * ------------------------------------------------------------------ */
.tlb-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	background: none;
	border: none;
	margin: 0;
	padding: 0.25em 0;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	font-size: 1.15em;
	letter-spacing: 0.01em;
	color: var( --tlb-accent );
}

.tlb-toggle:hover,
.tlb-toggle:focus-visible {
	opacity: 0.8;
}

.tlb-toggle-icon {
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	flex: 0 0 auto;
}

.tlb-toggle-icon::before {
	content: '';
	display: block;
	width: 100%;
	height: 100%;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.3s ease;
}

.tlb-toggle[aria-expanded='true'] .tlb-toggle-icon::before {
	transform: rotate(45deg);
}

/* ------------------------------------------------------------------ *
 * Collapse / expand animation
 * A grid-template-rows 0fr -> 1fr transition animates height smoothly
 * without any JS measuring the content's scrollHeight — the standard
 * modern, non-janky way to animate to "auto" height.
 * ------------------------------------------------------------------ */
.tlb-timeline-track-outer {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.35s ease;
}

.tlb-timeline-track-outer.tlb-open {
	grid-template-rows: 1fr;
}

.tlb-timeline-track {
	overflow: hidden;
	position: relative;
}

.tlb-timeline-track-outer.tlb-open .tlb-timeline-track {
	padding-top: 1.25em;
}

/* ------------------------------------------------------------------ *
 * The vertical line
 * ------------------------------------------------------------------ */
.tlb-timeline-line {
	position: absolute;
	top: 0.4em;
	bottom: 0.4em;
	left: 19px;
	width: 3px;
	background: var( --tlb-accent );
	border-radius: 2px;
}

/* ------------------------------------------------------------------ *
 * Entries
 * ------------------------------------------------------------------ */
.tlb-entry {
	position: relative;
	display: flex;
	gap: 1.25em;
	padding-bottom: 2em;
}

.tlb-entry:last-child {
	padding-bottom: 0;
}

.tlb-entry-marker-col {
	flex: 0 0 40px;
	display: flex;
	justify-content: center;
}

.tlb-entry-marker {
	position: relative;
	z-index: 1;
	margin-top: 0.3em;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var( --tlb-accent );
	box-shadow: 0 0 0 3px #fff;
}

.tlb-entry-content {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 0.1em;
}

.tlb-entry-date {
	color: var( --tlb-accent );
	font-weight: 700;
	font-size: 0.95em;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	margin-bottom: 0.4em;
}

.tlb-entry-description {
	color: #000;
	line-height: 1.6;
}

.tlb-entry-description > *:first-child {
	margin-top: 0;
}

.tlb-entry-description > *:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ *
 * Image + lightbox trigger
 * ------------------------------------------------------------------ */
.tlb-entry-image {
	display: block;
	border: none;
	background: none;
	padding: 0;
	margin: 0.5em 0 0.9em;
	max-width: 320px;
	border-radius: 6px;
	overflow: hidden;
	cursor: zoom-in;
	line-height: 0;
}

.tlb-entry-image img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.3s ease;
}

.tlb-entry-image:hover img,
.tlb-entry-image:focus-visible img {
	transform: scale(1.03);
}

/* ------------------------------------------------------------------ *
 * Link
 * ------------------------------------------------------------------ */
.tlb-entry-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin-top: 0.7em;
	color: var( --tlb-accent );
	font-weight: 600;
	font-size: 0.95em;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tlb-entry-link:hover {
	opacity: 0.8;
}

.tlb-entry-link-icon {
	flex: 0 0 auto;
}

/* ------------------------------------------------------------------ *
 * Lightbox overlay
 * ------------------------------------------------------------------ */
.tlb-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 4vw;
	background: rgba(0, 0, 0, 0.85);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.tlb-lightbox-overlay.tlb-open {
	opacity: 1;
	pointer-events: auto;
}

.tlb-lightbox-img {
	max-width: 92vw;
	max-height: 92vh;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tlb-lightbox-close {
	position: absolute;
	top: 1.2em;
	right: 1.4em;
	background: none;
	border: none;
	color: #fff;
	font-size: 2.4em;
	line-height: 1;
	cursor: pointer;
	padding: 0.1em 0.3em;
}

.tlb-lightbox-close:hover {
	opacity: 0.75;
}

body.tlb-lightbox-locked {
	overflow: hidden;
}

/* Respect users who've asked for reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.tlb-timeline-track-outer,
	.tlb-toggle-icon::before,
	.tlb-entry-image img,
	.tlb-lightbox-overlay {
		transition: none !important;
	}
}
