/**
 * Hype Pups Tracking — customer tracking page.
 *
 * Design tokens are taken from the live storefront: Instrument Sans, the
 * #D20210 brand red, near-black #111, pill buttons at 30px, badge radius 3px.
 * Everything is scoped under .hpt so nothing here can leak into the theme.
 *
 * Mobile-first. Every breakpoint is min-width.
 */

.hpt {
	--hpt-red: #d20210;
	--hpt-red-ink: #a00108;
	--hpt-ink: #111111;
	--hpt-ink-2: #444444;
	--hpt-muted: #7a7a80;
	--hpt-faint: #9a9aa2;
	--hpt-line: #e7e7ea;
	--hpt-line-soft: #f1f1f4;
	--hpt-surface: #ffffff;
	--hpt-sunk: #f7f7f9;
	--hpt-good: #0a7d54;
	--hpt-good-bg: #e8f5ef;
	--hpt-warn: #8a5a00;
	--hpt-warn-bg: #fdf3e2;
	--hpt-radius: 14px;
	--hpt-radius-sm: 8px;
	--hpt-pill: 999px;
	--hpt-font: "Instrument Sans", "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

	font-family: var(--hpt-font);
	color: var(--hpt-ink-2);
	background: var(--hpt-surface);
	padding: 4px 0 56px;
	-webkit-font-smoothing: antialiased;
}

.hpt *,
.hpt *::before,
.hpt *::after {
	box-sizing: border-box;
}

.hpt__inner {
	width: 100%;
	max-width: 840px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ------------------------------------------------------------------ */
/* Head                                                                */
/* ------------------------------------------------------------------ */

.hpt__head {
	margin-bottom: 28px;
}

.hpt__head--form {
	text-align: center;
	margin-bottom: 24px;
}

.hpt__head--form .hpt__lede {
	max-width: 520px;
	margin-left: auto;
	margin-right: auto;
}

.hpt__title {
	font-family: var(--hpt-font);
	font-weight: 800;
	font-size: clamp(28px, 7vw, 40px);
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: var(--hpt-ink);
	margin: 0 0 10px;
	text-wrap: balance;
}

.hpt__order {
	font-size: 15px;
	color: var(--hpt-muted);
	margin: 0;
	letter-spacing: -0.01em;
}

.hpt__summary {
	color: var(--hpt-ink-2);
	font-weight: 600;
}

.hpt__lede {
	font-size: 16px;
	color: var(--hpt-muted);
	margin: 0;
	max-width: 46ch;
	line-height: 1.55;
}

.hpt-dot {
	color: var(--hpt-faint);
	margin: 0 6px;
}

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */

.hpt-packages {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.hpt-package,
.hpt-card {
	background: var(--hpt-surface);
	border: 1px solid var(--hpt-line);
	border-radius: var(--hpt-radius);
	padding: 22px 20px;
}

.hpt-package {
	position: relative;
	overflow: hidden;
}

.hpt-package.is-alert {
	border-color: #f2d5d7;
	background: #fffafa;
}

.hpt-card {
	margin-top: 20px;
}

.hpt-card--quiet {
	background: var(--hpt-sunk);
	border-color: var(--hpt-line-soft);
}

.hpt-package__index {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hpt-faint);
	margin: 0 0 12px;
}

.hpt-package__head {
	margin-bottom: 20px;
}

.hpt-status {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 6px;
}

.hpt-status__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--hpt-red);
	flex: none;
}

.hpt-status[data-status="delivered"] .hpt-status__dot {
	background: var(--hpt-good);
}

.hpt-status[data-status="pending"] .hpt-status__dot,
.hpt-status[data-status="not_found"] .hpt-status__dot {
	background: var(--hpt-faint);
}

.hpt-status__label {
	font-size: clamp(19px, 5vw, 23px);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--hpt-ink);
	line-height: 1.2;
}

.hpt-package__blurb {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--hpt-muted);
}

/* ------------------------------------------------------------------ */
/* Progress rail — vertical on mobile, horizontal from 560px           */
/* ------------------------------------------------------------------ */

.hpt-rail {
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.hpt-rail__step {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 7px 0 7px 0;
	font-size: 14px;
	color: var(--hpt-faint);
}

.hpt-rail__marker {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2px solid var(--hpt-line);
	background: var(--hpt-surface);
	flex: none;
	position: relative;
	z-index: 1;
}

.hpt-rail__step:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 6px;
	top: 21px;
	bottom: -7px;
	width: 2px;
	background: var(--hpt-line);
}

