/**
 * Track your order (TRACK-ORDER.md Part A). Loaded on the Track Order template only.
 */

.trk {
	color: #111111;
}

/* Hero */

.trk-hero {
	position: relative;
	overflow: hidden;
	background: #f7f1eb;
}

.trk-hero__mark {
	position: absolute;
	bottom: -70px;
	left: -40px;
	color: #8c6448;
	font-family: var(--serif);
	font-size: clamp(130px, 16vw, 220px);
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	opacity: 0.07;
	pointer-events: none;
	user-select: none;
}

.trk-hero__inner {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 40px;
	padding-top: 56px;
	padding-bottom: 64px;
}

.trk-hero__copy {
	display: flex;
	flex: 1 1 440px;
	flex-direction: column;
	gap: 16px;
}

.trk-crumbs {
	color: #555555;
	font-size: 13px;
}

.trk-crumbs a {
	color: #555555;
}

.trk-hero__eyebrow {
	color: #8c6448;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.trk-hero__title {
	margin: 0;
	font-family: var(--serif);
	font-size: 54px;
	font-weight: 500;
	line-height: 1.05;
}

.trk-hero__lead {
	max-width: 460px;
	margin: 0;
	color: #444444;
	font-size: 17px;
}

.trk-hero__account {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 6px 0 0;
	color: #444444;
	font-size: 14px;
}

.trk-hero__account a {
	color: #2b1b12;
	font-weight: 600;
}

.trk-hero__truck {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 16px;
	background: #ffffff;
	color: #8c6448;
	box-shadow: 0 8px 20px rgba(43, 27, 18, 0.08);
	animation: trk-drive 1.8s ease-in-out infinite;
}

@keyframes trk-drive {
	50% {
		transform: translateX(6px);
	}
}

.trk-hero__form {
	flex: 1 1 420px;
	min-width: 0;
}

/* Form card */

.trk-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 30px;
	border-radius: 24px;
	background: #ffffff;
	box-shadow: 0 24px 60px rgba(43, 27, 18, 0.12);
}

.trk-form.is-shake {
	animation: trk-shake 0.45s ease;
}

@keyframes trk-shake {
	20% { transform: translateX(-8px); }
	40% { transform: translateX(8px); }
	60% { transform: translateX(-5px); }
	80% { transform: translateX(5px); }
}

.trk-form__title {
	margin: 0;
	font-family: var(--serif);
	font-size: 26px;
	font-weight: 500;
}

.trk-form .ns-field input {
	height: 50px;
	border-radius: 12px;
}

.trk-form__prefix {
	height: 50px;
	border-radius: 12px;
	color: #2b1b12;
	font-weight: 600;
}

.trk-form__help {
	margin: -4px 0 0;
	color: #555555;
	font-size: 12px;
}

.trk-form__error-box {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 14px 16px;
	border: 1px solid #f3c9c9;
	border-radius: 14px;
	background: #fdf0f0;
	color: #7a1e1e;
	font-size: 14px;
}

.trk-form__error-box svg {
	flex: none;
	margin-top: 1px;
}

.trk-form [data-track-submit] {
	min-height: 56px;
}

/* Tips (before a search) */

.trk-tips__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 18px;
	padding-top: 48px;
	padding-bottom: 80px;
}

.trk-tip {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 22px;
	border: 1px solid #ece7e1;
	border-radius: 20px;
}

.trk-tip__icon {
	width: 44px;
	height: 44px;
	margin: 0;
	border-radius: 14px;
}

.trk-tip__title {
	margin: 0;
	font-family: var(--sans);
	font-size: 15px;
	font-weight: 600;
}

.trk-tip p {
	margin: 0;
	color: #555555;
	font-size: 14px;
}

.trk-tip a {
	color: #2b1b12;
	font-weight: 600;
}

/* Result */

.trk-result {
	transition: grid-template-rows 0.7s var(--ui-ease), opacity 0.4s ease;
}

.trk-result:focus {
	outline: none;
}

.trk-res {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding-top: 44px;
	padding-bottom: 80px;
}

.trk-card {
	padding: 28px;
	border: 1px solid #ece7e1;
	border-radius: 24px;
	background: #ffffff;
}

.trk-res .trk-card {
	animation: ns-in 0.6s var(--ui-ease) both;
}

