.timeline {
	padding: 0;
}

.timeline ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.timeline ul > * {
	border: 1px solid #333;
	margin: 0;
	padding: 0;
	position: absolute;
	text-align: center;
	background-color: var(--bs-primary);
	color: var(--bs-white);
}

.timeline ul li > a {
	padding: 0;
}

.timeline a {
	text-decoration: none;
	color: inherit;
	font-weight: bold;
}

#timelines {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.25em;
	border: 1px solid #333;
	padding: 0.25em;
	max-height: 40%;
	min-height: 5em;
	overflow-y: scroll;
}

#timelines > .timeline {
	display: flex;
}

#timelines > .timeline > *:first-child {
	 width: 11em;
}

#timelines a {
	text-decoration: none;
	font-weight: bold;
}

.timeline-steps .resize-hook {
	color: #111;
	margin: 1px 0;
	pointer-events: auto;
}

.timeline-steps .resize-hook * {
	color: inherit;
}

.timeline-steps {
	--timeline-block: 10px;
	position: relative;
	white-space: nowrap;
	background: repeating-linear-gradient(90deg, #ddd, #ddd var(--timeline-block), #bbb var(--timeline-block), #bbb calc(var(--timeline-block) * 2));
	flex-grow: 1;
	width: 100%;
}

.timeline-step .timeline-info {
	pointer-events: auto;
}

.timeline-step {
	pointer-events: none;
	position: absolute;
	display: flex;
	gap: 0.5em;
	justify-content: center;
	align-items: center;
	background-color: rgb(var(--bs-primary-rgb),0.5);
	color: var(--bs-light);
	border-left: 1px solid #000;
	border-right: 1px solid #000;
}

.timeline-step.selected {
	background-color: rgb(var(--bs-danger-rgb),0.5);
	color: #fff;
}

.timeline-step a.resize-hook {
	display: none;
	position: absolute;
}

.timeline-step.selected a.resize-hook {
	display: block;
	font-weight: bold;
}

.timeline-step > a {
	display: flex;
	gap: 0.25em;
	align-items: end;
}

.timeline-steps .small {
	font-size: 0.75rem;
}

.timeline .timeline-name {
	display: block;
	transition: all 0.25s;
	text-align: center;
	background-color: var(--bs-yellow);
	border: 1px solid #000;
	border-right: 0;
}

.timeline .timeline-name:hover {
	color: #fff;
	background-color: #036;
}

.timeline .timeline-steps .timeline-info * {
	--text-shadow-color: #333;
	text-shadow: -1px -1px 0 var(--text-shadow-color)
				, -1px 1px 0 var(--text-shadow-color)
				, 1px 1px 0 var(--text-shadow-color)
				, 1px -1px 0 var(--text-shadow-color);
}