/* Order tracking page - layout based on the Track123 page (measured 2026-11-12), works for any store.
   Colors, corners, width and fonts come from the editor settings (tracking.js sets the --pt-* variables).
   Everything is scoped under .pt so it can't clash with the Shopify theme. */

/* Many Shopify themes hide every empty box (div:empty { display: none }). These are empty on purpose: the progress
   bar lines, the timeline dots and dashes, the OR divider, the loading dots, an item without a photo, a step without
   a date yet. Kept first so the rules below that hide some of them still win. */
.pt .pt-bar:empty, .pt .pt-event-dot:empty, .pt .pt-event-line:empty, .pt .pt-or-line:empty,
.pt .pt-loading span:empty, .pt .pt-step-date:empty { display: block; }
.pt .pt-item-img:empty { display: flex; }

.pt {
  --pt-bg: #fff;
  --pt-text: #000;
  --pt-muted: rgba(0, 0, 0, .65);
  --pt-line: rgba(0, 0, 0, .15);
  --pt-soft: rgba(0, 0, 0, .04);
  --pt-input-border: #000;
  --pt-accent: #000;             /* progress bar + timeline dot */
  --pt-accent-contrast: #fff;    /* icons on the accent color */
  --pt-button: #000;             /* TRACK buttons */
  --pt-button-text: #fff;
  --pt-error: #e00000;
  --pt-radius: 8px;              /* cards */
  --pt-btn-radius: 12px;
  --pt-input-radius: 8px;
  --pt-max: 1120px;
  --pt-heading-font: "Figtree", system-ui, sans-serif;
  --pt-body-font: "Inter", system-ui, sans-serif;
  max-width: var(--pt-max);
  margin: 0 auto;
  padding: 0 0 40px;
  background: var(--pt-bg);
  color: var(--pt-text);
  font-family: var(--pt-body-font);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: .1px;
  line-height: 1.5;
  box-sizing: border-box;
}
.pt *, .pt *::before, .pt *::after { box-sizing: border-box; }
.pt [hidden] { display: none !important; }
.pt a { color: inherit; text-decoration: underline; }

.pt-brand { display: flex; justify-content: center; padding: 28px 0 0; }
.pt-brand img { max-height: 56px; max-width: 240px; object-fit: contain; }
.pt-brand span { font: 700 24px var(--pt-heading-font); letter-spacing: -.01em; }
.pt-brand a { text-decoration: none; }

.pt-title {
  font-family: var(--pt-heading-font);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.018em;
  line-height: 1.3;
  text-align: center;
  margin: 40px 0;
}

/* ---------- Search form ---------- */
.pt-tabs { display: none; }

.pt-card {
  display: flex;
  justify-content: space-around;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius);
  padding: 64px 40px;
}
.pt-card.is-single { justify-content: center; }
.pt-form { width: 300px; }
.pt-field { margin: 0 0 16px; }
.pt-label { display: block; margin: 0 0 4px; font-size: 16px; }
.pt-input {
  display: block;
  width: 100%;
  height: 42px;
  padding: 12px;
  border: 1px solid var(--pt-input-border);
  border-radius: var(--pt-input-radius);
  background: var(--pt-bg);
  color: var(--pt-text);
  font: 500 13.33px var(--pt-body-font);
  letter-spacing: .2px;
  outline: none;
}
.pt-input:focus { box-shadow: 0 0 0 2px var(--pt-line); }
.pt-input.pt-has-error { border-color: var(--pt-error); }
.pt-error { color: var(--pt-error); font-size: 16px; margin-top: 4px; }

.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 44px;
  margin-top: 8px;
  padding: 13px 20px;
  border: 0;
  border-radius: var(--pt-btn-radius);
  background: var(--pt-button);
  color: var(--pt-button-text);
  font: 700 16px var(--pt-body-font);
  text-transform: uppercase;
  letter-spacing: -.5px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
  transition: opacity .15s;
}
.pt-btn:hover { opacity: .85; }
.pt-btn:disabled { opacity: .6; cursor: default; }

.pt-or {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 20px;
}
.pt-or-line { width: 1px; height: 50px; background: var(--pt-line); }
.pt-or-word { margin: 16px 0; font-size: 14px; color: var(--pt-muted); opacity: .5; }

.pt-below { margin: 24px 0 0; text-align: center; }
.pt-above { margin: 0 0 24px; text-align: center; }

/* ---------- Result area ---------- */
.pt-result { padding: 40px 0 0; }
.pt-result:empty { padding: 0; }
.pt-message { text-align: center; padding: 40px 0; }