.trk-res__cols .trk-updates { animation-delay: 0.08s; }
.trk-res__side .trk-card:nth-child(1) { animation-delay: 0.16s; }
.trk-res__side .trk-card:nth-child(2) { animation-delay: 0.24s; }
.trk-res__side .trk-card:nth-child(3) { animation-delay: 0.32s; }

.trk-status {
	box-shadow: 0 14px 36px rgba(43, 27, 18, 0.06);
}

.trk-status__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 30px;
}

.trk-status__title {
	margin: 4px 0;
	font-family: var(--serif);
	font-size: 32px;
	font-weight: 500;
}

.trk-status__meta {
	margin: 0;
	color: #555555;
	font-size: 14px;
}

.trk-status__pill {
	gap: 8px;
	padding: 8px 14px;
	font-size: 13px;
}

.trk-pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	animation: trk-pulse 1.6s ease-out infinite;
}

@keyframes trk-pulse {
	0% { box-shadow: 0 0 0 0 rgba(140, 100, 72, 0.45); }
	100% { box-shadow: 0 0 0 14px rgba(140, 100, 72, 0); }
}

/* Large tracker: 46px dots, 4px line, step icons, dots fill one after another. */
.ns-tracker--lg::before,
.ns-tracker--lg .ns-tracker__fill {
	top: 21px;
	height: 4px;
}

.ns-tracker--lg .ns-tracker__step {
	gap: 10px;
}

.ns-tracker--lg .ns-tracker__dot {
	width: 46px;
	height: 46px;
	color: #b5aca3;
	transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.4), box-shadow 0.4s ease;
}

.ns-tracker--lg .ns-tracker__dot svg {
	position: absolute;
	opacity: 1;
}

.ns-tracker--lg .ns-tracker__check {
	opacity: 0 !important;
	color: #ffffff;
}

.ns-tracker--lg .is-done .ns-tracker__check {
	opacity: 1 !important;
}

.ns-tracker--lg .is-done .ns-tracker__icon {
	opacity: 0 !important;
}

.ns-tracker--lg .is-next .ns-tracker__dot {
	color: #8c6448;
	box-shadow: 0 0 0 6px rgba(140, 100, 72, 0.14);
}

.ns-tracker--lg .ns-tracker__step:nth-child(2) .ns-tracker__dot { transition-delay: 0s; }
.ns-tracker--lg .ns-tracker__step:nth-child(3) .ns-tracker__dot { transition-delay: 0.35s; }
.ns-tracker--lg .ns-tracker__step:nth-child(4) .ns-tracker__dot { transition-delay: 0.7s; }
.ns-tracker--lg .ns-tracker__step:nth-child(5) .ns-tracker__dot { transition-delay: 1.05s; }

.ns-js .ns-tracker--lg:not(.is-shown) .is-done .ns-tracker__dot {
	border-color: #e2dcd5;
	background: #ffffff;
	transform: scale(0.85);
}

.ns-js .ns-tracker--lg:not(.is-shown) .is-done .ns-tracker__check {
	opacity: 0 !important;
}

.ns-js .ns-tracker--lg:not(.is-shown) .is-done .ns-tracker__icon {
	opacity: 1 !important;
}

.ns-tracker--lg .ns-tracker__when {
	font-size: 12px;
}

.trk-status__msg {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	margin-top: 26px;
	padding: 14px 16px;
	border-radius: 14px;
	background: #f7f5f2;
	color: #444444;
	font-size: 14px;
}

.trk-status__msg svg {
	flex: none;
	color: #8c6448;
}

.trk-status__msg p {
	flex: 1 1 260px;
	margin: 0;
}

.trk-status__msg.is-closed {
	margin-top: 0;
	background: #f1f1f1;
}

.trk-status__msg a:not(.ns-btn) {
	color: #2b1b12;
	font-weight: 600;
}

.trk-ship {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #ece7e1;
	font-size: 14px;
}

.trk-ship__label {
	color: #8c6448;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.trk-ship__number {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.trk-ship__copy {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: #f4efea;
	color: #2b1b12;
	cursor: pointer;
}

.ns-js .trk-ship__copy[hidden] {
	display: flex;
}

.trk-res__cols {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 22px;
}

.trk-updates {
	flex: 999 1 520px;
	min-width: 0;
}

.trk-res__side {
	display: flex;
	flex: 1 1 340px;
	flex-direction: column;
	gap: 22px;
	min-width: 0;
}

