/* ============================================================================
   UNITEX shipment tracking — page styles.
   Loads ON TOP of the site stylesheet (../css/styles.css); only tracking-
   specific rules and a few scoped overrides live here.
   ========================================================================== */

/* Soft blue-gray field behind the cards (only on this page). */
body { background: #eaeff5; }
main { padding-bottom: 64px; }

/* keep the mobile nav dropdown above the form card that overlaps the hero band */
.navbar { position: relative; z-index: 60; }

/* --- hero band (brand green-to-blue, like the contact section) --- */
.track-hero {
  background-image: linear-gradient(to right, #7fc645 0%, #44ab88 50%, #3fa98e 51%, #048ed2 100%);
  color: #fff;
  padding: 56px 0 104px;
  text-align: center;
}
.track-hero .eyebrow { color: #eafff0; }
.track-hero .eyebrow::before { background-image: radial-gradient(circle, #fff 50%, transparent 52%); }
.track-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 40px); margin: 0 0 12px; }
.track-hero p  { color: rgba(255,255,255,.94); max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

/* --- lookup form card (overlaps the band) --- */
.track-wrap { max-width: 600px; margin: -72px auto 0; padding: 0 1.5rem; position: relative; z-index: 2; }
.track-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgba(20,40,70,.17), 0 5px 14px rgba(20,40,70,.09);
  padding: 20px;
}
.track-card .lead { margin: 0 0 12px; color: var(--slate); font-size: .92rem; }
.track-card .form-field { margin-bottom: 11px; }
.track-card .form-field label {
  display: block; font-size: .9rem; font-weight: 600; color: var(--ink); margin-bottom: .3em;
}
.track-card .form-field input {
  width: 100%; font-family: var(--font-body); font-size: .95rem; color: var(--ink);
  padding: .5em .7em; border: 1px solid #cdd5df; border-radius: var(--radius);
  background: var(--surface-alt); transition: border-color .2s, box-shadow .2s;
}
.track-card .form-field input:focus {
  outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(28,90,168,.15); background: #fff;
}
.track-card .form-hint { font-size: .84rem; color: #3a4453; margin: 6px 0 0; line-height: 1.45; }
.track-card .btn--blue { width: 100%; margin-top: 6px; }

/* --- notices (error / not-found) --- */
.track-note { max-width: 600px; margin: 18px auto 0; padding: 14px 16px; border-radius: var(--radius); font-size: .98rem; }
.track-note.err  { background: #fbdede; color: #a12b2b; border: 1px solid #f3bcbc; }
.track-note.info { background: #e2ecf8; color: #15457f; border: 1px solid #c4d6ee; }

/* --- result card --- */
.track-result { max-width: 600px; margin: 26px auto 0; padding: 0 1.5rem; }
.result-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-blue);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(20,40,70,.17), 0 5px 14px rgba(20,40,70,.09);
  padding: 26px;
}
.result-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.result-ref { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--ink); }
.result-meta { color: var(--slate); font-size: .95rem; margin: 0 0 20px; }

/* --- status pills --- */
.pill {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: .7rem; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.pill.info    { background: #dceaf7; color: #15457f; }
.pill.good    { background: #e2f2d4; color: #3f6d16; }
.pill.work    { background: #fbe9cf; color: #8a5412; }
.pill.neutral { background: #e7ebf0; color: #41505f; }
.pill.bad     { background: #fbdede; color: #a12b2b; }
.pill.pill--solid  { color: #fff; }
.pill--solid.info    { background: var(--brand-blue); }
.pill--solid.good    { background: var(--brand-green-dark); }
.pill--solid.work    { background: #b5771a; }
.pill--solid.neutral { background: #5b6878; }
.pill--solid.bad     { background: #a12b2b; }

/* --- timeline (two columns: when | status + note) --- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 14px 26px;
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start;
}
.timeline li::before {
  content: ""; position: absolute; left: 3px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: #c3ccd6; border: 2px solid #fff; box-shadow: 0 0 0 1px #c3ccd6;
}
.timeline li.now::before { background: var(--brand-green); box-shadow: 0 0 0 3px rgba(111,181,45,.3); }
.timeline li::after {
  content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--brand-blue); opacity: .22;
}
.timeline li:last-child::after { display: none; }
.tl-when { display: flex; flex-direction: column; gap: 1px; }
.tl-date { font-weight: 700; color: var(--ink); font-size: .84rem; line-height: 1.3; }
.tl-time { color: var(--slate); font-size: .82rem; }
.tl-loc  { color: #45505f; font-size: .82rem; margin-top: 3px; line-height: 1.35; }
.tl-body { min-width: 0; }
.tl-pill { align-self: start; }
.tl-note { color: #33404f; font-size: .9rem; white-space: pre-wrap; line-height: 1.35; margin-top: 5px; }
.muted   { color: var(--slate); }

/* --- small screens --- */
@media (max-width: 640px) {
  .track-hero { padding: 40px 0 88px; }
  .track-wrap, .track-result, .track-note { padding-left: 1rem; padding-right: 1rem; }
  .track-card { padding: 22px; }
}

/* --- two-column result layout (form + status | history) --- */
.track-layout {
  max-width: 1080px; margin: -72px auto 0; padding: 0 1.5rem; position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start;
}
.track-col-left { display: flex; flex-direction: column; gap: 22px; }

/* status summary card (left) */
.status-card {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--brand-blue);
  border-radius: 14px; box-shadow: 0 18px 44px rgba(20,40,70,.17), 0 5px 14px rgba(20,40,70,.09);
  padding: 22px;
}
.status-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.status-card__eyebrow { font-size: .84rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-blue); }
.status-pending { color: var(--slate); font-size: .9rem; font-style: italic; }
.status-ref { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--ink); line-height: 1.15; }
.status-awb { color: #33404f; font-size: 1.02rem; font-weight: 600; margin-top: 5px; }
.status-desc { color: var(--ink); font-size: .9rem; line-height: 1.5; margin-top: 8px; white-space: pre-wrap; }
.status-sep { height: 1px; background: var(--line); border: 0; margin: 16px 0; }
.status-note { color: var(--ink); font-size: .95rem; line-height: 1.5; margin-top: 0; white-space: pre-wrap; }

/* tracking history card (right) */
.history-card {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--brand-blue);
  border-radius: 14px; box-shadow: 0 18px 44px rgba(20,40,70,.17), 0 5px 14px rgba(20,40,70,.09);
  padding: 24px 26px;
}
.history-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); margin: 0 0 18px; }

@media (max-width: 880px) {
  .track-layout { grid-template-columns: 1fr; max-width: 600px; gap: 20px; }
}
@media (max-width: 640px) {
  .track-layout { padding-left: 1rem; padding-right: 1rem; }
  .status-card, .history-card { padding: 20px; }
  .timeline li { grid-template-columns: 108px minmax(0, 1fr); gap: 12px; }
}

/* phone-only: stack each history entry vertically for full-width status + note */
@media (max-width: 480px) {
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding: 0 0 16px 24px; }
  .tl-when { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
  .tl-time::before { content: "·"; color: var(--muted); margin-right: 4px; }
  .tl-loc { width: 100%; margin-top: 1px; }
  .tl-pill { margin-top: 4px; }
  .tl-note { margin-top: 4px; }
}
