/* =========================================================================
 * GlobeMarket — Order Tracking
 * ====================================================================== */

.egs-ot { --ot-line: var(--border); }
.egs-ot--account { margin: 0 0 30px; }

/* ---- hero / lookup ---- */
.egs-ot-hero { text-align: center; padding: 40px 20px 30px; }
.egs-ot-hero__in { max-width: 640px; margin: 0 auto; }
.egs-ot-hero__title { font-size: clamp(26px, 4vw, 38px); font-weight: 900; letter-spacing: -.02em; margin: 8px 0 8px; color: var(--text); }
.egs-ot-hero__sub { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.egs-ot-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.egs-ot-form input { flex: 1 1 200px; min-width: 0; padding: 13px 16px; border: 1.5px solid var(--border); border-radius: 12px; font-size: 14.5px; background: var(--surface); color: var(--text); }
.egs-ot-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.egs-ot-form .egs-ebtn { flex: 0 0 auto; gap: 8px; }
.egs-ot-form__msg { min-height: 18px; margin: 12px 0 0; font-size: 13.5px; font-weight: 600; }
.egs-ot-form__msg.is-err { color: #dc2626; }
.egs-ot-loading { text-align: center; color: var(--muted); padding: 30px; font-weight: 600; }

/* ---- result card ---- */
.egs-ot-result { max-width: 760px; margin: 8px auto 0; }
.egs-ot--account .egs-ot-card { margin: 0; }
.egs-ot-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh); overflow: hidden; }
.egs-ot-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px 26px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.egs-ot-card__ref { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--brand-600); }
.egs-ot-card__title { font-size: 20px; font-weight: 900; margin: 4px 0 0; color: var(--text); }
.egs-ot-card__eta { display: inline-flex; align-items: center; gap: 7px; margin: 10px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.egs-ot-card__eta svg { color: var(--brand-600); }

/* live badge */
.egs-ot-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #16a34a; white-space: nowrap; }
.egs-ot-live__dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: egs-ot-pulse 1.9s infinite; }
@keyframes egs-ot-pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
@media (prefers-reduced-motion: reduce) { .egs-ot-live__dot { animation: none; } }

/* ---- stepper (desktop: horizontal) ---- */
.egs-ot-steps { display: flex; list-style: none; margin: 0; padding: 28px 22px 22px; }
.egs-ot-step { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; min-width: 0; }
.egs-ot-step::before { content: ""; position: absolute; top: 18px; left: -50%; width: 100%; height: 3px; background: var(--ot-line); z-index: 0; }
.egs-ot-step::after { content: none; }
.egs-ot-step:first-child::before { display: none; }
.egs-ot-step.is-done::before, .egs-ot-step.is-current::before { background: var(--brand); }
.egs-ot-step__dot { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--ot-line); color: var(--muted); transition: .2s; }
.egs-ot-step.is-done .egs-ot-step__dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.egs-ot-step.is-current .egs-ot-step__dot { border-color: var(--brand); color: var(--brand-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.egs-ot-step__label { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.25; }
.egs-ot-step.is-todo .egs-ot-step__label { color: var(--muted); font-weight: 600; }
.egs-ot-step__time { font-size: 11px; color: var(--muted); }

/* ---- exception banner ---- */
.egs-ot-banner { display: flex; flex-direction: column; gap: 4px; margin: 22px 26px; padding: 16px 18px; border-radius: 14px; border: 1px solid; }
.egs-ot-banner strong { font-size: 15px; }
.egs-ot-banner span { font-size: 13.5px; }
.egs-ot-banner.is-muted { background: #f3f4f6; border-color: #e5e7eb; color: #374151; }
.egs-ot-banner.is-warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.egs-ot-banner.is-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ---- tracking number box ---- */
.egs-ot-trackbox { display: flex; align-items: center; gap: 14px; margin: 4px 26px 22px; padding: 14px 16px; border: 1.5px dashed var(--border); border-radius: 14px; background: var(--bg-soft); }
.egs-ot-trackbox__ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand-600); flex: 0 0 auto; }
.egs-ot-trackbox__meta { display: flex; flex-direction: column; min-width: 0; }
.egs-ot-trackbox__label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.egs-ot-trackbox__num { font-size: 15px; font-weight: 800; color: var(--text); word-break: break-all; }
.egs-ot-trackbox__btn { margin-left: auto; flex: 0 0 auto; gap: 7px; }

/* ---- order summary ---- */
.egs-ot-summary { padding: 0 26px 24px; }
.egs-ot-items { display: grid; gap: 12px; padding: 18px 0; border-top: 1px solid var(--border); }
.egs-ot-item { display: flex; align-items: center; gap: 12px; }
.egs-ot-item__img img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); display: block; }
.egs-ot-item__name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.egs-ot-item__name em { color: var(--muted); font-style: normal; font-weight: 600; }
.egs-ot-item__price { margin-left: auto; font-weight: 800; color: var(--text); font-size: 13.5px; white-space: nowrap; }
.egs-ot-foot { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--border); }
.egs-ot-foot__lbl { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 4px; }
.egs-ot-ship address { font-style: normal; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
.egs-ot-total { text-align: right; margin-left: auto; }
.egs-ot-total strong { font-size: 18px; font-weight: 900; color: var(--text); }

/* ---- responsive: vertical timeline ---- */
@media (max-width: 640px) {
	.egs-ot-steps { flex-direction: column; padding: 20px 22px 8px; }
	.egs-ot-step { flex: none; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; padding-bottom: 22px; }
	.egs-ot-step__dot { grid-row: 1 / span 2; }
	.egs-ot-step__label { align-self: end; }
	.egs-ot-step__time { align-self: start; }
	.egs-ot-step::before { content: none; }
	.egs-ot-step::after { content: ""; position: absolute; left: 18px; top: 38px; width: 3px; height: calc(100% - 38px); background: var(--ot-line); }
	.egs-ot-step:last-child { padding-bottom: 0; }
	.egs-ot-step:last-child::after { content: none; }
	.egs-ot-step.is-done::after { background: var(--brand); }
	.egs-ot-trackbox { flex-wrap: wrap; }
	.egs-ot-trackbox__btn { margin-left: 0; width: 100%; justify-content: center; }
	.egs-ot-foot { flex-direction: column; }
	.egs-ot-total { text-align: left; margin-left: 0; }
}