.trk-card__title {
	margin: 0 0 22px;
	font-family: var(--serif);
	font-size: 24px;
	font-weight: 500;
}

/* Timeline */

.trk-timeline {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.trk-timeline::before {
	content: "";
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: 11px;
	width: 2px;
	background: #ece7e1;
}

.trk-timeline__item {
	position: relative;
	display: flex;
	gap: 16px;
	animation: ns-in 0.6s var(--ui-ease) both;
	animation-delay: calc(0.3s + var(--i, 0) * 0.12s);
}

.trk-timeline__dot {
	position: relative;
	z-index: 1;
	flex: none;
	width: 24px;
	height: 24px;
	margin-top: 1px;
	border: 5px solid #2b1b12;
	border-radius: 50%;
	background: #ffffff;
}

.trk-timeline__item.is-current .trk-timeline__dot {
	border-color: #f4ede6;
	background: #8c6448;
	animation: trk-pulse 1.6s ease-out infinite;
}

.trk-timeline__item > div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-bottom: 22px;
}

.trk-timeline__title {
	margin: 0;
	font-family: var(--sans);
	font-size: 15px;
	font-weight: 600;
}

.trk-timeline__text {
	margin: 0;
	color: #444444;
	font-size: 14px;
}

.trk-timeline__when {
	color: #6e655d;
	font-size: 12px;
}

/* Fulfilment card */

.trk-fulfil {
	position: relative;
	overflow: hidden;
	border: 0;
	background: #2b1b12;
	color: #ffffff;
}

.trk-fulfil__circle {
	position: absolute;
	top: -60px;
	right: -60px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: #8c6448;
	opacity: 0.4;
}

.trk-fulfil > * {
	position: relative;
}

.trk-fulfil__label {
	color: #d9bfa6;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.trk-fulfil__title {
	margin: 6px 0 4px;
	font-family: var(--serif);
	font-size: 24px;
	font-weight: 500;
}

.trk-fulfil p {
	margin: 0 0 4px;
	color: #e9dfd6;
	font-size: 14px;
}

.trk-fulfil__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 46px;
	margin-top: 12px;
	padding: 0 20px;
	border-radius: 999px;
	background: #ffffff;
	color: #2b1b12;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.trk-fulfil__btn:hover {
	color: #2b1b12;
	background: #f7f1eb;
}

/* Items */

.trk-items {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.trk-items .trk-card__title {
	margin: 0;
	font-size: 22px;
}

.trk-items__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.trk-items__row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.trk-items__img img {
	display: block;
	width: 56px;
	height: 70px;
	border-radius: 10px;
	object-fit: cover;
}

.trk-items__main {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.trk-items__name {
	font-family: var(--serif);
}

.trk-items__meta {
	color: #555555;
	font-size: 12px;
}

.trk-items__price {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.trk-items__totals {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding-top: 12px;
	border-top: 1px solid #ece7e1;
	font-size: 14px;
}

.trk-items__totals div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.trk-items__totals dt {
	color: #555555;
}

.trk-items__totals dd {
	margin: 0;
	text-align: right;
}

.trk-items__total dt,
.trk-items__total dd {
	color: #111111;
	font-weight: 600;
}

.trk-items__pay {
	margin: 0;
	color: #555555;
	font-size: 12px;
}

/* Help */

.trk-help {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
	border: 0;
	background: #f7f5f2;
}

.trk-help__title {
	margin: 0;
	font-family: var(--sans);
	font-size: 15px;
	font-weight: 600;
}

.trk-help p {
	margin: 0;
	color: #555555;
	font-size: 14px;
}

.trk-help__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.trk-help__actions .ns-btn {
	flex: 1 1 140px;
	min-height: 46px;
}

@media (max-width: 860px) {
	.trk-hero__inner {
		padding-top: 32px;
		padding-bottom: 40px;
	}

	.trk-hero__title {
		font-size: 38px;
	}

	.trk-form,
	.trk-card {
		padding: 20px 16px;
	}

	.trk-status__title {
		font-size: 26px;
	}

	.ns-tracker--lg .ns-tracker__label {
		font-size: 11px;
	}

	.ns-tracker--lg .ns-tracker__dot {
		width: 40px;
		height: 40px;
	}

	.ns-tracker--lg::before,
	.ns-tracker--lg .ns-tracker__fill {
		top: 18px;
	}
}
