/**
 * Tracking center (C8 / P5) — My Account endpoint + [ebw_tracking_center]
 * page for the customer's shipments.
 *
 * Rendered by EBW_Tracking_Center with plugin markup (`.ebw-tc-*`) so the face
 * looks the same on every theme. Palette matches the order-center family
 * (gold accent #efb33c, ink #1a1a1a); every rule is scoped under .ebw-tc
 * because the file also loads on a regular page next to the theme's CSS.
 *
 * Theming: a theme restyles by setting the custom properties on any ancestor.
 *   --ebw-tc-ink       primary ink            (#1a1a1a)
 *   --ebw-tc-muted     secondary text         (#8a857c)
 *   --ebw-tc-line      dividers / track line  (#e5e1d8)
 *   --ebw-tc-gold      accent (latest badge)  (#efb33c)
 *   --ebw-tc-blue      active / info          (#2563eb)
 *   --ebw-tc-green     delivered              (#15803d)
 *   --ebw-tc-red       exception / failed     (#b91c1c)
 *   --ebw-tc-radius    card radius            (0px)
 */

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

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

.ebw-tc-empty,
.ebw-tc-login {
	margin: 0;
	padding: 18px 20px;
	border: 1px dashed var(--ebw-tc-line);
	color: var(--ebw-tc-muted);
}

.ebw-tc-login-link {
	color: var(--ebw-tc-ink);
	font-weight: 600;
	text-decoration: underline;
}

/* ------------------------------------------------------------------- card */

.ebw-tc-card {
	margin: 0 0 18px;
	padding: 16px 18px;
	border: 1px solid var(--ebw-tc-line);
	border-radius: var(--ebw-tc-radius);
	background: #fff;
}

.ebw-tc-card-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 14px;
	margin: 0 0 12px;
	padding: 0 0 10px;
	border-bottom: 1px solid var(--ebw-tc-line);
}

.ebw-tc-order {
	font-size: 15px;
	font-weight: 700;
	color: var(--ebw-tc-ink);
	text-decoration: none;
}

.ebw-tc-order:hover,
.ebw-tc-order:focus {
	color: var(--ebw-tc-blue);
	text-decoration: underline;
}

.ebw-tc-date {
	color: var(--ebw-tc-muted);
	font-size: 13px;
}

.ebw-tc-status {
	margin-left: auto;
	padding: 2px 10px;
	border: 1px solid var(--ebw-tc-line);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.4px;
	text-transform: inherit;
	color: var(--ebw-tc-muted);
}

.ebw-tc-status.is-processing,
.ebw-tc-status.is-completed {
	border-color: currentColor;
	color: var(--ebw-tc-green);
}

.ebw-tc-status.is-pending,
.ebw-tc-status.is-on-hold {
	border-color: currentColor;
	color: var(--ebw-tc-gold);
}

.ebw-tc-status.is-failed,
.ebw-tc-status.is-cancelled,
.ebw-tc-status.is-refunded {
	border-color: currentColor;
	color: var(--ebw-tc-red);
}

/* --------------------------------------------------------------- shipment */

.ebw-tc-shipment + .ebw-tc-shipment {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--ebw-tc-line);
}

.ebw-tc-number {
	margin: 0 0 4px;
	font-weight: 600;
}

.ebw-tc-carrier {
	color: var(--ebw-tc-ink);
}

.ebw-tc-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	letter-spacing: 0.4px;
}

.ebw-tc-external {
	margin-left: 6px;
	font-size: 12px;
	font-weight: 500;
	color: var(--ebw-tc-blue);
	text-decoration: underline;
	white-space: nowrap;
}

.ebw-tc-latest {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 6px 0 0;
}

.ebw-tc-badge {
	display: inline-block;
	padding: 2px 9px;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.3px;
	color: var(--ebw-tc-blue);
	background: rgba(37, 99, 235, 0.06);
}

.ebw-tc-badge.is-pending,
.ebw-tc-badge.is-inforeceived {
	color: var(--ebw-tc-muted);
	background: rgba(138, 133, 124, 0.08);
}

.ebw-tc-badge.is-outfordelivery {
	color: var(--ebw-tc-gold);
	background: rgba(239, 179, 60, 0.12);
}

.ebw-tc-badge.is-delivered {
	color: var(--ebw-tc-green);
	background: rgba(21, 128, 61, 0.08);
}

.ebw-tc-badge.is-exception,
.ebw-tc-badge.is-attemptfail,
.ebw-tc-badge.is-expired {
	color: var(--ebw-tc-red);
	background: rgba(185, 28, 28, 0.07);
}

.ebw-tc-subtag,
.ebw-tc-time {
	color: var(--ebw-tc-muted);
	font-size: 12px;
}

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

.ebw-tc-history {
	margin: 10px 0 0;
	padding: 0 0 0 14px;
	list-style: none;
	border-left: 1px solid var(--ebw-tc-line);
}

.ebw-tc-event {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	margin: 0;
	padding: 3px 0 3px 4px;
	font-size: 12.5px;
}

.ebw-tc-event::before {
	content: "";
	position: absolute;
	left: -19px;
	top: 9px;
	width: 7px;
	height: 7px;
	border: 1px solid var(--ebw-tc-muted);
	border-radius: 50%;
	background: #fff;
}

.ebw-tc-event:last-child::before {
	border-color: var(--ebw-tc-gold);
	background: var(--ebw-tc-gold);
}

.ebw-tc-event-tag {
	font-weight: 600;
	color: var(--ebw-tc-ink);
}

.ebw-tc-event-tag.is-inforeceived,
.ebw-tc-event-tag.is-pending {
	color: var(--ebw-tc-muted);
}

.ebw-tc-event-tag.is-delivered {
	color: var(--ebw-tc-green);
}

.ebw-tc-event-tag.is-exception,
.ebw-tc-event-tag.is-attemptfail,
.ebw-tc-event-tag.is-expired {
	color: var(--ebw-tc-red);
}

.ebw-tc-event-sub,
.ebw-tc-event-time {
	color: var(--ebw-tc-muted);
}

.ebw-tc-more {
	margin: 8px 0 0;
	font-size: 12px;
	color: var(--ebw-tc-muted);
}

/* ---------------------------------------------------------------- footer */

.ebw-tc-card-foot {
	margin: 14px 0 0;
	padding-top: 10px;
	border-top: 1px solid var(--ebw-tc-line);
}

.ebw-tc-view {
	font-size: 13px;
	font-weight: 600;
	color: var(--ebw-tc-ink);
	text-decoration: underline;
}

.ebw-tc-view:hover,
.ebw-tc-view:focus {
	color: var(--ebw-tc-blue);
}

@media (max-width: 560px) {
	.ebw-tc-card {
		padding: 14px;
	}

	.ebw-tc-status {
		margin-left: 0;
	}
}