.hpt-rail__step.is-done .hpt-rail__marker,
.hpt-rail__step.is-current .hpt-rail__marker {
	border-color: var(--hpt-red);
	background: var(--hpt-red);
}

.hpt-rail__step.is-done:not(:last-child)::before {
	background: var(--hpt-red);
}

.hpt-rail__step.is-done,
.hpt-rail__step.is-current {
	color: var(--hpt-ink);
}

.hpt-rail__step.is-current .hpt-rail__text {
	font-weight: 700;
}

.hpt-rail__step.is-current .hpt-rail__marker {
	box-shadow: 0 0 0 4px rgba(210, 2, 16, 0.14);
}

@media (min-width: 560px) {
	.hpt-rail {
		flex-direction: row;
		justify-content: space-between;
		gap: 4px;
	}

	.hpt-rail__step {
		flex: 1 1 0;
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 9px;
		padding: 0;
	}

	.hpt-rail__step:not(:last-child)::before {
		left: 50%;
		right: -50%;
		top: 6px;
		bottom: auto;
		width: auto;
		height: 2px;
	}

	.hpt-rail__text {
		font-size: 12px;
		line-height: 1.3;
		letter-spacing: -0.01em;
		max-width: 11ch;
	}
}

/* ------------------------------------------------------------------ */
/* Facts                                                               */
/* ------------------------------------------------------------------ */

.hpt-facts {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin: 0 0 22px;
	padding: 18px 0 0;
	border-top: 1px solid var(--hpt-line-soft);
}

@media (min-width: 520px) {
	.hpt-facts {
		grid-template-columns: 1fr 1fr;
		gap: 16px 24px;
	}

	.hpt-fact--number {
		grid-column: 1 / -1;
	}
}

.hpt-fact dt {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--hpt-faint);
	margin: 0 0 4px;
}

.hpt-fact dd {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--hpt-ink);
	letter-spacing: -0.01em;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.hpt-tn {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
	font-size: 16px;
	letter-spacing: 0.01em;
	word-break: break-all;
}

.hpt-copy {
	appearance: none;
	border: 1px solid var(--hpt-line);
	background: var(--hpt-sunk);
	color: var(--hpt-ink-2);
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: var(--hpt-pill);
	cursor: pointer;
	min-height: 30px;
}

.hpt-copy:hover {
	border-color: var(--hpt-ink);
	color: var(--hpt-ink);
}

.hpt-copy.is-copied {
	background: var(--hpt-good-bg);
	border-color: var(--hpt-good);
	color: var(--hpt-good);
}

/* ------------------------------------------------------------------ */
/* Latest update + timeline                                            */
/* ------------------------------------------------------------------ */

.hpt-h3 {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--hpt-faint);
	margin: 0 0 12px;
}

.hpt-latest {
	background: var(--hpt-sunk);
	border-radius: var(--hpt-radius-sm);
	padding: 16px 16px 14px;
	margin-bottom: 22px;
}

.hpt-latest__when {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--hpt-muted);
}

.hpt-latest__text {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.45;
	color: var(--hpt-ink);
	font-weight: 600;
	letter-spacing: -0.01em;
}

.hpt-latest__place {
	margin: 5px 0 0;
	font-size: 13.5px;
	color: var(--hpt-muted);
}

.hpt-events {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.hpt-event {
	display: grid;
	grid-template-columns: 76px 1fr;
	gap: 14px;
	padding: 12px 0;
	border-top: 1px solid var(--hpt-line-soft);
}

.hpt-events > .hpt-event:first-child {
	border-top: none;
	padding-top: 0;
}

.hpt-events--rest {
	border-top: 1px solid var(--hpt-line-soft);
	margin-top: 4px;
	padding-top: 4px;
}

.hpt-event__time {
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: right;
	padding-top: 1px;
}

.hpt-event__date {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--hpt-ink);
	letter-spacing: -0.01em;
}

.hpt-event__clock {
	font-size: 12px;
	color: var(--hpt-faint);
	font-variant-numeric: tabular-nums;
}

.hpt-event__text {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.45;
	color: var(--hpt-ink-2);
}

.hpt-event__meta {
	margin: 4px 0 0;
	font-size: 12.5px;
	color: var(--hpt-faint);
}

.hpt-more {
	appearance: none;
	background: none;
	border: none;
	border-top: 1px solid var(--hpt-line-soft);
	width: 100%;
	text-align: left;
	padding: 14px 0 4px;
	margin-top: 4px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--hpt-red);
	cursor: pointer;
	letter-spacing: -0.01em;
	min-height: 44px;
}

.hpt-more:hover {
	color: var(--hpt-red-ink);
}