.pt-loading { display: flex; justify-content: center; gap: 10px; padding: 60px 0; }
.pt-loading span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--pt-text); opacity: .25;
  animation: pt-blink 1s infinite ease-in-out;
}
.pt-loading span:nth-child(2) { animation-delay: .1s; }
.pt-loading span:nth-child(3) { animation-delay: .2s; }
.pt-loading span:nth-child(4) { animation-delay: .3s; }
.pt-loading span:nth-child(5) { animation-delay: .4s; }
@keyframes pt-blink { 0%, 100% { opacity: .2; transform: scale(1); } 40% { opacity: .7; transform: scale(1.25); } }

.pt-order-header { text-align: center; font-size: 20px; margin: 40px 0; }

.pt-packages { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: -16px 0 32px; }
.pt-packages-note { font-size: 14px; color: var(--pt-muted); }
.pt-select {
  min-width: 260px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--pt-input-border);
  border-radius: var(--pt-input-radius);
  background: var(--pt-bg);
  color: var(--pt-text);
  font: 500 14px var(--pt-body-font);
}

.pt-status-wrap { display: flex; flex-direction: column; align-items: center; margin: 0 0 40px; }
.pt-status {
  font-family: var(--pt-heading-font);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -.018em;
  line-height: 1.33;
  margin: 0;
  text-align: center;
}

/* ---------- Progress bar ---------- */
.pt-steps { display: flex; padding: 0 60px; margin: 24px 0 80px; }
.pt-step { position: relative; display: flex; align-items: flex-start; flex: 1 1 0; }
.pt-step:last-child { flex: 0 0 36px; }
.pt-dot {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pt-accent);
  color: var(--pt-accent);
  opacity: .3;
}
.pt-dot svg { width: 20px; height: 20px; }
.pt-step.is-done .pt-dot,
.pt-step.is-current .pt-dot { background: var(--pt-accent); color: var(--pt-accent-contrast); opacity: 1; }
.pt-bar {
  flex: 1;
  height: 8px;
  margin: 14px 8px 0;
  border-radius: 8px;
  background: var(--pt-accent);
  opacity: .15;
}
.pt-step.is-done .pt-bar { opacity: 1; }
.pt-step-text {
  position: absolute;
  top: 44px;
  left: 18px;
  width: 160px;
  transform: translateX(-50%);
  text-align: center;
}
.pt-step-name { margin: 16px 0 4px; line-height: 24px; }
.pt-step:not(.is-done):not(.is-current) .pt-step-name { color: var(--pt-muted); }
.pt-step-date { font-size: 16px; line-height: 20px; color: var(--pt-muted); }

/* ---------- Details + package info ---------- */
.pt-detail { display: flex; gap: 40px; padding: 40px 0 0; }
.pt-detail-left { flex: 675 1 0; min-width: 0; }
.pt-detail-right { flex: 405 1 0; min-width: 0; }
.pt-h2 {
  font-family: var(--pt-heading-font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.018em;
  line-height: 24px;
  margin: 0 0 32px;
}
.pt-h3 {
  font-family: var(--pt-heading-font);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.018em;
  line-height: 24px;
  margin: 0 0 16px;
}
.pt-note { margin: 0 0 24px; color: var(--pt-muted); }
.pt-tracking-line { margin: -16px 0 24px; font-size: 14px; color: var(--pt-muted); }
.pt-tracking-line b { color: var(--pt-text); font-weight: 600; }

.pt-timeline { display: flex; flex-direction: column; }
.pt-event { display: flex; }
.pt-event-head { position: relative; flex: 0 0 36px; }
.pt-event-dot {
  position: absolute;
  top: 10px; left: 3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pt-line);
}
.pt-event-line {
  position: absolute;
  top: 22px; bottom: -10px; left: 6px;
  border-left: 2px dashed var(--pt-line);
}
.pt-event:last-child .pt-event-line { display: none; }
.pt-event.is-latest .pt-event-dot { top: 7px; left: -1px; width: 16px; height: 16px; background: var(--pt-accent); }
.pt-event-body { display: flex; flex-direction: column; gap: 4px; padding: 0 0 16px; }
.pt-event-desc { font-size: 15px; line-height: 24px; }
.pt-event.is-latest .pt-event-desc { font-weight: 600; }
.pt-event-time { font-size: 12px; line-height: 20px; color: var(--pt-muted); }

