/* Corsio: the package tracking page (/tracking, /tracking/{BATCH}-{ORDER}), 2026-10-28.
   Loaded after /site.css by tracking.html only; it reuses the theme's tokens, page hero, buttons and the
   check-pricing form (.cp-form, .cp-row, .cp-field, .cp-status). */

/* ---------- Hero ---------- */
.page-hero.tk-hero::before { display: none; } /* the arc lives in .hero-art */
.tk-hero-body { padding-top: 56px; padding-bottom: 64px; }
.tk-form { margin-top: 4px; max-width: 640px; }
.tk-form input { text-transform: uppercase; letter-spacing: 1px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; }
.tk-form input::placeholder { text-transform: none; letter-spacing: 1px; }

.tk-number { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-size: 14px; color: var(--on-dark-muted); }
.tk-number strong { color: #FFFFFF; font-size: 15px; letter-spacing: 1px; }
.tk-number a { display: inline-flex; align-items: center; min-height: 44px; color: var(--yellow); font-weight: 700; text-underline-offset: 3px; }
.tk-head h1 { margin: 6px 0 12px; outline: none; }
.tk-head .lead { margin-bottom: 0; }
.tk-hero.tone-done .tk-head h1::before { content: ""; display: inline-block; width: 0.78em; height: 0.78em; margin-right: 0.28em; vertical-align: -0.05em; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 62% no-repeat; }

/* The arrival time and the stops road side by side (stacked on phones). */
.tk-glance { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 20px; align-items: stretch; margin-top: 32px; }
.tk-glance > :only-child { grid-column: 1 / -1; max-width: 520px; }
.tk-eta { display: flex; flex-direction: column; gap: 2px; min-width: 260px; padding: 20px 24px 22px; border-radius: 22px; background: var(--panel); border: 1px solid var(--panel-line); }
.tk-eta-label { font-size: 14px; font-weight: 600; color: var(--on-dark-muted); }
.tk-eta-day { font-size: 17px; font-weight: 600; color: #FFFFFF; }
.tk-eta-time { margin-top: 4px; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; font-weight: 900; letter-spacing: -1px; color: var(--yellow); font-variant-numeric: tabular-nums; }

.tk-road { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 20px 24px; border-radius: 22px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--panel-line); }
.tk-road-count { margin: 0; font-size: 15px; font-weight: 600; color: var(--on-dark); }
.tk-road-line { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 48px; }
.tk-road-line::before { content: ""; position: absolute; left: 22px; right: 22px; top: 50%; border-top: 3px dotted #4B5563; transform: translateY(-50%); }
.tk-road-stop { position: relative; flex: none; width: 12px; height: 12px; border-radius: 50%; background: #6B7280; box-shadow: 0 0 0 4px var(--charcoal); }
.tk-road-more { position: relative; flex: none; padding: 2px 8px; border-radius: 999px; background: var(--charcoal); border: 1px solid #4B5563; font-size: 12px; font-weight: 700; color: var(--on-dark); }
.tk-road-end { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.tk-road-end svg { width: 22px; height: 22px; }
.tk-road-car { background: #2563EB; color: #FFFFFF; }
.tk-road-shop { background: #FFFFFF; color: var(--charcoal); }
.tk-road-home { background: #FFFFFF; color: var(--charcoal); box-shadow: 0 0 0 4px rgba(255, 196, 0, 0.35); }
.tk-road-ends { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--on-dark-muted); }

/* ---------- Map and details ---------- */
.tk-body { padding: 48px 0 24px; }
.tk-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.tk-map-wrap { position: relative; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--soft); box-shadow: 0 20px 50px rgba(17, 24, 39, 0.10); }
.tk-map { height: 560px; }
.tk-map-off { display: grid; place-items: center; height: 280px; padding: 24px; text-align: center; color: var(--muted); }
.tk-map-wrap:has(.tk-map-off:not([hidden])) .tk-map { display: none; }
.tk-chip { position: absolute; left: 16px; top: 16px; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(17, 24, 39, 0.92); color: #FFFFFF; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(17, 24, 39, 0.25); pointer-events: none; }
.tk-live { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: tk-pulse 2s ease-out infinite; }
.tk-chip.is-waiting .tk-live { background: #9CA3AF; animation: none; }
@keyframes tk-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); } 80%, 100% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); } }

.tk-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 4px 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.tk-legend li { display: flex; align-items: center; gap: 8px; }
.tk-key { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #FFFFFF; box-shadow: 0 0 0 1px var(--line); }
.tk-key-shop { background: var(--charcoal); }
.tk-key-home { background: var(--yellow); }
.tk-key-car { background: #2563EB; }
.tk-checked { margin: 6px 4px 0; font-size: 13px; color: var(--muted); }

/* Map pins (HTML overlays, centred on their point). */
.tk-pin { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #FFFFFF; box-shadow: 0 6px 18px rgba(17, 24, 39, 0.30); pointer-events: none; }
.tk-pin svg { width: 22px; height: 22px; }
.tk-pin-shop { background: var(--charcoal); color: var(--yellow); }
.tk-pin-home { background: var(--yellow); color: var(--charcoal); width: 50px; height: 50px; z-index: 2; }
.tk-pin-home svg { width: 25px; height: 25px; }
.tk-pin-car { background: #2563EB; color: #FFFFFF; z-index: 3; }
.tk-pin-car::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid rgba(37, 99, 235, 0.45); animation: tk-ring 2.4s ease-out infinite; }
@keyframes tk-ring { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.tk-pin-done { background: var(--green); color: #FFFFFF; }
.tk-pin-label { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 9px; border-radius: 999px; background: var(--charcoal); color: #FFFFFF; font-size: 12px; font-weight: 700; white-space: nowrap; }

.tk-side { display: grid; gap: 16px; }
.tk-card { padding: 22px 24px; border-radius: 22px; border: 1px solid var(--line); background: #FFFFFF; }
.tk-card-title { margin: 0 0 4px; font-size: 18px; line-height: 1.3; letter-spacing: -0.2px; font-weight: 800; color: var(--charcoal); text-wrap: wrap; }
.tk-card-text { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.tk-tip-head .tk-card-text { margin: 0; }

/* Progress: a vertical line through 4 markers. */
.tk-steps { margin: 14px 0 0; padding: 0; list-style: none; }
.tk-steps li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; padding-bottom: 18px; }
.tk-steps li:last-child { padding-bottom: 0; }
.tk-steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.tk-steps li.done:not(:last-child)::after { background: var(--green); }
.tk-mark { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #D1D5DB; background: #FFFFFF; }
.tk-mark svg { width: 15px; height: 15px; }
.tk-steps .done .tk-mark { border-color: var(--green); background: var(--green); color: #FFFFFF; }
.tk-steps .now .tk-mark { border-color: var(--yellow); background: var(--yellow); box-shadow: 0 0 0 5px rgba(255, 196, 0, 0.25); }
.tk-steps .now .tk-mark::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--charcoal); }
.tk-steps .warn .tk-mark { border-color: #B45309; background: #FEF3C7; color: #92400E; font-weight: 900; font-size: 15px; }
.tk-step-label { font-weight: 700; color: var(--charcoal); line-height: 28px; }
.tk-steps .next .tk-step-label { color: var(--muted); font-weight: 600; }
.tk-step-time { font-size: 14px; color: var(--muted); }

/* Tip: on purpose a button that does nothing yet (Soroush: "dont make the tip button work"). */
.tk-tip { background: var(--cream); border-color: var(--cream-line); }
.tk-tip-head { display: flex; align-items: center; gap: 14px; }
.tk-jar { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--yellow); color: var(--charcoal); }
.tk-tip-btn { width: 100%; margin-top: 16px; background: var(--charcoal); color: #FFFFFF; cursor: default; }
.tk-tip-btn:hover { background: var(--charcoal); }
.tk-tip-btn svg { color: var(--yellow); }
.tk-tip-note { margin: 10px 0 0; font-size: 13px; font-weight: 600; text-align: center; color: var(--amber-text); }
.tk-tip-note.is-poked { animation: tk-poke 0.4s ease; }
@keyframes tk-poke { 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }

.tk-where { display: grid; gap: 14px; margin: 0; }
.tk-where div { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
.tk-where dt { font-size: 13px; font-weight: 700; color: var(--muted); line-height: 24px; }
.tk-where dd { margin: 0; display: flex; flex-direction: column; color: var(--ink); }
.tk-where dd span { font-size: 14px; color: var(--muted); }

/* How tracking works (always at the bottom). */
.tk-how { padding: 72px 0 88px; }
.tk-how-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 28px 0 0; padding: 0; list-style: none; }
.tk-how-list li { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border-radius: 22px; background: var(--soft); }
.tk-how-list strong { font-size: 17px; color: var(--charcoal); }
.tk-how-list span { color: var(--muted); }

/* Loading: the submit button waits. */
.tk-form.is-busy .btn { opacity: 0.75; cursor: progress; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .tk-grid { grid-template-columns: minmax(0, 1fr); }
  .tk-map { height: 420px; }
  .tk-how-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tk-hero-body { padding-top: 36px; padding-bottom: 40px; }
  .tk-glance { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 24px; }
  .tk-eta { min-width: 0; }
  .tk-body { padding-top: 24px; }
  .tk-map { height: 360px; }
  .tk-map-wrap { border-radius: 22px; }
  .tk-card { padding: 20px; }
  .tk-how { padding: 56px 0 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-live, .tk-pin-car::after, .tk-tip-note.is-poked { animation: none; }
}
@media print {
  .tk-form, .tk-tip, .tk-how, .tk-chip { display: none !important; }
}