.hpt-empty {
	margin: 0 0 22px;
	padding: 16px;
	background: var(--hpt-sunk);
	border-radius: var(--hpt-radius-sm);
	font-size: 14.5px;
	color: var(--hpt-muted);
	line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* Footer of a package card                                            */
/* ------------------------------------------------------------------ */

.hpt-package__foot {
	border-top: 1px solid var(--hpt-line-soft);
	padding-top: 16px;
	margin-top: 4px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hpt-synced {
	margin: 0;
	font-size: 12.5px;
	color: var(--hpt-faint);
}

.hpt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.hpt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.02em;
	border-radius: var(--hpt-pill);
	padding: 11px 20px;
	min-height: 44px;
	cursor: pointer;
	text-decoration: none;
	border: 1px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hpt-btn--solid {
	background: var(--hpt-ink);
	color: #fff;
}

.hpt-btn--solid:hover {
	background: var(--hpt-red);
	color: #fff;
}

.hpt-btn--ghost {
	background: var(--hpt-surface);
	border-color: var(--hpt-line);
	color: var(--hpt-ink);
}

.hpt-btn--ghost:hover {
	border-color: var(--hpt-ink);
}

.hpt-btn--ghost[disabled] {
	opacity: 0.55;
	cursor: default;
}

.hpt-btn--link {
	background: none;
	color: var(--hpt-muted);
	padding-left: 6px;
	padding-right: 6px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hpt-btn--link:hover {
	color: var(--hpt-ink);
}

@media (min-width: 520px) {
	.hpt-package__foot {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.hpt-synced {
		order: 2;
	}

	.hpt-actions {
		order: 1;
	}
}

/* ------------------------------------------------------------------ */
/* Order items, help, lookup forms                                     */
/* ------------------------------------------------------------------ */

.hpt-items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.hpt-item {
	display: flex;
	align-items: center;
	gap: 14px;
}

.hpt-item__img img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: var(--hpt-radius-sm);
	display: block;
	background: var(--hpt-sunk);
}

.hpt-item__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.hpt-item__name {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--hpt-ink);
	letter-spacing: -0.01em;
}

.hpt-item__qty {
	font-size: 13px;
	color: var(--hpt-faint);
}

.hpt-help p {
	margin: 0 0 14px;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--hpt-muted);
}

.hpt-help p:last-child {
	margin-bottom: 0;
}

.hpt-again {
	margin: 22px 0 0;
	text-align: center;
	font-size: 14px;
}

.hpt-again a {
	color: var(--hpt-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hpt-again a:hover {
	color: var(--hpt-red);
}

/* Estimated delivery. Rendered only when the carrier actually gave us one. */
.hpt-eta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
	margin: 0 0 20px;
	padding: 14px 16px;
	border-radius: var(--hpt-radius-sm);
	background: var(--hpt-sunk);
	border: 1px solid var(--hpt-line-soft);
}

.hpt-eta__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--hpt-muted);
	width: 100%;
}

.hpt-eta__value {
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--hpt-ink);
}

.hpt-eta__src {
	font-size: 12.5px;
	color: var(--hpt-faint);
}

/* Lookup: two methods in one card, split by an OR rule. */
.hpt-lookup {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
	padding: 0;
	overflow: hidden;
}

.hpt-lookup__col {
	padding: 24px 22px;
}

.hpt-lookup__or {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 22px 4px;
}

.hpt-lookup__or::before {
	content: "";
	position: absolute;
	left: 22px;
	right: 22px;
	top: 50%;
	height: 1px;
	background: var(--hpt-line);
}

.hpt-lookup__or span {
	position: relative;
	background: var(--hpt-surface);
	padding: 0 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hpt-faint);
}

.hpt-btn--block {
	width: 100%;
}

.hpt-form .hpt-h3 {
	margin-bottom: 14px;
}

.hpt-field {
	display: block;
	margin-bottom: 14px;
}

.hpt-field__label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--hpt-muted);
	margin-bottom: 6px;
}

.hpt-field input {
	width: 100%;
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming on focus */
	padding: 12px 14px;
	min-height: 48px;
	border: 1px solid var(--hpt-line);
	border-radius: var(--hpt-radius-sm);
	background: var(--hpt-surface);
	color: var(--hpt-ink);
}

.hpt-field input:focus {
	outline: none;
	border-color: var(--hpt-ink);
	box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.hpt-form button {
	width: 100%;
}

.hpt-form__note {
	margin: 12px 0 0;
	font-size: 12.5px;
	color: var(--hpt-faint);
	line-height: 1.5;
}

.hpt-form__result {
	margin: 12px 0 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--hpt-good);
}