.pt-info { display: flex; flex-direction: column; gap: 24px; }
.pt-map {
  position: relative;
  height: 280px;
  border-radius: var(--pt-radius);
  overflow: hidden;
  background: var(--pt-soft);
  z-index: 0;
}
.pt-map-frame { display: block; width: 100%; height: 100%; border: 0; }

.pt-facts { margin: 0; border: 1px solid var(--pt-line); border-radius: var(--pt-radius); }
.pt-fact { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; font-size: 14px; }
.pt-fact + .pt-fact { border-top: 1px solid var(--pt-line); }
.pt-fact dt { color: var(--pt-muted); }
.pt-fact dd { margin: 0; font-weight: 600; text-align: right; }

.pt-item { display: flex; gap: 12px; padding: 0 0 16px; }
.pt-item-img {
  flex: 0 0 60px;
  width: 60px; height: 60px;
  border: 1px solid var(--pt-line);
  border-radius: calc(var(--pt-radius) / 2);
  overflow: hidden;
  display: flex;
}
.pt-item-img img { width: 100%; height: 100%; object-fit: contain; }
.pt-item-main { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pt-item-title { line-height: 24px; }
.pt-item-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 4px; font-size: 14px; color: var(--pt-muted); }
.pt-item-weight { margin-left: 2px; }
.pt-chip { border: 1px solid var(--pt-line); border-radius: 4px; padding: 0 6px; line-height: 20px; color: var(--pt-text); }
.pt-reorder {
  align-self: flex-end;
  padding: 6px 20px;
  border: 1px solid var(--pt-input-border);
  border-radius: calc(var(--pt-btn-radius) / 3);
  background: var(--pt-bg);
  color: var(--pt-text);
  font: 500 14px var(--pt-body-font);
  cursor: pointer;
}
.pt-reorder:hover { background: var(--pt-soft); }

/* ---------- Custom sections (from the editor) ---------- */
.pt-sec-custom { padding: 48px 0 0; }
.pt-custom { max-width: 820px; margin: 0 auto; }
.pt-custom .pt-h2 { margin-bottom: 16px; }
.pt-align-center { text-align: center; }
.pt-custom-body { color: var(--pt-muted); line-height: 1.6; }
.pt-faq { border-top: 1px solid var(--pt-line); text-align: left; }
.pt-faq-item { border-bottom: 1px solid var(--pt-line); }
.pt-faq-item summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; list-style: none; position: relative; }
.pt-faq-item summary::-webkit-details-marker { display: none; }
.pt-faq-item summary::after { content: '+'; position: absolute; right: 4px; top: 14px; font-size: 20px; font-weight: 400; }
.pt-faq-item[open] summary::after { content: '−'; }
.pt-faq-a { padding: 0 0 16px; color: var(--pt-muted); line-height: 1.6; }
.pt-video { position: relative; padding-top: 56.25%; border-radius: var(--pt-radius); overflow: hidden; background: var(--pt-soft); }
.pt-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pt-embed { display: block; width: 100%; border: 0; }

/* ---------- Phone layout ---------- */
@media (max-width: 749px) {
  .pt { padding: 0 20px 40px; }
  .pt-title { margin: 24px 0 40px; }

  .pt-tabs { display: flex; margin: 0 0 32px; border-bottom: 1px solid var(--pt-line); }
  .pt-tab {
    flex: 1;
    padding: 16px 10px;
    border: 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    background: none;
    color: var(--pt-muted);
    font: 500 15px var(--pt-body-font);
    cursor: pointer;
  }
  .pt-tab.is-active { color: var(--pt-text); border-bottom-color: var(--pt-text); }

  .pt-card { display: block; border: 0; padding: 0; }
  .pt-or { display: none; }
  .pt-form { width: 100%; }
  .pt-form:not(.is-active) { display: none; }
  .pt-btn { width: 100%; }
  .pt-below { text-align: left; }

  .pt-status { font-size: 32px; }

  .pt-steps { padding: 0 30px; margin: 24px 0 72px; }
  .pt-step.is-mobile-hidden { display: none; }
  .pt-step.is-mobile-last { flex: 0 0 36px; }
  .pt-step.is-mobile-last .pt-bar { display: none; }
  .pt-step-text { width: 110px; }
  .pt-step-name { font-size: 14px; margin-top: 12px; line-height: 20px; }
  .pt-step-date { font-size: 14px; }

  .pt-detail { flex-direction: column; gap: 40px; padding-top: 16px; }
  .pt-h2 { margin-bottom: 24px; }
  .pt-sec-custom { padding-top: 40px; }
}
