/* A.Z TRADERS — storefront styles */

.page-track .page-main {
  padding-top: 0;
  background: #EDEAE3;
}

.af57-tr-hub {
  --tr-display: "Syne", "Bricolage Grotesque", system-ui, sans-serif;
  --tr-body: "Manrope", system-ui, sans-serif;
  --tr-teal: #0B5E5E;
  --tr-teal-deep: #042F2F;
  --tr-coral: #FF5E3A;
  --tr-gold: #E8C547;
  --tr-lime: #B8E986;
  --tr-ink: #0F1A1A;
  --tr-muted: #5C7575;
  --tr-paper: #FAFAF8;
  --tr-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tr-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tr-fluid-sm: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
  --tr-fluid-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  color: var(--tr-ink);
  max-width: 1140px;
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 4rem);
}

/* ── Banner ── */
.af57-tr-banner {
  margin-bottom: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, var(--tr-teal-deep), #0a5050 60%, #153838);
  color: #FAFAF8;
  box-shadow: 0 20px 56px rgba(4, 47, 47, 0.2);
}

.af57-tr-banner-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.af57-tr-eyebrow {
  margin: 0 0 0.35rem;
  font-family: var(--tr-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tr-coral);
}

.af57-tr-banner h1 {
  margin: 0 0 0.5rem;
  font-family: var(--tr-display);
  font-size: var(--tr-fluid-lg);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.af57-tr-banner h1 span {
  background: linear-gradient(120deg, var(--tr-gold), var(--tr-coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.af57-tr-dek {
  margin: 0;
  max-width: 46ch;
  font-size: var(--tr-fluid-sm);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
}

.af57-tr-banner-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.af57-tr-banner-badges > span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

.af57-tr-banner-badges strong {
  font-family: var(--tr-display);
  font-size: 0.95rem;
  color: var(--tr-gold);
}

.af57-tr-live em {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--tr-lime);
  box-shadow: 0 0 0 0 rgba(184, 233, 134, 0.6);
  animation: tr-pulse-ring 2s ease infinite;
}

@keyframes tr-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(184, 233, 134, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(184, 233, 134, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 233, 134, 0); }
}

/* ── Split pane ── */
.af57-tr-split {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}

/* Lookup pane */
.af57-tr-lookup {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.af57-tr-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: 1.25rem;
  background: var(--tr-paper);
  border: 1px solid rgba(11, 94, 94, 0.1);
  box-shadow:
    0 2px 0 rgba(11, 94, 94, 0.05),
    0 16px 40px rgba(4, 47, 47, 0.08);
}

.af57-tr-form header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.af57-tr-form-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, var(--tr-teal), #147878);
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.af57-tr-form header h2 {
  margin: 0 0 0.15rem;
  font-family: var(--tr-display);
  font-size: 1.05rem;
  font-weight: 800;
}

.af57-tr-form header p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--tr-muted);
}

.af57-tr-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.af57-tr-field label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tr-teal);
}

.af57-tr-field input {
  padding: 0.85rem 1rem;
  border: 2px solid rgba(11, 94, 94, 0.12);
  border-radius: 0.85rem;
  background: #fff;
  font: inherit;
  font-size: var(--tr-fluid-sm);
  color: var(--tr-ink);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.af57-tr-field input:focus {
  outline: none;
  border-color: var(--tr-teal);
  box-shadow: 0 0 0 4px rgba(11, 94, 94, 0.15);
}

.af57-tr-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tr-coral), #ff7a5c);
  color: #fff;
  font-family: var(--tr-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 94, 58, 0.35);
  transition: transform 0.3s var(--tr-spring), box-shadow 0.3s;
}

.af57-tr-submit svg { width: 1rem; height: 1rem; }

.af57-tr-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 94, 58, 0.45);
}

.af57-tr-submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

.af57-tr-form-note {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--tr-muted);
  text-align: center;
}

.af57-tr-route-preview {
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  background: rgba(11, 94, 94, 0.06);
  border: 1px dashed rgba(11, 94, 94, 0.15);
}

