/**
 * Order center (C7 / P4) — self-rendered stepper, timeline and document row
 * for the customer order-detail face.
 *
 * Rendered by EBW_Order_Center with plugin markup (`.ebw-oc-*`) so it looks
 * the same on every theme. The palette matches the order/invoice family
 * (gold accent #efb33c, ink #1a1a1a) and every rule is scoped under .ebw-oc —
 * the file also loads on the order-received page next to the theme's own CSS,
 * so nothing here may leak out.
 *
 * Theming: a theme restyles by setting the custom properties on any ancestor.
 *   --ebw-oc-ink       primary ink            (#1a1a1a)
 *   --ebw-oc-muted     secondary text         (#8a857c)
 *   --ebw-oc-line      connector / track line (#e5e1d8)
 *   --ebw-oc-gold      accent (now / gold)    (#efb33c)
 *   --ebw-oc-blue      milestone dot          (#2563eb)
 *   --ebw-oc-radius    card/button radius     (0px)
 */

.ebw-oc {
	--ebw-oc-ink: #1a1a1a;
	--ebw-oc-muted: #8a857c;
	--ebw-oc-line: #e5e1d8;
	--ebw-oc-gold: #efb33c;
	--ebw-oc-blue: #2563eb;
	--ebw-oc-radius: 0px;
	display: block;
	margin: 28px 0 8px;
	color: var(--ebw-oc-ink);
	font-size: 14px;
	line-height: 1.5;
}

.ebw-oc-block {
	margin: 0 0 26px;
}

.ebw-oc-heading {
	margin: 0 0 14px;
	padding: 0 0 8px;
	border-bottom: 1px solid var(--ebw-oc-line);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--ebw-oc-ink);
}

/* ------------------------------------------------------------------ stepper */

.ebw-oc-steps {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ebw-oc-step {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	padding: 0 6px;
	text-align: center;
}

/* Connector between nodes (never before the first node). */
.ebw-oc-step::before {
	content: "";
	position: absolute;
	top: 11px;
	right: 50%;
	left: -50%;
	height: 2px;
	background: var(--ebw-oc-line);
}

.ebw-oc-step:first-child::before {
	content: none;
}

.ebw-oc-step.is-done::before,
.ebw-oc-step.is-now::before {
	background: var(--ebw-oc-blue);
}

.ebw-oc-step-dot {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 24px;
	height: 24px;
	margin: 0 auto 8px;
	border: 2px solid var(--ebw-oc-line);
	border-radius: 50%;
	background: #fff;
	color: #fff;
	font-size: 12px;
	line-height: 1;
}

.ebw-oc-step.is-done .ebw-oc-step-dot {
	border-color: var(--ebw-oc-blue);
	background: var(--ebw-oc-blue);
}

.ebw-oc-step.is-now .ebw-oc-step-dot {
	border-color: var(--ebw-oc-gold);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(239, 179, 60, 0.18);
}

.ebw-oc-step.is-todo .ebw-oc-step-dot {
	background: #fff;
}

/* Highlighted ring on the current node. */
.ebw-oc-step-pulse {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	border-radius: 50%;
	background: var(--ebw-oc-gold);
	animation: ebw-oc-pulse 1.8s ease-out infinite;
}

@keyframes ebw-oc-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(239, 179, 60, 0.55);
	}
	70% {
		box-shadow: 0 0 0 9px rgba(239, 179, 60, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(239, 179, 60, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ebw-oc-step-pulse {
		animation: none;
	}
}

.ebw-oc-step-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--ebw-oc-ink);
}

.ebw-oc-step.is-todo .ebw-oc-step-label {
	font-weight: 400;
	color: var(--ebw-oc-muted);
}

.ebw-oc-step-time {
	display: block;
	margin-top: 2px;
	font-size: 11.5px;
	color: var(--ebw-oc-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ebw-oc-step.is-now .ebw-oc-step-time {
	color: #b9821a;
	font-weight: 600;
}

/* ----------------------------------------------------------------- timeline */

.ebw-oc-events {
	margin: 0;
	padding: 0 0 0 18px;
	list-style: none;
	border-left: 1px solid var(--ebw-oc-line);
}

.ebw-oc-event {
	position: relative;
	padding: 0 0 16px 12px;
}

.ebw-oc-event:last-child {
	padding-bottom: 0;
}

.ebw-oc-event-dot {
	position: absolute;
	top: 4px;
	left: -23px;
	box-sizing: border-box;
	width: 11px;
	height: 11px;
	border: 1px solid var(--ebw-oc-line);
	border-radius: 50%;
	background: #fff;
}

/* milestone — solid blue */
.ebw-oc-event.is-done .ebw-oc-event-dot {
	border-color: var(--ebw-oc-blue);
	background: var(--ebw-oc-blue);
}

/* manual staff update — hollow ink */
.ebw-oc-event.is-manual .ebw-oc-event-dot {
	border-color: var(--ebw-oc-ink);
	background: #fff;
}

/* current state — gold, with the Now badge */
.ebw-oc-event.is-gold .ebw-oc-event-dot {
	border-color: var(--ebw-oc-gold);
	background: var(--ebw-oc-gold);
	box-shadow: 0 0 0 3px rgba(239, 179, 60, 0.18);
}

.ebw-oc-event-body {
	display: block;
}

.ebw-oc-event-label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ebw-oc-ink);
}

.ebw-oc-event.is-gold .ebw-oc-event-label {
	color: #b9821a;
}

.ebw-oc-event-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	background: var(--ebw-oc-gold);
	color: var(--ebw-oc-ink);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	vertical-align: 1px;
}

.ebw-oc-event-meta,
.ebw-oc-event-ext {
	display: block;
	margin-top: 1px;
	font-size: 12px;
	color: var(--ebw-oc-muted);
	overflow-wrap: anywhere;
}

.ebw-oc-event-ext {
	color: var(--ebw-oc-ink);
}

/* ----------------------------------------------------------------- documents */

.ebw-oc-doc-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

.ebw-oc-doc {
	display: inline-block;
	box-sizing: border-box;
	padding: 9px 18px;
	border: 1px solid var(--ebw-oc-ink);
	border-radius: var(--ebw-oc-radius);
	background: #fff;
	color: var(--ebw-oc-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.ebw-oc-doc:hover,
.ebw-oc-doc:focus {
	background: var(--ebw-oc-ink);
	color: #fff;
}

.ebw-oc-doc:focus-visible {
	outline: 2px solid var(--ebw-oc-gold);
	outline-offset: 2px;
}

/* ------------------------------------------------------------------- small */

@media (max-width: 560px) {
	.ebw-oc-step-label {
		font-size: 12px;
	}

	.ebw-oc-step-time {
		display: none;
	}

	.ebw-oc-step.is-now .ebw-oc-step-time {
		display: block;
	}
}
