/* ============================================================
   Door2Door Laundry — track-order.css
   Place in: css/track-order.css
   ============================================================ */

/* ── CSS Variables (mirrors home.css palette) ── */
:root {
  --teal:        #42BABC;
  --teal-dark:   #2e9a9c;
  --teal-light:  #e8f9f9;
  --teal-soft:   rgba(66,186,188,0.12);
  --text-dark:   #1a2332;
  --text-mid:    #4a5568;
  --text-light:  #8a97a8;
  --bg:          #f8fafb;
  --white:       #ffffff;
  --border:      #e8ecf0;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.10);
  --shadow-teal: 0 8px 28px rgba(66,186,188,0.22);

  /* Status colours */
  --s-pending:   #f59e0b;
  --s-confirmed: #3b82f6;
  --s-picked:    #8b5cf6;
  --s-process:   #ec4899;
  --s-delivery:  #f97316;
  --s-delivered: #22c55e;
  --s-cancelled: #ef4444;
}

/* ── Utilities ── */
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.wrap    { max-width:860px; margin:0 auto; padding:0 20px; }

/* ── Body base ── */
body { background: var(--bg); font-family: 'DM Sans', sans-serif; color: var(--text-dark); margin:0; }

/* ════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════ */
.track-main { min-height: 100vh; }

.track-hero {
  position: relative;
  background: linear-gradient(135deg, #1a2d3d 0%, #0f2235 60%, #0a3540 100%);
  padding: 100px 20px 64px;
  text-align: center;
  overflow: hidden;
}

.track-hero-inner { position: relative; z-index: 2; }

/* chip — same as home.css .chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(66,186,188,0.15);
  border: 1px solid rgba(66,186,188,0.35);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.chip-dot {
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.4)} }

.track-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.15;
}
.track-hero-title em { color: var(--teal); font-style: italic; }

.track-hero-sub {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* floating bubbles */
.h-bubble {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(66,186,188,0.2);
  pointer-events: none;
}
.hb1 { width:220px;height:220px; top:-60px; right:-60px; }
.hb2 { width:140px;height:140px; bottom:-30px; left:5%; opacity:.6; }
.hb3 { width:80px;height:80px; top:30%; left:8%; opacity:.4; }

/* ════════════════════════════════════════════════════
   TRACK BODY
════════════════════════════════════════════════════ */
.track-body {
  padding: 48px 0 72px;
}

/* ── Search Card ── */
.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 28px;
}

.search-card-inner {
  padding: 40px 40px 32px;
  text-align: center;
}

.search-icon-wrap {
  width: 60px; height: 60px;
  background: var(--teal-soft);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  color: var(--teal);
}

.search-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 8px;
}

.search-sub {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0 0 28px;
}

.search-row {
  display: flex;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.search-field-wrap {
  position: relative;
  flex: 1;
}

.input-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px 0 34px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  letter-spacing: 0.02em;
}
.search-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(66,186,188,0.15);
  background: var(--white);
}
.search-input::placeholder { color: var(--text-light); font-weight: 400; }

.btn-track {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 24px;
  height: 52px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: var(--shadow-teal);
}
.btn-track:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-track:active { transform: translateY(0); }
.btn-track:disabled { opacity:.65; cursor:not-allowed; transform:none; }

.spinner {
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.search-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 14px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.my-orders-hint {
  background: var(--teal-light);
  border-top: 1px solid rgba(66,186,188,0.2);
  padding: 14px 40px;
  font-size: 0.88rem;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2e9a9c;
}
.link-btn {
  background: none; border: none; padding: 0;
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

/* ════════════════════════════════════════════════════
   RESULT PANEL
════════════════════════════════════════════════════ */
.result-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: slideUp .4s ease;
}
@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }

/* ── Result Header ── */
.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 36px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.result-order-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 8px;
}

.result-service {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 4px;
}

.result-placed {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

/* Status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}
.status-pill.s-pending   { background:#fffbeb; color:var(--s-pending); }
.status-pill.s-confirmed { background:#eff6ff; color:var(--s-confirmed); }
.status-pill.s-picked_up { background:#f5f3ff; color:var(--s-picked); }
.status-pill.s-in_process{ background:#fdf2f8; color:var(--s-process); }
.status-pill.s-out_for_delivery{ background:#fff7ed; color:var(--s-delivery); }
.status-pill.s-delivered { background:#f0fdf4; color:var(--s-delivered); }
.status-pill.s-cancelled { background:#fef2f2; color:var(--s-cancelled); }
.status-pill.s-delivered::before,
.status-pill.s-cancelled::before { animation:none; }

/* ── Timeline ── */
.timeline-wrap {
  padding: 36px 36px 28px;
  background: linear-gradient(to bottom, #fafcfc, var(--white));
  border-bottom: 1px solid var(--border);
}

.timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  gap: 0;
}

/* connecting line behind steps */
.timeline::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.step-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--border);
  background: var(--white);
  color: var(--text-light);
  transition: all .35s ease;
  position: relative;
}

