/* Embeddable order-tracker widget. Scoped under #order-tracker and namespaced
   with .otp- so it won't clash with your website's styles. Inherits the host
   page's font by default. */
#order-tracker {
  --otp-ink: #1b2733;
  --otp-muted: #6b7785;
  --otp-line: #e2e8f0;
  --otp-brand: #2563eb;
  --otp-brand-dark: #1d4ed8;
  --otp-done: #16a34a;
  --otp-danger: #dc2626;
  max-width: 560px;
  color: var(--otp-ink);
  box-sizing: border-box;
}
#order-tracker *, #order-tracker *::before, #order-tracker *::after { box-sizing: border-box; }

.otp-form { display: flex; flex-direction: column; gap: 16px; }
.otp-field { display: flex; flex-direction: column; gap: 6px; }
.otp-field label { font-weight: 600; font-size: .9rem; }
.otp-field label .otp-optional { font-weight: 400; color: var(--otp-muted); }
.otp-field input {
  padding: 12px 14px; font-size: 1rem; border: 1px solid var(--otp-line);
  border-radius: 10px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.otp-field input:focus {
  border-color: var(--otp-brand); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.otp-btn {
  margin-top: 4px; padding: 13px 18px; font: inherit; font-weight: 600;
  color: #fff; background: var(--otp-brand); border: 0; border-radius: var(--otp-btn-radius, 10px);
  cursor: pointer; transition: background .15s;
}
.otp-btn:hover { background: var(--otp-brand-dark); }
.otp-btn:disabled { opacity: .6; cursor: progress; }
.otp-error { margin: 4px 0 0; color: var(--otp-danger); font-size: .92rem; }
.otp-error[hidden] { display: none; }

.otp-result { margin-top: 28px; }
.otp-result[hidden] { display: none; }
.otp-card {
  border: 1px solid var(--otp-line); border-radius: 14px; padding: 24px;
}
.otp-summary { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: baseline; margin-bottom: 18px; }
.otp-order-no { font-size: 1.25rem; font-weight: 700; }
.otp-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; text-transform: capitalize;
  background: #eef2ff; color: var(--otp-brand-dark);
}
.otp-badge.otp-delivered { background: #dcfce7; color: #15803d; }
.otp-badge.otp-processing { background: #fef9c3; color: #a16207; }

.otp-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.otp-meta-label { font-size: .75rem; color: var(--otp-muted); text-transform: uppercase; letter-spacing: .03em; }
.otp-meta-value { font-weight: 600; }
.otp-meta-value a { color: var(--otp-brand); }

.otp-track-action { margin-top: 4px; }
.otp-track-link {
  display: inline-block; padding: 12px 20px; font-weight: 600; color: #fff;
  background: var(--otp-brand); border-radius: var(--otp-btn-radius, 10px); text-decoration: none;
  transition: background .15s;
}
.otp-track-link:hover { background: var(--otp-brand-dark); }
.otp-track-note { color: var(--otp-muted); font-size: .9rem; margin: 10px 0 0; }

.otp-timeline-title { font-size: 1rem; margin: 0 0 14px; }
.otp-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.otp-timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--otp-line); }
.otp-event { position: relative; padding: 0 0 22px 36px; }
.otp-event:last-child { padding-bottom: 0; }
.otp-dot { position: absolute; left: 2px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--otp-done); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--otp-line); }
.otp-event.otp-latest .otp-dot { background: var(--otp-brand); }
.otp-event-label { font-weight: 600; }
.otp-event-detail { color: var(--otp-muted); font-size: .92rem; }
.otp-event-time { color: var(--otp-muted); font-size: .82rem; margin-top: 2px; }

#order-tracker{--otp-brand:#3b2ae5;--otp-brand-dark:#160042;--otp-btn-radius:10px;}