/* Order tracking page. Colours and radius come from the app's page editor as
   custom properties on .at-root; fonts are inherited from the theme. Sizes are
   in em, not rem: Shopify themes set the root to 62.5% (1rem = 10px). */
.at-root {
  --at-accent: #1a1a1a;
  --at-on-accent: #ffffff;
  --at-card: #ffffff;
  --at-text: #1a1a1a;
  --at-border: #e3e3e3;
  --at-done: #2e7d32;
  --at-radius: 12px;
  --at-problem: #c62828;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  color: var(--at-text);
  font: inherit;
  box-sizing: border-box;
}
.at-root *,
.at-root *::before,
.at-root *::after { box-sizing: border-box; }

.at-head { text-align: center; margin-bottom: 24px; }
.at-title { margin: 0 0 8px; font-size: clamp(1.6em, 4vw, 2.2em); line-height: 1.2; color: var(--at-text); }
.at-intro { margin: 0; opacity: 0.8; }

.at-card {
  background: var(--at-card);
  border: 1px solid var(--at-border);
  border-radius: var(--at-radius);
  padding: 24px;
  margin-bottom: 16px;
}

.at-tabs {
  position: relative;
  display: flex;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--at-border);
  border-radius: 13px;
}
/* The selected tab's background slides between the two. */
.at-tabs__pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  inset-inline-start: 4px;
  width: calc(50% - 4px);
  border-radius: 9px;
  background: var(--at-accent);
  transition: transform 0.3s ease;
}
.at-tabs[data-mode='order'] .at-tabs__pill { transform: translateX(100%); }
[dir='rtl'] .at-tabs[data-mode='order'] .at-tabs__pill { transform: translateX(-100%); }
.at-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--at-text);
  font: inherit;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  opacity: 0.75;
  transition: color 0.3s ease, opacity 0.3s ease;
}
.at-tab:hover { opacity: 1; }
.at-tab[aria-selected='true'] { color: var(--at-on-accent); opacity: 1; }

.at-fields { display: grid; gap: 14px; margin-bottom: 18px; }
.at-field[hidden] { display: none; }
.at-label { display: block; margin-bottom: 6px; font-weight: 600; }
.at-input {
  width: 100%;
  font: inherit;
  color: var(--at-text);
  background: transparent;
  border: 1px solid var(--at-border);
  border-radius: calc(var(--at-radius) * 0.6);
  padding: 12px 14px;
  min-height: 46px;
}
.at-input:focus { outline: 2px solid var(--at-accent); outline-offset: 1px; }

