/* Customer order components (inc/order-ui.php): tracking page, order-received page, My Account order view.
   Each component sits in a .sm-ot size container and reacts to ITS width; hosts only decide the columns. Tokens: app.css. */

.sm-ot { container: ot / inline-size; min-width: 0; }
.sm-ot :where(h1, h2, p, dl, dd, ol, ul, address) { margin: 0; } /* zero specificity bump: component margins below win by order */
.sm-ot :is(ol, ul) { list-style: none; padding: 0; }
.sm-ot-card { padding: 20px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--lift); }
.sm-ot .sm-ot-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 1.2rem; line-height: 1.15; font-variation-settings: 'wdth' 112; }
.sm-ot .sm-ot-h small { font: 600 var(--fs-ui)/1.2 var(--f); font-variation-settings: 'wdth' 100; letter-spacing: 0; color: var(--ink-3); }
.sm-ot .sm-ot-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; color: var(--laser-deep); text-decoration: underline; text-underline-offset: 3px; }
.sm-ot .sm-btn { padding-inline: 16px; text-align: center; }
@container ot (min-width: 560px) { .sm-ot-card { padding: 28px; } }

/* ---------- keyed order page: hero, steps, then items | where + help from 960 ---------- */
.sm-otp-page { padding-top: 16px; }
.sm-otp, .sm-otp__main, .sm-otp__side { display: grid; gap: 16px; align-content: start; min-width: 0; }
.sm-otp > * { min-width: 0; }
@media (min-width: 960px) {
  .sm-otp { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
  .sm-otp__hero, .sm-otp__steps { grid-column: 1 / -1; }
  .sm-otp__main, .sm-otp__side { gap: 24px; }
}

/* ---------- hero: the navy print bed ---------- */
.sm-ot-hero { position: relative; overflow: hidden; display: grid; gap: 16px; padding: 20px 20px 30px; border-radius: var(--r-lg); background: var(--ink); color: #fff; grid-template-areas: "top" "h" "lead" "panel" "act"; }
.sm-ot-hero > * { min-width: 0; }
.sm-ot-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: repeating-linear-gradient(0deg, rgba(255,255,255,.2) 0 3px, rgba(255,255,255,.08) 3px 4px); pointer-events: none; }
.sm-ot-hero :focus-visible { outline-color: #fff; }
.sm-ot-hero__top { grid-area: top; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sm-ot-hero__st { display: grid; justify-items: start; gap: 8px; }
.sm-ot-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 12px 4px 10px; border-radius: var(--pill); background: rgba(255,255,255,.12); font: 700 var(--fs-sm)/1.2 var(--f); color: #fff; }
.sm-ot-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--laser); }
.sm-ot-pill[data-tone="done"]::before { background: #fff; }
.sm-ot-pill[data-tone="off"]::before { background: #b3c2d8; }
.sm-ot-hero__cap { font: 700 var(--fs-sm)/1.3 var(--f); color: #b3c2d8; }
.sm-ot-hero__cap b { color: var(--laser); }
.sm-ot-hero[data-state="completed"] .sm-ot-hero__cap b { color: #fff; }
.sm-ot-hero__meta { text-align: right; font-size: var(--fs-sm); line-height: 1.35; color: #b3c2d8; }
.sm-ot-hero__meta b { display: block; font-size: 16px; font-weight: 700; color: #fff; white-space: nowrap; }
.sm-ot-hero__h { grid-area: h; font-size: clamp(1.9rem, 8.6vw, 2.35rem); line-height: 1; font-weight: 850; font-variation-settings: 'wdth' 125; letter-spacing: -.03em; color: #fff; text-wrap: balance; }
.sm-ot-hero__lead { grid-area: lead; max-width: 34em; font-size: 16px; line-height: 1.5; color: #c3cfe0; }
.sm-ot-hero__panel { grid-area: panel; }
.sm-ot-hero__act { grid-area: act; display: grid; gap: 4px; }
.sm-ot-hero .sm-ot-link { justify-content: center; color: #fff; }

/* inset panel: tracking number / pickup / payment / order summary (desktop) */
.sm-ot-panel { display: grid; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.sm-ot-panel dt { font-size: var(--fs-sm); line-height: 1.3; color: #b3c2d8; }
.sm-ot-panel dd { font-size: 22px; line-height: 1.15; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.sm-ot-panel p { font-size: var(--fs-ui); line-height: 1.45; color: #c3cfe0; }
.sm-ot-panel__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sm-ot-panel__row > dl { display: grid; gap: 2px; min-width: 0; }
.sm-ot-hero .sm-ot-copy { flex: none; justify-content: center; min-width: 84px; background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
@media (hover: hover) and (pointer: fine) { .sm-ot-hero .sm-ot-copy:hover { box-shadow: inset 0 0 0 1.5px #fff; } }
.sm-ot-hero .sm-ot-copy.is-done { background: #fff; color: var(--ink); }
.sm-ot-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: var(--r-sm); background: rgba(255,255,255,.14); }
.sm-ot-strip > div { display: grid; gap: 2px; padding: 10px 12px; background: color-mix(in srgb, #fff 6%, var(--ink)); }
.sm-ot-strip dd { font-size: 16px; }
.sm-ot-strip--lead > div:first-child { grid-column: 1 / -1; }
.sm-ot-panel--sum { display: none; }

@container ot (min-width: 720px) {
  .sm-ot-hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 40px; padding: 32px 32px 40px; grid-template-areas: "top top" "h panel" "lead panel" "act panel"; align-items: start; }
  .sm-ot-hero:not(:has(.sm-ot-hero__panel)) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "h" "lead" "act"; }
  .sm-ot-hero__h { font-size: clamp(2.4rem, 4.6cqi, 3.4rem); }
  .sm-ot-hero__panel { align-self: center; }
  .sm-ot-hero__act { grid-auto-flow: column; justify-content: start; align-items: center; gap: 16px; }
  .sm-ot-hero__act .sm-btn { width: auto; min-width: 220px; padding-inline: 24px; }
  .sm-ot-panel--sum { display: grid; }
}

/* ---------- steps: always horizontal, node on top (sm_email_tracker geometry) ---------- */
.sm-ot-steps .sm-ot-h, .sm-ot-s__f { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sm-ot-steps ol { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.sm-ot-s { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 0 2px; text-align: center; font-size: var(--fs-ui); font-weight: 600; line-height: 1.2; color: var(--ink-3); }
.sm-ot-s + .sm-ot-s::before { content: ""; position: absolute; top: 10.5px; left: -50%; right: 50%; height: 3px; background: var(--frost-2); }
.sm-ot-s + .sm-ot-s:is(.is-done, .is-now)::before { background: repeating-linear-gradient(90deg, var(--ink) 0 3px, rgba(12,31,61,.55) 3px 4px); }
.sm-ot-s__n { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; margin-bottom: 6px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px #8592a8; }
.sm-ot-s.is-done .sm-ot-s__n { background: var(--ink); box-shadow: none; }
.sm-ot-s.is-done .sm-ot-s__n::before { content: ""; width: 10px; height: 5px; margin-top: -3px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.sm-ot-s.is-now .sm-ot-s__n { background: var(--laser); box-shadow: 0 0 0 4px rgba(255,122,47,.25); }
.sm-ot-s.is-now .sm-ot-s__n::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.sm-ot-s:is(.is-done, .is-now) { color: var(--ink); font-weight: 700; }
.sm-ot-s.is-now { font-size: var(--fs-md); font-weight: 800; }
.sm-ot-s__now { padding: 2px 8px; border-radius: var(--pill); background: var(--ink); color: #fff; font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; }
.sm-ot-s__d { font-size: var(--fs-xs); color: var(--ink-3); }
.sm-ot-s__c { font-size: var(--fs-sm); font-weight: 400; color: var(--ink-3); }
@media (prefers-reduced-motion: no-preference) { .sm-ot-s.is-now::before { transform-origin: left; animation: smOtWipe .3s var(--ease) both; } }
@keyframes smOtWipe { from { transform: scaleX(0); } }
@container ot (max-width: 379px) { /* 360/390 phones: five columns of ~60px */
  .sm-ot-steps { padding-inline: 12px; }
  .sm-ot-s { padding: 0; font-size: var(--fs-sm); letter-spacing: -.01em; }
  .sm-ot-s.is-now { font-size: var(--fs-ui); }
}
@container ot (min-width: 480px) {
  .sm-ot-s__f { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .sm-ot-s__sh { display: none; }
}
@container ot (min-width: 640px) {
  .sm-ot-steps .sm-ot-h { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; margin-bottom: 20px; }
}

/* ---------- items ---------- */
.sm-ot-typo { margin-top: 6px; font-size: var(--fs-ui); line-height: 1.45; color: var(--ink-3); }
.sm-ot-items__list { display: grid; margin-top: 4px; }
.sm-ot-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; padding: 16px 0; border-top: 1px solid var(--edge); }
.sm-ot-item:first-child { border-top: 0; }
.sm-ot-item__img { grid-row: 1 / span 2; width: 64px; height: 64px; border-radius: var(--r-sm); object-fit: cover; background: repeating-linear-gradient(0deg, var(--frost-2) 0 3px, var(--frost) 3px 4px); }
.sm-ot-item__n { align-self: end; font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.sm-ot-item__p { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--fs-ui); color: var(--ink-3); }
.sm-ot-item__p b { font-size: 16px; font-weight: 700; color: var(--ink); }
.sm-ot-item__m { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin-top: 8px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--frost); font-size: var(--fs-ui); line-height: 1.4; }
.sm-ot-item__m dt { color: var(--ink-3); }
.sm-ot-item__m dd { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.sm-ot-tot { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--edge); }
.sm-ot-tot > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sm-ot-tot dt { font-size: var(--fs-md); color: var(--ink-3); }
.sm-ot-tot dt small { display: block; font-size: var(--fs-sm); }
.sm-ot-tot dd { font-size: 16px; font-weight: 700; color: var(--ink); }
.sm-ot-tot .is-total { margin-top: 4px; padding-top: 12px; border-top: 2px solid var(--ink); }
.sm-ot-tot:has(> .is-total:first-child) { padding-top: 0; border-top: 0; }
.sm-ot-tot .is-total dt { font-size: 16px; font-weight: 700; color: var(--ink); }
.sm-ot-tot .is-total dd { font-size: 24px; font-weight: 800; }
.sm-ot-pay { margin-top: 12px; font-size: var(--fs-ui); line-height: 1.5; color: var(--ink-3); }
@container ot (min-width: 560px) {
  .sm-ot-item { grid-template-columns: 80px minmax(0, 1fr); column-gap: 16px; }
  .sm-ot-item__img { width: 80px; height: 80px; }
  .sm-ot-item__m { grid-column: 2; }
}

/* ---------- where + help ---------- */
.sm-ot-where { padding-left: 24px; box-shadow: inset 4px 0 0 var(--ink), var(--lift); }
.sm-ot-where address { display: grid; gap: 2px; margin-top: 8px; font-style: normal; font-size: 16px; line-height: 1.45; color: var(--ink-2); }
.sm-ot-where address b { color: var(--ink); }
.sm-ot-where p { margin-top: 10px; font-size: var(--fs-md); line-height: 1.5; color: var(--ink-3); }
.sm-ot-help > p:first-of-type { margin-top: 6px; font-size: var(--fs-md); line-height: 1.5; color: var(--ink-2); }
.sm-ot-help .sm-btn { margin-top: 16px; }
.sm-ot-help__mail { margin-top: 10px; font-size: var(--fs-sm); line-height: 1.4; color: var(--ink-3); }
.sm-ot-help__mail a { display: inline-block; padding: 12px 0; margin: -12px 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
@container ot (min-width: 560px) { .sm-ot-help .sm-btn { width: auto; min-width: 200px; } }
.sm-ot-dl h2 { font-size: 1.2rem; }
.sm-ot-dl > p { margin: 6px 0 0; font-size: var(--fs-md); line-height: 1.5; color: var(--ink-2); }
