/* ══════════════════════════════════════════
   BlueRoute — Track & Trace Page CSS
   assets/css/tracking-page.css
══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0d1f3c;
  --navy-light: #1a3260;
  --gold:       #b8942a;
  --white:      #ffffff;
  --gray:       #6b7280;
  --gray-light: #f5f7fa;
  --gray-mid:   #e5e7eb;
  --text:       #1e293b;
  --green:      #10b981;
  --amber:      #f59e0b;
  --red:        #ef4444;
  --blue:       #3b82f6;
}

html, body {
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: #6b7e9a;
}

/* ══════════════════
   HEADER
══════════════════ */
.tp-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: transparent;
}

.tp-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.tp-logo-icon {
  background: var(--white);
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-weight: 700;
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.tp-home-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  font-size: 1rem;
  backdrop-filter: blur(4px);
  transition: background .25s;
}

.tp-home-btn:hover { background: rgba(255,255,255,.35); }

/* ══════════════════
   HERO SECTION
══════════════════ */
.tp-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 5% 40px;
  gap: 40px;
  flex-wrap: wrap;
}

/* Left: illustration + heading */
.tp-illustration {
  flex: 1 1 380px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.tp-hero-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 20px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.tp-svg-wrap {
  margin-top: 10px;
}

.tp-svg {
  width: 100%;
  max-width: 400px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.25));
}

/* Right: search panel */
.tp-search-panel {
  flex: 0 0 360px;
  background: var(--white);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 16px 48px rgba(0,0,0,.2);
}

/* Radio buttons */
.tp-type-row {
  display: flex;
  gap: 24px;
  margin-bottom: 18px;
}

.tp-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  color: var(--gray);
  transition: color .2s;
}

.tp-radio input[type="radio"] { display: none; }

.tp-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gray-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s;
  flex-shrink: 0;
}

.tp-radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  opacity: 0;
  transition: opacity .2s;
}

.tp-radio.checked .tp-radio-dot,
.tp-radio input:checked ~ .tp-radio-dot {
  border-color: var(--blue);
}

.tp-radio.checked .tp-radio-dot::after,
.tp-radio input:checked ~ .tp-radio-dot::after {
  opacity: 1;
}

.tp-radio.checked { color: var(--text); }

/* Input wrap */
.tp-input-wrap {
  position: relative;
  margin-bottom: 16px;
  border: 1px solid var(--gray-mid);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}

.tp-input-wrap:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(13,31,60,.07);
}

.tp-input-icon {
  position: absolute;
  top: 12px;
  left: 12px;
  color: var(--gray);
  font-size: .85rem;
}

.tp-input-wrap textarea {
  width: 100%;
  padding: 10px 12px 10px 34px;
  border: none;
  outline: none;
  font-family: 'Outfit', sans-serif;
  font-size: .86rem;
  color: var(--text);
  resize: none;
  line-height: 1.6;
  min-height: 90px;
}

.tp-input-wrap textarea::placeholder { color: #9ca3af; }

/* Search button */
.tp-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background .25s, transform .15s;
}

.tp-search-btn:hover   { background: #2563eb; }
.tp-search-btn:active  { transform: scale(.98); }
.tp-search-btn:disabled { opacity: .7; cursor: not-allowed; }

/* Error */
.tp-error {
  margin-top: 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: .84rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ══════════════════
   RESULTS SECTION
══════════════════ */
.tp-results {
  background: var(--white);
  min-height: 100px;
  padding: 48px 5% 60px;
}

.tp-results-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Result card */
.tp-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
}

.tp-card-error {
  text-align: center;
  padding: 40px 24px;
  background: #fef2f2;
  border-color: #fca5a5;
}

.tpc-error-icon {
  font-size: 2.5rem;
  color: var(--red);
  margin-bottom: 14px;
}

.tp-card-error p { font-size: .9rem; color: var(--gray); }

/* Card header */
.tpc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--navy);
  gap: 12px;
  flex-wrap: wrap;
}