.at-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  color: var(--at-on-accent);
  background: var(--at-accent);
  border: 1px solid var(--at-accent);
  border-radius: 35px;
  cursor: pointer;
}
.at-button { transition: background-color 0.3s, border-color 0.3s, color 0.3s; }
/* alitehub.com: dark buttons turn lilac with a black edge, light ones turn black. */
.at-button:not(.at-button--ghost):hover:not(:disabled) { background: var(--at-accent-hover); border-color: #000; color: #000; }
.at-button--ghost:hover { background: #000; border-color: #000; color: #fff; }
.at-button:disabled { opacity: 0.6; cursor: progress; }
.at-button--ghost { width: auto; color: var(--at-text); background: transparent; border-color: var(--at-border); }

.at-error { margin: 12px 0 0; color: var(--at-problem); font-weight: 600; }
.at-error:empty { display: none; }

.at-result:empty { display: none; }
.at-order-title { margin: 24px 0 12px; font-size: 1.3em; color: var(--at-text); }
.at-eyebrow { margin: 0 0 6px; font-weight: 600; opacity: 0.75; }
.at-headline { margin: 0 0 16px; font-size: 1.25em; line-height: 1.3; color: var(--at-text); }
.at-headline--problem { color: var(--at-problem); }
.at-section-title { margin: 0 0 12px; font-size: 1.05em; color: var(--at-text); }

.at-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px; margin-bottom: 20px; }
.at-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.at-info__label { font-weight: 600; }
.at-info__value { overflow-wrap: anywhere; }
.at-link { color: var(--at-text); text-decoration: underline; text-underline-offset: 2px; }

.at-bar { height: 6px; border-radius: 3px; background: var(--at-border); overflow: hidden; margin-bottom: 20px; }
.at-bar__fill { display: block; height: 100%; background: var(--at-done); border-radius: 3px; transition: width 0.8s ease; }
.at-bar--problem .at-bar__fill { background: var(--at-problem); }

.at-steps { list-style: none; margin: 0; padding: 0; }
.at-step { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.at-step:last-child { padding-bottom: 0; }
.at-step::before {
  content: '';
  position: absolute;
  inset-inline-start: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--at-border);
}
.at-step:last-child::before { display: none; }
.at-step--done::before { background: var(--at-done); }
.at-step__dot {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  border: 2px solid var(--at-border);
  background: var(--at-card);
}
.at-step--done .at-step__dot { background: var(--at-done); border-color: var(--at-done); }
.at-step--current .at-step__dot { border-color: var(--at-done); box-shadow: 0 0 0 4px color-mix(in srgb, var(--at-done) 20%, transparent); }
.at-step--problem .at-step__dot { border-color: var(--at-problem); box-shadow: 0 0 0 4px color-mix(in srgb, var(--at-problem) 20%, transparent); }
.at-step__body { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; flex: 1; min-width: 0; }
.at-step__label { font-weight: 600; }
.at-step--todo .at-step__label { opacity: 0.55; font-weight: 400; }
.at-step__date { opacity: 0.8; }
.at-step__now {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--at-done);
  color: #fff;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.at-step--problem .at-step__now { background: var(--at-problem); }

/* "What's happening now" — yellow, so it is read first. */
.at-guide { background: #fff6d1; border-color: #f1d25c; }
.at-guide .at-section-title { font-size: 1.2em; font-weight: 600; }
.at-guide .at-guide__update { background: rgba(255, 255, 255, 0.7); }
.at-guide .at-carrier { background: #fff; }
.at-guide--problem { background: #fdecea; border-color: #f2b8b5; }
.at-guide__text { margin: 0 0 14px; line-height: 1.55; }
.at-guide__update { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; margin-bottom: 14px; border-radius: calc(var(--at-radius) * 0.6); background: color-mix(in srgb, var(--at-text) 4%, transparent); }
.at-guide__update-label { font-weight: 600; }
.at-guide__delay { margin: 0 0 14px; padding: 12px 14px; border-inline-start: 3px solid #e8a33d; border-radius: 6px; background: #fff7eb; line-height: 1.5; }
.at-guide--problem .at-guide__text { color: var(--at-problem); }
.at-carrier { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--at-border); border-radius: calc(var(--at-radius) * 0.8); }
.at-carrier__label { font-weight: 600; }
.at-carrier__head { display: flex; align-items: center; gap: 14px; }
.at-carrier__logo { flex: none; width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: #fff; border: 1px solid var(--at-border); padding: 4px; }
.at-carrier__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.at-carrier__name { font-size: 1.5em; font-weight: 600; line-height: 1.2; }
.at-carrier__number { opacity: 0.7; overflow-wrap: anywhere; }
.at-carrier__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.at-button--small { width: auto; min-height: 48px; padding: 10px 22px; font-size: 1.05em; }

.at-items { list-style: none; margin: 0; padding: 0; }
.at-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--at-border); }
.at-item:first-child { border-top: 0; padding-top: 0; }
.at-item__qty { flex: none; font-weight: 600; }

.at-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border: 1px dashed var(--at-border);
  border-radius: var(--at-radius);
}
.at-contact__text { font-weight: 600; }

.at-loading .at-result { opacity: 0.5; }

@media (max-width: 480px) {
  .at-card { padding: 18px; }
  .at-contact { padding: 16px 18px; }
  .at-contact .at-button { width: 100%; }
}

/* Shipping address + map */
.at-address__text { font-style: normal; line-height: 1.55; margin-bottom: 14px; }
.at-map { display: block; width: 100%; height: 280px; border: 0; border-radius: calc(var(--at-radius) * 0.8); }
.at-map--offices { height: 320px; z-index: 0; }
.at-map .at-pin { display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; font-size: 12px; line-height: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.at-map .at-pin--home { background: var(--at-accent); border: 3px solid #fff; }
.at-map .at-pin--office { background: #fff; color: var(--at-text); border: 2px solid var(--at-accent); }
.at-offices__title { margin-top: 20px; }
.at-offices { list-style: none; margin: 0; padding: 0; }
.at-office { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--at-border); cursor: pointer; }
.at-office:first-child { border-top: 0; }
.at-office__n { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--at-accent); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }
.at-office__body { flex: 1; min-width: 0; }
.at-office__head { display: flex; justify-content: space-between; gap: 12px; }
.at-office__name { overflow-wrap: anywhere; }
.at-office__dist { flex: none; white-space: nowrap; }
.at-office__meta { margin-top: 2px; }
.at-office__hours { margin-top: 4px; white-space: pre-line; font-variant-numeric: tabular-nums; }