.hpt-form__result:empty {
	margin: 0;
}

.hpt-alert {
	margin: 0 0 18px;
	padding: 14px 16px;
	border-radius: var(--hpt-radius-sm);
	font-size: 14.5px;
	line-height: 1.5;
}

.hpt-alert--warn {
	background: var(--hpt-warn-bg);
	color: var(--hpt-warn);
}

.hpt-alert--ok {
	background: var(--hpt-good-bg);
	color: var(--hpt-good);
}

@media (min-width: 720px) {
	.hpt-lookup {
		grid-template-columns: 1fr auto 1fr;
		align-items: stretch;
	}

	.hpt-lookup__col {
		padding: 30px 28px;
	}

	.hpt-lookup__or {
		flex-direction: column;
		padding: 30px 0;
	}

	.hpt-lookup__or::before {
		left: 50%;
		right: auto;
		top: 24px;
		bottom: 24px;
		height: auto;
		width: 1px;
	}

	.hpt-lookup__or span {
		padding: 12px 0;
	}
}

/* ------------------------------------------------------------------ */
/* My Account surfaces                                                 */
/* ------------------------------------------------------------------ */

.hpt-account {
	font-family: var(--hpt-font);
	margin: 18px 0 0;
	border: 1px solid #e7e7ea;
	border-radius: 14px;
	padding: 18px 18px 16px;
	background: #fff;
}

.hpt-account__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.hpt-account__title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: #9a9aa2;
	margin: 0;
}

.hpt-account__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 10px 0;
	border-top: 1px solid #f1f1f4;
}

.hpt-account__row:first-of-type {
	border-top: none;
}

.hpt-account__meta {
	min-width: 0;
}

.hpt-account__status {
	font-size: 15px;
	font-weight: 700;
	color: #111;
	letter-spacing: -0.01em;
	margin: 0;
}

.hpt-account__sub {
	font-size: 12.5px;
	color: #7a7a80;
	margin: 2px 0 0;
	word-break: break-all;
}

.hpt-chip {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 3px;
	background: #f7f7f9;
	color: #7a7a80;
	white-space: nowrap;
}

.hpt-chip--live {
	background: rgba(210, 2, 16, 0.09);
	color: #d20210;
}

.hpt-chip--done {
	background: #e8f5ef;
	color: #0a7d54;
}

.hpt-chip--alert {
	background: #fdf3e2;
	color: #8a5a00;
}

/* ------------------------------------------------------------------ */
/* Accessibility + motion                                              */
/* ------------------------------------------------------------------ */

.hpt :focus-visible,
.hpt-account :focus-visible {
	outline: 2px solid var(--hpt-red, #d20210);
	outline-offset: 2px;
	border-radius: 4px;
}

.hpt .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hpt-is-busy {
	opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
	.hpt * {
		transition: none !important;
		animation: none !important;
	}
}


/* ------------------------------------------------------------------ */
/* Phase 4: centred status, tighter rhythm, follow-up events           */
/* ------------------------------------------------------------------ */

/* The theme's page header already announces the page; the card starts close under it.
   Scoped to the tracking page's own body class so no other template shifts. */
.hpt { padding-top: 0; }

/* Pull the app up under the theme's page header. Done on our own element so
   nothing in the theme has to be overridden. */
.hpt-page .hpt { margin-top: -30px; }

@media (max-width: 719px) {
	.hpt-page .hpt { margin-top: -14px; }
}

.hpt-page .hpt__inner { padding-top: 4px; }

.hpt__summary-line {
	margin: 0 0 16px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--hpt-ink-2);
	text-align: center;
}

.hpt-packages > .hpt-package:first-child { margin-top: 0; }

/* --- Centred status block ----------------------------------------- */
.hpt-package__head {
	text-align: center;
	margin-bottom: 20px;
}

.hpt-status {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 6px;
}

.hpt-package__blurb {
	margin: 0 auto;
	max-width: 46ch;
}

.hpt-package__index {
	text-align: center;
}

.hpt-eta {
	justify-content: center;
	text-align: center;
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
}

.hpt-eta__label { text-align: center; }

/* --- Follow-up (non-logistics) carrier events --------------------- */
.hpt-chip {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	border-radius: var(--hpt-pill);
	background: var(--hpt-sunk);
	border: 1px solid var(--hpt-line);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hpt-faint);
	vertical-align: 2px;
	white-space: nowrap;
}

.hpt-event.is-followup .hpt-event__text {
	color: var(--hpt-muted);
}