.af57-tr-route-preview p {
  margin: 0 0 0.65rem;
  font-family: var(--tr-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tr-muted);
}

.af57-tr-route-preview ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.af57-tr-route-preview li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tr-ink);
}

.af57-tr-route-preview li span {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(11, 94, 94, 0.12);
  font-family: var(--tr-display);
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--tr-teal);
}

/* Detail pane */
.af57-tr-detail {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-radius: 1.25rem;
  background: var(--tr-paper);
  border: 1px solid rgba(11, 94, 94, 0.1);
  box-shadow: 0 16px 48px rgba(4, 47, 47, 0.08);
  transition: background 0.4s, border-color 0.4s;
}

.af57-tr-detail--found {
  background: linear-gradient(165deg, #fff 0%, #f7fbfb 100%);
  border-color: rgba(11, 94, 94, 0.18);
}

.af57-tr-detail--miss {
  background: linear-gradient(165deg, #fff8f6, #fff);
  border-color: rgba(255, 94, 58, 0.25);
}

.af57-tr-detail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed rgba(11, 94, 94, 0.12);
}

.af57-tr-status-pill {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  margin-bottom: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 94, 58, 0.12);
  border: 1px solid rgba(255, 94, 58, 0.3);
  font-family: var(--tr-display);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tr-coral);
}

.af57-tr-order-id h2 {
  margin: 0;
  font-family: var(--tr-display);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 800;
  word-break: break-all;
  line-height: 1.2;
}

/* Progress ring */
.af57-tr-progress-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.af57-tr-progress-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.af57-tr-ring-bg {
  fill: none;
  stroke: rgba(11, 94, 94, 0.12);
  stroke-width: 6;
}

.af57-tr-ring-fill {
  fill: none;
  stroke: url(#trGrad);
  stroke: var(--tr-coral);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 213.6;
  stroke-dashoffset: calc(213.6 - (213.6 * var(--tr-progress, 0) / 100));
  transition: stroke-dashoffset 1s var(--tr-ease);
}

.af57-tr-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--tr-display);
  line-height: 1;
}

.af57-tr-ring-label strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tr-teal);
}

.af57-tr-ring-label small {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--tr-muted);
}

/* Vertical stepper */
.af57-tr-stepper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 0.5rem;
}

.af57-tr-stepper::before {
  content: "";
  position: absolute;
  left: 1.65rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--tr-teal), rgba(11, 94, 94, 0.15));
  border-radius: 2px;
}

.af57-tr-step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.85rem 0;
  animation: tr-step-in 0.5s calc(var(--step-i, 0) * 0.08s) var(--tr-ease) both;
}

@keyframes tr-step-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

.af57-tr-step-marker {
  position: relative;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  z-index: 1;
}

.af57-tr-step-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(11, 94, 94, 0.15);
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.af57-tr-step-core {
  position: relative;
  z-index: 1;
  font-family: var(--tr-display);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--tr-muted);
}

.af57-tr-step--done .af57-tr-step-ring {
  border-color: var(--tr-gold);
  background: rgba(232, 197, 71, 0.12);
}

.af57-tr-step--done .af57-tr-step-core {
  color: var(--tr-teal);
  font-size: 0.85rem;
}

.af57-tr-step--active .af57-tr-step-ring {
  border-color: var(--tr-coral);
  box-shadow: 0 0 0 0 rgba(255, 94, 58, 0.4);
  animation: tr-active-ring 2s ease infinite;
}

@keyframes tr-active-ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 94, 58, 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(255, 94, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 94, 58, 0); }
}

.af57-tr-step--active .af57-tr-step-core {
  color: var(--tr-coral);
}

.af57-tr-step-body {
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  background: transparent;
  transition: background 0.35s, transform 0.35s var(--tr-spring), box-shadow 0.35s;
}

.af57-tr-step--active .af57-tr-step-body {
  background: #fff;
  box-shadow: 0 12px 32px rgba(4, 47, 47, 0.08);
  transform: translateX(4px);
  border: 1px solid rgba(255, 94, 58, 0.15);
}

