/**
 * Pack N Ship Express — public tracking widget.
 * Dark teal/blue hero with an orange action button and a vertical timeline.
 */

.als-track-widget {
	--als-pub-bg: #1f4e6b;
	--als-pub-bg-2: #16384e;
	--als-pub-accent: #ed8936;
	--als-pub-accent-d: #dd7a26;
	--als-pub-ink: #1f2937;
	--als-pub-line: #e5e7eb;
	max-width: 720px;
	margin: 24px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--als-pub-ink);
}

/* Hero ------------------------------------------------------------------- */
.als-track-hero {
	background: linear-gradient( 160deg, var(--als-pub-bg) 0%, var(--als-pub-bg-2) 100% );
	border-radius: 16px;
	padding: 34px 28px 30px;
	text-align: center;
	box-shadow: 0 12px 30px rgba(15, 40, 58, .25);
}

.als-track-logo {
	max-height: 56px;
	width: auto;
	margin: 0 auto 14px;
	display: block;
	filter: brightness(0) invert(1);
	opacity: .95;
}

.als-track-title {
	color: #fff;
	font-size: 26px;
	font-weight: 800;
	margin: 0 0 20px;
	letter-spacing: .3px;
}

.als-track-form {
	display: flex;
	gap: 10px;
	max-width: 540px;
	margin: 0 auto;
}

#als-track-code {
	flex: 1;
	height: 52px;
	border: none;
	border-radius: 10px;
	padding: 0 18px;
	font-size: 16px;
	background: #fff;
	color: var(--als-pub-ink);
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
#als-track-code:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(237, 137, 54, .45);
}

.als-track-btn {
	height: 52px;
	padding: 0 30px;
	border: none;
	border-radius: 10px;
	background: var(--als-pub-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .18s, transform .18s;
	letter-spacing: .4px;
}
.als-track-btn:hover { background: var(--als-pub-accent-d); transform: translateY(-1px); }
.als-track-btn:disabled { opacity: .7; cursor: default; transform: none; }

.als-track-msg {
	min-height: 20px;
	margin: 14px 0 0;
	color: #ffd7b0;
	font-size: 14px;
	font-weight: 600;
}
.als-track-msg.err { color: #ffc1c1; }

/* Result card ------------------------------------------------------------ */
.als-track-result {
	margin-top: 22px;
	background: #fff;
	border: 1px solid var(--als-pub-line);
	border-radius: 14px;
	box-shadow: 0 6px 20px rgba(15, 40, 58, .08);
	overflow: hidden;
}

.als-tr-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 22px;
	background: #f6f8fa;
	border-bottom: 1px solid var(--als-pub-line);
}
.als-tr-code { font-size: 20px; font-weight: 800; color: var(--als-pub-bg); }
.als-tr-status {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .4px;
	color: #fff;
	background: var(--als-pub-accent);
}
.als-tr-status[data-slug="delivered"] { background: #1aa260; }
.als-tr-status[data-slug="dispatch"]  { background: #2563eb; }
.als-tr-status[data-slug="shipped"]   { background: #0ea5e9; }
.als-tr-status[data-slug="inprocess"] { background: #f59e0b; }

.als-tr-meta {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	border-bottom: 1px solid var(--als-pub-line);
}
.als-tr-meta .m {
	padding: 16px 18px;
	border-right: 1px solid var(--als-pub-line);
}
.als-tr-meta .m:last-child { border-right: none; }
.als-tr-meta .m .k {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #94a3b8;
	font-weight: 700;
	margin-bottom: 4px;
}
.als-tr-meta .m .v { font-size: 15px; font-weight: 700; color: var(--als-pub-ink); }

/* Timeline --------------------------------------------------------------- */
.als-tr-timeline { padding: 22px 26px 8px; }
.als-tr-timeline h4 {
	margin: 0 0 16px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #64748b;
}

.als-timeline { position: relative; margin: 0; padding: 0 0 0 26px; list-style: none; }
.als-timeline::before {
	content: "";
	position: absolute;
	left: 7px;
	top: 6px;
	bottom: 18px;
	width: 2px;
	background: linear-gradient( to bottom, var(--als-pub-accent), #cbd5e1 );
}
.als-timeline li {
	position: relative;
	padding: 0 0 22px 6px;
}
.als-timeline li::before {
	content: "";
	position: absolute;
	left: -26px;
	top: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #cbd5e1;
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px #cbd5e1;
}
.als-timeline li.is-latest::before {
	background: var(--als-pub-accent);
	box-shadow: 0 0 0 2px var(--als-pub-accent);
}
.als-tl-title { font-weight: 800; font-size: 15px; color: var(--als-pub-ink); }
.als-tl-date { font-size: 12px; color: #94a3b8; margin: 2px 0; font-weight: 600; }
.als-tl-loc { font-size: 13px; color: #475569; }
.als-tl-desc { font-size: 13px; color: #64748b; margin-top: 2px; }
.als-tl-empty { color: #94a3b8; font-size: 14px; padding: 4px 0 18px; }

@media (max-width: 560px) {
	.als-track-form { flex-direction: column; }
	.als-track-btn { width: 100%; }
	.als-tr-meta { grid-template-columns: repeat(2, 1fr); }
	.als-tr-meta .m:nth-child(2n) { border-right: none; }
}

/* ---- v1.2.0: external "track further" button ---- */
.als-tr-further { margin: 14px 0 4px; }
.als-further-btn {
	display: inline-flex; align-items: center; gap: 8px;
	background: #0f3a5f; color: #fff !important; text-decoration: none;
	padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: 14px;
	box-shadow: 0 6px 16px rgba(15,58,95,.25); transition: transform .12s ease, background .12s ease;
}
.als-further-btn:hover { background: #1d6fb8; transform: translateY(-1px); color:#fff !important; }
.als-further-btn::after { content: "→"; font-size: 16px; }
