/* ==========================================================
   Limka Knitters - Track order page styles
   (loads after style.css, which provides the header, footer,
    buttons and colour variables)
   ========================================================== */

[hidden] { display: none !important; }

/* ---------- Page banner ---------- */
.page-banner {
  background:
    radial-gradient(circle at 90% 0%, rgba(242, 169, 0, 0.18), transparent 45%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 22px 0 30px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 14px;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { color: #fff; font-weight: 500; }
.page-banner h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); line-height: 1.2; }
.page-banner p { margin-top: 4px; color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; }

.track-page { padding-top: 28px; padding-bottom: 70px; }
.loading { text-align: center; color: var(--muted); padding: 70px 0; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.card h2 { font-size: 1.08rem; color: var(--brand); margin-bottom: 8px; }
.card p { font-size: 0.92rem; }

/* ---------- Find an order ---------- */
.lookup { max-width: 640px; margin-left: auto; margin-right: auto; }
.lookup > p { color: var(--muted); margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.86rem; font-weight: 500; }
.field input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.94rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}
.field input:focus { border-color: var(--brand); }
.lookup .btn { font-family: inherit; cursor: pointer; }
.lookup .btn:disabled { opacity: 0.6; cursor: not-allowed; }
.hint { margin-top: 16px; font-size: 0.8rem; color: var(--muted); }
.form-error {
  background: #fdecea;
  color: #c0392b;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

/* ---------- Order header ---------- */
.head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }
.head-card h2 { font-size: 1.5rem; letter-spacing: 1px; margin: 2px 0 4px; }
.sub { color: var(--muted); font-size: 0.86rem; }

.pill {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 600;
}
.pill.pending_payment { background: #fff4d6; color: #8a6100; }
.pill.cancelled { background: #fdecea; color: #c0392b; }
.pill.done { background: #e6f4ea; color: #1e7e34; }

/* Overall progress */
.steps {
  list-style: none;
  margin: 24px 0 4px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.steps li {
  position: relative;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 34px;
}
.steps li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--border);
}
.steps li::after {
  content: "";
  position: absolute;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: var(--border);
}
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--text); }
.steps li.done::before { background: var(--brand); border-color: var(--brand); }
.steps li.done::after, .steps li.now::after { background: var(--brand); }
.steps li.now { color: var(--brand); font-weight: 600; }
.steps li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px rgba(242, 169, 0, 0.25); }
.steps.cancelled li::before { background: #fff; border-color: #e6b0aa; }
.steps.cancelled li::after { background: #f0d0cc; }

/* Estimated ready */
.eta {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--brand);
}
.eta-icon { flex-shrink: 0; margin-top: 2px; }
.eta strong { display: block; font-size: 1rem; }
.eta p { margin-top: 2px; font-size: 0.86rem; color: var(--text); }
.eta.ready { background: #e6f4ea; color: #1e7e34; }

.notice {
  background: #fff4d6;
  border: 1px solid #f0d98a;
  color: #6f5200;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.notice.bad { background: #fdecea; border-color: #f0b8b1; color: #962d22; }
.notice strong { display: block; margin-bottom: 2px; }

/* ---------- Layout ---------- */
.track-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.section-title { font-size: 1.1rem; color: var(--brand); margin-bottom: 14px; }

/* ---------- Items ---------- */
.t-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.t-item.dim { opacity: 0.6; }
.t-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.t-school { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--brand); }
.t-item h3 { font-size: 1.02rem; margin: 2px 0; }
.t-meta { font-size: 0.84rem; color: var(--muted); }

.src {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.src-stock { background: #eceff1; color: #546e7a; }
.src-tailored { background: #efe5fb; color: #6a3d9a; }
.src-nairobi { background: #e3eefc; color: #1a5fb4; }

.t-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px 20px;
  margin: 16px 0 4px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-alt);
}
.t-facts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.t-facts dd { margin: 2px 0 0; font-size: 0.94rem; font-weight: 600; }
.t-facts dd.soft { font-weight: 400; color: var(--muted); }

/* Per-item stages */
.stages { list-style: none; margin: 16px 0 0; padding: 0; }
.stages li {
  position: relative;
  padding: 0 0 14px 32px;
  font-size: 0.88rem;
  color: var(--muted);
}
.stages li:last-child { padding-bottom: 0; }
.stages li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--border);
}
.stages li::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 19px;
  bottom: -3px;
  width: 2px;
  background: var(--border);
}
.stages li:last-child::after { display: none; }
.stages li.done { color: var(--text); }
.stages li.done::before { background: var(--brand); border-color: var(--brand); }
.stages li.done::after { background: var(--brand); }
.stages li.now { color: var(--brand); font-weight: 600; }
.stages li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(242, 169, 0, 0.25); }
.stages li.finished { color: #1e7e34; font-weight: 600; }
.stages li.finished::before { background: #1e7e34; border-color: #1e7e34; }

.t-note {
  margin-top: 14px;
  padding: 10px 14px;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  background: #fffaf0;
  font-size: 0.86rem;
}

/* ---------- Side cards ---------- */
.side-card p { color: var(--text); }
.pickup-info {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}
.call-link {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}
.call-link:hover { background: var(--brand-dark); }
.live { margin-top: 14px; font-size: 0.76rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .track-grid { grid-template-columns: 1fr; }
  .track-grid aside { order: -1; }
}

@media (max-width: 600px) {
  .page-banner { padding: 16px 0 22px; }
  .card { padding: 18px 16px; }
  .field-row { grid-template-columns: 1fr; }
  .steps li { font-size: 0.68rem; padding-top: 32px; }
  .t-item { padding: 16px; }
}