.step-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
  line-height: 1.3;
  transition: color .3s;
  max-width: 70px;
}

/* Active step */
.timeline-step.active .step-dot {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(66,186,188,0.18);
  animation: dotPulse 2.2s infinite;
}
@keyframes dotPulse {
  0%,100%{ box-shadow: 0 0 0 5px rgba(66,186,188,0.18); }
  50%    { box-shadow: 0 0 0 9px rgba(66,186,188,0.06); }
}
.timeline-step.active .step-label { color: var(--teal); font-weight: 700; }

/* Completed step */
.timeline-step.done .step-dot {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}
.timeline-step.done .step-label { color: var(--teal-dark); }

/* Cancelled step */
.timeline-step.cancelled .step-dot {
  border-color: var(--s-cancelled);
  background: #fef2f2;
  color: var(--s-cancelled);
}
.timeline-step.cancelled .step-label { color: var(--s-cancelled); }

/* Filled progress line */
.timeline-step.done + .timeline-step::before,
.timeline-step.active + .timeline-step::before {
  content: '';
  position: absolute;
  top: 20px;
  right: 50%;
  left: calc(-50% + 0px);
  height: 2px;
  background: var(--teal);
  z-index: 0;
  transform: translateY(-1px);
}

/* ── Details Grid ── */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 28px 36px;
  border-bottom: 1px solid var(--border);
}

.detail-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.detail-icon {
  width: 36px; height: 36px;
  background: var(--teal-soft);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  flex-shrink: 0;
}

.detail-body { display: flex; flex-direction: column; gap: 3px; }

.detail-label {
  font-size: 0.73rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
}

/* ── Note row ── */
.note-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 36px;
  background: #fffbf0;
  border-bottom: 1px solid #fde68a44;
  color: #92400e;
  font-size: 0.88rem;
  line-height: 1.5;
}
.note-row svg { flex-shrink: 0; margin-top: 2px; }

/* ── Result Actions ── */
.result-actions {
  display: flex;
  gap: 12px;
  padding: 24px 36px;
  flex-wrap: wrap;
}

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-mid);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-ghost-sm:hover { border-color: var(--teal); color: var(--teal); }

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--teal);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-primary-sm:hover { background: var(--teal-dark); transform: translateY(-1px); }

/* ════════════════════════════════════════════════════
   MY ORDERS LIST
════════════════════════════════════════════════════ */
.orders-list-panel {
  animation: slideUp .4s ease;
}

.orders-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.orders-list-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 4px;
}

.orders-list-sub {
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 0;
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

/* Order card */
.order-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .2s, border-color .2s, transform .2s;
  cursor: pointer;
}
.order-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
  transform: translateY(-3px);
}

.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.order-card-id {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.order-card-service {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-dark);
  margin: 2px 0 0;
}

.order-card-item {
  font-size: 0.83rem;
  color: var(--text-light);
}

.order-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-mid);
}

.order-card-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.order-card-amount {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.95rem;
}

/* ════════════════════════════════════════════════════
   CTA BAND
════════════════════════════════════════════════════ */
.track-cta {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  padding: 40px 20px;
}

.track-cta-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.track-cta h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: #fff;
  margin: 0 0 6px;
}
.track-cta p {
  color: rgba(255,255,255,0.75);
  margin: 0;
  font-size: 0.92rem;
}

.track-cta-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-cta-call, .btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s;
}
.btn-cta-call {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
}
.btn-cta-call:hover, .btn-whatsapp:hover { transform: translateY(-2px); }

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .track-hero { padding: 80px 16px 48px; }

  .search-card-inner { padding: 28px 20px 22px; }
  .search-row { flex-direction: column; }
  .btn-track { justify-content: center; }
  .my-orders-hint { padding: 12px 20px; flex-wrap: wrap; }

  .result-header { padding: 22px 20px 18px; }
  .timeline-wrap { padding: 24px 16px 20px; overflow-x: auto; }
  .timeline { min-width: 480px; }
  .step-label { font-size: 0.65rem; }

  .details-grid { padding: 20px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .detail-card { padding: 12px; }

  .note-row { padding: 14px 20px; }
  .result-actions { padding: 18px 20px; }

  .orders-grid { grid-template-columns: 1fr; }

  .track-cta-inner { text-align: center; justify-content: center; }
}

@media (max-width: 400px) {
  .details-grid { grid-template-columns: 1fr; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .chip-dot, .status-pill::before, .timeline-step.active .step-dot { animation: none; }
  .result-panel, .orders-list-panel { animation: none; }
}
/* Add to css/track-order.css */
.result-payment-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  flex-wrap: wrap;
}
.status-pill.s-paid          { background:#dcfce7; color:#16a34a; }
.status-pill.s-pending-pay   { background:#fef3c7; color:#b45309; }
.status-pill.s-failed        { background:#fee2e2; color:#dc2626; }
.status-pill.s-cod           { background:#e0f2fe; color:#0369a1; }
.payment-method-note         { font-size: 0.8rem; color: var(--text-light); }

#rDownloadBillBtn { display: inline-flex; }