/**
 * Component: Process Timeline
 * ---------------------------------------------------------------------------
 * File: assets/css/components/process-timeline.css
 * PHP:  template-parts/components/process-timeline.php
 *
 * New component this sprint (see the file's own docblock for why this
 * doesn't require the extra approval-flagging used for smaller additions
 * in past sprints — it was directly commissioned). Every value below is
 * an existing token from variables.css — no new colour, spacing, radius,
 * or typography size is introduced.
 *
 * Accessibility: focus-visible is inherited automatically from base.css
 * for any interactive descendant (this component has none by default —
 * it's presentational content, not interactive); the connector line and
 * decorative step-number badge are `aria-hidden` in markup, not just
 * visually incidental.
 *
 * Responsive: mobile-first. `.gdq-process-timeline` is a flex COLUMN
 * (vertical layout) by default, with the connector line running
 * vertically between markers; from tablet up it becomes a flex ROW
 * (horizontal layout), with the connector line running horizontally.
 */

.gdq-process-timeline {
	display: flex;
	flex-direction: column;
	gap: var(--gdq-space-5);
	list-style: none; /* base.css already resets ul/ol markers, but this
	                     is a plain <ol> used for its semantic ordering,
	                     not its visual numbers — repeated here for
	                     clarity since ordered-list markers are otherwise
	                     easy to assume are still active */
	padding: 0;
}

.gdq-process-timeline__step {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	position: relative;
	flex: 1;
}

.gdq-process-timeline__marker {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border: 1px solid var(--gdq-color-border);
	border-radius: var(--gdq-radius-pill);
	color: var(--gdq-icon-color-default);
	background-color: var(--gdq-color-bg-surface);
	margin-bottom: var(--gdq-space-3);
	flex-shrink: 0;
}

.gdq-process-timeline__marker svg {
	width: 28px;
	height: 28px;
}

/* Decorative step number — small badge overlapping the marker's edge. */
.gdq-process-timeline__number {
	position: absolute;
	top: -6px;
	right: -6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding-inline: 4px;
	border-radius: var(--gdq-radius-pill);
	background-color: var(--gdq-color-accent);
	color: var(--gdq-color-bg-primary);
	font-size: var(--gdq-text-caption-size);
	font-weight: 700;
}

.gdq-process-timeline__title {
	margin-top: 0;
	margin-bottom: var(--gdq-space-1);
}

.gdq-process-timeline__description {
	color: var(--gdq-color-text-body);
}

/* ==========================================================================
   CONNECTOR LINE — vertical on mobile, horizontal from tablet up.
   Drawn as a pseudo-element on the marker so it sits behind/between
   markers regardless of content height differences between steps.
   Omitted on the last step (nothing to connect to) and entirely when
   `--no-connector` is set.
   ========================================================================== */
.gdq-process-timeline:not(.gdq-process-timeline--no-connector) .gdq-process-timeline__step:not(:last-child) .gdq-process-timeline__marker::after {
	/* Note: generated ::after content is never exposed to the
	   accessibility tree by browsers, so no aria-hidden equivalent is
	   needed or possible here — this comment exists so a future reader
	   doesn't go looking for one. */
	content: "";
	position: absolute;
	background-color: var(--gdq-color-border);
	/* Mobile: vertical line extending downward from the marker's bottom
	   edge to the next step's marker. */
	top: 100%;
	left: 50%;
	width: 1px;
	height: var(--gdq-space-5);
	transform: translateX(-50%);
}

@media (min-width: 768px) { /* mirrors --gdq-bp-tablet */
	.gdq-process-timeline {
		flex-direction: row;
		align-items: flex-start;
		gap: var(--gdq-space-3);
	}

	.gdq-process-timeline:not(.gdq-process-timeline--no-connector) .gdq-process-timeline__step:not(:last-child) .gdq-process-timeline__marker::after {
		/* Desktop: horizontal line extending rightward from the marker's
		   right edge to the next step's marker, vertically centered
		   through the circle. */
		top: 50%;
		left: 100%;
		width: var(--gdq-space-5);
		height: 1px;
		transform: translateY(-50%);
	}
}