.af57-tr-step-body h3 {
  margin: 0 0 0.25rem;
  font-family: var(--tr-display);
  font-size: 0.95rem;
  font-weight: 800;
}

.af57-tr-step--active .af57-tr-step-body h3 {
  color: var(--tr-teal);
}

.af57-tr-step-body p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--tr-muted);
}

.af57-tr-step-now {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 94, 58, 0.12);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tr-coral);
}

.af57-tr-step--pending .af57-tr-step-body {
  opacity: 0.55;
}

.af57-tr-detail-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(11, 94, 94, 0.12);
}

.af57-tr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-family: var(--tr-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.3s var(--tr-spring);
}

.af57-tr-btn-fill {
  background: linear-gradient(135deg, var(--tr-teal), #147878);
  color: #fff;
  box-shadow: 0 6px 20px rgba(11, 94, 94, 0.3);
}

.af57-tr-btn-line {
  border: 1.5px solid rgba(11, 94, 94, 0.2);
  color: var(--tr-teal);
  background: #fff;
}

.af57-tr-btn:hover { transform: translateY(-2px); }

/* Empty states */
.af57-tr-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}

.af57-tr-orbit {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 1.25rem;
}

.af57-tr-orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(11, 94, 94, 0.2);
}

.af57-tr-orbit-ring-a {
  animation: tr-orbit-spin 12s linear infinite;
}

.af57-tr-orbit-ring-b {
  inset: 12px;
  animation: tr-orbit-spin 8s linear infinite reverse;
}

@keyframes tr-orbit-spin {
  to { transform: rotate(360deg); }
}

.af57-tr-orbit-core {
  position: absolute;
  inset: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tr-teal), #147878);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 8px 24px rgba(11, 94, 94, 0.25);
}

.af57-tr-empty h2 {
  margin: 0 0 0.5rem;
  font-family: var(--tr-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.af57-tr-empty p {
  margin: 0;
  max-width: 36ch;
  font-size: var(--tr-fluid-sm);
  line-height: 1.6;
  color: var(--tr-muted);
}

.af57-tr-empty--miss .af57-tr-empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 94, 58, 0.12);
  color: var(--tr-coral);
  font-family: var(--tr-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.af57-tr-empty--miss h2 { color: #c44a2a; }

.af57-tr-tips {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  max-width: 38ch;
}

.af57-tr-tips li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.45rem;
  font-size: 0.8125rem;
  color: var(--tr-muted);
  line-height: 1.5;
}

.af57-tr-tips li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--tr-coral);
  font-weight: 700;
}

/* Support links */
.af57-tr-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.af57-tr-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--tr-paper);
  border: 1px solid rgba(11, 94, 94, 0.1);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 20px rgba(4, 47, 47, 0.05);
  transition: transform 0.35s var(--tr-spring), box-shadow 0.35s, border-color 0.25s;
  animation: tr-step-in 0.45s calc(var(--link-i, 0) * 0.06s) var(--tr-ease) both;
}

.af57-tr-link:hover {
  transform: translateY(-4px);
  border-color: var(--tr-teal);
  box-shadow: 0 16px 40px rgba(4, 47, 47, 0.1);
}

.af57-tr-link-glyph {
  font-size: 1.15rem;
  color: var(--tr-teal);
  margin-bottom: 0.15rem;
}

.af57-tr-link-label {
  font-family: var(--tr-display);
  font-size: 0.875rem;
  font-weight: 800;
}

.af57-tr-link em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--tr-muted);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .af57-tr-split {
    grid-template-columns: 1fr;
  }

  .af57-tr-detail {
    min-height: 400px;
  }

  .af57-tr-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .af57-tr-links {
    grid-template-columns: 1fr;
  }

  .af57-tr-step {
    grid-template-columns: 2.75rem 1fr;
    gap: 0.65rem;
  }

  .af57-tr-stepper::before {
    left: 1.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .af57-tr-live em,
  .af57-tr-orbit-ring,
  .af57-tr-step--active .af57-tr-step-ring,
  .af57-tr-step,
  .af57-tr-link {
    animation: none;
  }

  .af57-tr-ring-fill {
    transition: none;
  }
}