.tpc-ref {
  font-family: 'Outfit', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .5px;
}

.tpc-ref i { color: var(--gold); margin-right: 6px; }

.tpc-client {
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  margin-top: 4px;
}

.tpc-client i { margin-right: 4px; }

/* Status badges */
.tpc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .4px;
  flex-shrink: 0;
}

.status-transit    { background: #fef3c7; color: #92400e; }
.status-delivered  { background: #d1fae5; color: #065f46; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-pending    { background: #f3f4f6; color: #374151; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }

/* Meta grid */
.tpc-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--gray-mid);
}

.tpc-meta-item {
  padding: 16px 24px;
  border-right: 1px solid var(--gray-mid);
}

.tpc-meta-item:last-child { border-right: none; }

.tpc-meta-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 5px;
}

.tpc-meta-val {
  font-size: .88rem;
  color: var(--text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tpc-meta-val i { color: var(--navy); font-size: .8rem; }

.eta-note {
  font-size: .75rem;
  font-weight: 600;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
}

.eta-today { color: var(--blue); }
.eta-late  { color: var(--red);  }

/* Progress bar */
.tpc-progress-wrap {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-mid);
}

.tpc-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 8px;
}

.tpc-progress-bar {
  height: 8px;
  background: var(--gray-mid);
  border-radius: 4px;
  overflow: hidden;
}

.tpc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 4px;
  transition: width .6s ease;
}

/* Timeline */
.tpc-timeline-title {
  padding: 16px 24px 8px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tpc-timeline-title i { color: var(--gold); }

.tpc-timeline {
  padding: 8px 24px 24px 48px;
  position: relative;
}

.tpc-timeline::before {
  content: '';
  position: absolute;
  left: 36px;
  top: 0;
  bottom: 8px;
  width: 2px;
  background: var(--gray-mid);
}

.tl-item {
  position: relative;
  margin-bottom: 20px;
}

.tl-item:last-child { margin-bottom: 0; }

.tl-dot {
  position: absolute;
  left: -21px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gray-mid);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--gray-mid);
  transition: all .3s;
}

.tl-item.tl-done .tl-dot {
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}

.tl-item.tl-active .tl-dot {
  background: var(--navy);
  box-shadow: 0 0 0 2px var(--navy);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--navy); }
  50%       { box-shadow: 0 0 0 5px rgba(13,31,60,.25); }
}

.tl-event {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.tl-item.tl-done .tl-event  { color: var(--navy); }
.tl-item.tl-active .tl-event { color: var(--navy); }

.tl-meta {
  font-size: .75rem;
  color: var(--gray);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tl-meta i { font-size: .65rem; }

.tl-empty {
  font-size: .85rem;
  color: var(--gray);
  font-style: italic;
}

/* Notes */
.tpc-notes {
  margin: 0 24px 20px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: .83rem;
  color: #78350f;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ══════════════════
   FOOTER NOTE
══════════════════ */
.tp-footer-note {
  text-align: center;
  padding: 20px;
  font-size: .78rem;
  color: rgba(255,255,255,.65);
  background: rgba(0,0,0,.15);
}

.tp-footer-note a { color: var(--gold); text-decoration: none; }
.tp-footer-note a:hover { text-decoration: underline; }
.tp-footer-note i { margin-right: 4px; }

/* ══════════════════
   RESPONSIVE
══════════════════ */
@media (max-width: 700px) {
  .tp-hero {
    flex-direction: column;
    padding: 80px 5% 32px;
  }

  .tp-search-panel {
    flex: 0 0 auto;
    width: 100%;
  }

  .tp-svg { max-width: 280px; }

  .tpc-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tpc-meta-item {
    border-right: none;
    border-bottom: 1px solid var(--gray-mid);
  }
}

@media (max-width: 420px) {
  .tpc-meta-grid { grid-template-columns: 1fr; }
}