/* SLV Shipment Tracking - customer-facing styles */

/* Order details tracking table */
.slv-st-tracking-info {
	margin-bottom: 2em;
}

.slv-st-tracking-table {
	width: 100%;
}

/* Tracking page: lookup form */
.slv-st-lookup-form {
	margin-bottom: 2em;
}

.slv-st-lookup-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	align-items: flex-end;
}

.slv-st-field {
	flex: 1 1 200px;
	margin: 0;
}

.slv-st-field label {
	display: block;
	margin-bottom: 0.25em;
	font-weight: 600;
}

.slv-st-field input {
	width: 100%;
	padding: 0.5em 0.75em;
	box-sizing: border-box;
}

.slv-st-field-submit {
	flex: 0 0 auto;
}

.slv-st-lookup-error {
	color: #b32d2e;
	margin-top: 1em;
}

.slv-st-lookup-form.is-busy .slv-st-lookup-submit {
	pointer-events: none;
	opacity: 0.6;
}

/* Result card */
.slv-st-result {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	padding: 1.5em;
}

.slv-st-result-heading {
	display: flex;
	align-items: center;
	gap: 0.75em;
	flex-wrap: wrap;
	margin-top: 0;
}

.slv-st-order-status {
	display: inline-block;
	font-size: 0.7em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.25em 0.75em;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.07);
}

.slv-st-order-status--shipped,
.slv-st-order-status--completed,
.slv-st-order-status--delivered {
	background: #c6e1c6;
	color: #274e13;
}

/* Progress timeline */
.slv-st-timeline {
	display: flex;
	list-style: none;
	margin: 2em 0;
	padding: 0;
	counter-reset: slv-st-step;
}

.slv-st-step {
	flex: 1;
	position: relative;
	text-align: center;
	padding-top: 28px;
}

.slv-st-step-marker {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid rgba(0, 0, 0, 0.2);
	box-sizing: border-box;
	z-index: 1;
}

/* Connector line */
.slv-st-step::before {
	content: "";
	position: absolute;
	top: 8px;
	left: -50%;
	width: 100%;
	height: 3px;
	background: rgba(0, 0, 0, 0.15);
}

.slv-st-step:first-child::before {
	display: none;
}

.slv-st-step.is-complete .slv-st-step-marker {
	background: #2e7d32;
	border-color: #2e7d32;
}

.slv-st-step.is-complete::before {
	background: #2e7d32;
}

.slv-st-step.is-current .slv-st-step-label {
	font-weight: 700;
}

.slv-st-step-label {
	display: block;
	font-size: 0.9em;
}

.slv-st-step-date {
	display: block;
	font-size: 0.75em;
	opacity: 0.7;
}

/* Shipments */
.slv-st-shipment {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	padding-top: 1em;
	margin-top: 1em;
}

.slv-st-shipment-title {
	margin: 0 0 0.25em;
}

.slv-st-shipment-meta {
	display: flex;
	gap: 1em;
	flex-wrap: wrap;
	margin: 0 0 1em;
}

.slv-st-shipment-number {
	font-family: monospace;
	font-size: 1.05em;
}

.slv-st-shipment-date {
	opacity: 0.7;
}

/* Live tracking events (when an integration provides them) */
.slv-st-events {
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
	border-left: 2px solid rgba(0, 0, 0, 0.15);
}

.slv-st-event {
	position: relative;
	padding: 0 0 1em 1.25em;
}

.slv-st-event::before {
	content: "";
	position: absolute;
	left: -6px;
	top: 6px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #2e7d32;
}

.slv-st-event-time {
	display: block;
	font-size: 0.8em;
	opacity: 0.7;
}

.slv-st-event-location {
	display: block;
	font-size: 0.85em;
	opacity: 0.8;
}

@media (max-width: 600px) {
	.slv-st-timeline {
		flex-direction: column;
		gap: 1em;
	}

	.slv-st-step {
		text-align: left;
		padding-top: 0;
		padding-left: 30px;
	}

	.slv-st-step-marker {
		left: 0;
		top: 2px;
		transform: none;
	}

	.slv-st-step::before {
		display: none;
	}
}
