/* Order status pages: payment return (thank you), payment cancelled and
   order tracking. Shared components live in site.css; everything here is
   prefixed os- so it can never collide with another page's styles. */

/* ---------- Confirmation hero (centred) ---------- */
.os-hero { text-align: center; padding-block: clamp(40px, 6vw, 80px) clamp(32px, 4.5vw, 56px); }
.os-hero .eyebrow { justify-content: center; }
.os-hero h1 { margin-inline: auto; max-width: 21ch; font-size: clamp(2rem, 4.8vw, 3.2rem); }
.os-hero .lead { margin-inline: auto; max-width: 60ch; }
.os-hero--ok {
  background:
    radial-gradient(760px 320px at 50% 0%, var(--ok-soft), transparent 72%),
    var(--bg);
}
.os-hero--ok .eyebrow { color: var(--ok); }
.os-hero--ok .eyebrow::before { background: var(--ok); }
.os-hero--accent {
  background:
    radial-gradient(760px 320px at 50% 0%, var(--accent-soft), transparent 72%),
    var(--bg);
}
.os-hero--calm {
  background:
    radial-gradient(760px 320px at 50% 0%, var(--surface-3), transparent 72%),
    var(--bg);
}
.os-hero--calm .eyebrow { color: var(--ink-3); }
.os-hero--calm .eyebrow::before { background: var(--line-2); }

/* The big status mark above the heading */
.os-badge {
  width: 92px; height: 92px; margin: 0 auto 1.4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok-soft); color: var(--ok);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--ok) 38%, transparent),
    0 0 0 10px color-mix(in srgb, var(--ok) 7%, transparent);
  animation: os-pop .55s var(--ease) both;
}
.os-badge .icon { width: 46px; height: 46px; stroke-width: 2.3; }
.os-badge--accent {
  background: var(--accent-soft); color: var(--accent-ink);
  box-shadow:
    inset 0 0 0 2px var(--accent-line),
    0 0 0 10px color-mix(in srgb, var(--accent) 7%, transparent);
}
.os-badge--muted {
  background: var(--surface); color: var(--ink-2);
  box-shadow: inset 0 0 0 2px var(--line-2), 0 0 0 10px color-mix(in srgb, var(--ink) 4%, transparent);
}
.os-badge--muted .icon { width: 40px; height: 40px; stroke-width: 2; }
@keyframes os-pop { from { transform: scale(.82); } to { transform: none; } }

/* Order number, status and date under the heading */
.os-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; margin-top: 1.7rem; }
.os-hero .os-meta .pill { padding: .4rem .8rem; }
.os-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.7rem; }

/* ---------- Order number with copy button ---------- */
.os-ordno {
  display: inline-flex; align-items: center; gap: 1rem; max-width: 100%;
  padding: .45rem .45rem .45rem 1.05rem; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.os-ordno__label { display: block; font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); line-height: 1.25; }
.os-ordno__value { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; letter-spacing: -.005em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.25; overflow-wrap: anywhere; }

/* site.js swaps the button's text to "Copied" and back, which would wipe an
   inline <svg>; the icon is drawn with a mask so it survives. */
.os-copy { min-height: 40px; gap: .45rem; }
.os-copy::before {
  content: ""; width: 16px; height: 16px; flex-shrink: 0; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8.5' y='8.5' width='11.5' height='11.5' rx='2'/%3E%3Cpath d='M15.5 8.5V5.5A1.5 1.5 0 0 0 14 4H5.5A1.5 1.5 0 0 0 4 5.5V14a1.5 1.5 0 0 0 1.5 1.5h3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8.5' y='8.5' width='11.5' height='11.5' rx='2'/%3E%3Cpath d='M15.5 8.5V5.5A1.5 1.5 0 0 0 14 4H5.5A1.5 1.5 0 0 0 4 5.5V14a1.5 1.5 0 0 0 1.5 1.5h3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Page layout: status column + order aside ----------
   On phones the order summary moves up, straight after the status. */
.os-layout {
  display: grid; align-items: start;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas: "status aside" "next aside" "install aside";
  grid-template-rows: auto auto 1fr;
  gap: clamp(20px, 2.6vw, 28px) clamp(28px, 4vw, 48px);
}
.os-layout__status  { grid-area: status; min-width: 0; }
.os-layout__next    { grid-area: next; min-width: 0; }
.os-layout__install { grid-area: install; min-width: 0; }
.os-layout__aside   { grid-area: aside; min-width: 0; display: grid; gap: clamp(20px, 2.6vw, 24px); }
.os-layout--closed { grid-template-areas: "status aside"; grid-template-rows: auto; }
@media (max-width: 980px) {
  /* Summary straight after the status, help last. */
  .os-layout, .os-layout--closed { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .os-layout { grid-template-areas: "status" "summary" "next" "install" "help"; }
  .os-layout--closed { grid-template-areas: "status" "summary" "help"; }
  .os-layout__aside { display: contents; }
  .os-layout__aside > .os-summary { grid-area: summary; }
  .os-layout__aside > .os-help { grid-area: help; }
}

/* Card heading row: title left, action or pill right */
.os-card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .8rem 1.2rem; margin-bottom: 1.3rem; }
.os-card__head h2, .os-card__head h3 { margin: 0; }
.os-card__sub { margin: .3rem 0 0; color: var(--ink-3); font-size: .92rem; }
.os-now { margin: 1.4rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--line); color: var(--ink-2); }

/* ---------- Order timeline ----------
   Horizontal on wide screens, vertical on phones. Each step draws the
   connector to the step after it, coloured by its own state: a done step
   always leads to a done or current one, a current step leads to "next". */
.os-timeline {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr));
}
.os-step { position: relative; display: grid; justify-items: center; align-content: start; gap: .5rem; padding: 0 .4rem; text-align: center; }
.os-step::after {
  content: ""; position: absolute; top: 17px; left: calc(50% + 24px); right: calc(-50% + 24px);
  height: 3px; border-radius: 3px; background: var(--line-2);
}
.os-step:last-child::after { display: none; }
.os-step.is-done::after { background: var(--ok); }
.os-step.is-current::after { background: repeating-linear-gradient(90deg, var(--accent) 0 7px, transparent 7px 12px); opacity: .7; }

.os-step__dot {
  position: relative; z-index: 1;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-3); border: 2px solid var(--line-2); color: var(--ink-3);
  font-family: var(--font-display); font-weight: 700; font-size: .92rem;
}
.os-step__dot .icon { width: 19px; height: 19px; stroke-width: 2.6; }
.os-step.is-done .os-step__dot { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.os-step.is-current .os-step__dot {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}
.os-step.is-next .os-step__dot { background: var(--surface); border-style: dashed; border-color: var(--accent); color: var(--accent-ink); }

.os-step__label { font-weight: 650; font-size: .93rem; line-height: 1.3; color: var(--ink-3); }
.os-step.is-done .os-step__label, .os-step.is-current .os-step__label, .os-step.is-next .os-step__label { color: var(--ink); }
.os-step__sub { display: block; margin-top: .15rem; font-size: .8rem; font-weight: 500; line-height: 1.35; color: var(--ink-3); }
.os-step.is-current .os-step__sub { color: var(--accent-ink); font-weight: 650; }
.os-step.is-next .os-step__sub { color: var(--ink-2); }

@media (max-width: 600px) {
  .os-timeline { grid-template-columns: minmax(0, 1fr); }
  .os-step { grid-template-columns: 38px minmax(0, 1fr); justify-items: start; align-items: center; column-gap: .9rem; padding: 0 0 1.25rem; text-align: left; }
  .os-step:last-child { padding-bottom: 0; }
  .os-step::after { top: 42px; bottom: 4px; left: 17.5px; right: auto; width: 3px; height: auto; }
  .os-step.is-current::after { background: repeating-linear-gradient(180deg, var(--accent) 0 7px, transparent 7px 12px); }
  .os-step__sub { margin-top: 0; }
}

/* ---------- What happens next ---------- */
.os-next .steps { margin-top: .2rem; }
.os-next .step h3 { font-size: 1.02rem; }
.os-next .step p { font-size: .95rem; }

/* Delivery / collection detail panel inside the card */
.os-place {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem 1.6rem;
  margin-top: 1.5rem; padding: 1.2rem 1.3rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.os-place--single { grid-template-columns: minmax(0, 1fr); }
.os-place__title { display: flex; align-items: center; gap: .55rem; margin: 0 0 .7rem; font-size: 1rem; }
.os-place__title .icon { color: var(--accent-ink); }
.os-place address { font-style: normal; color: var(--ink-2); line-height: 1.6; }
.os-place address strong { color: var(--ink); }
.os-hours { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; font-size: .92rem; }
.os-hours dt { color: var(--ink-3); }
.os-hours dd { margin: 0; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.os-place .cluster { margin-top: 1rem; }
@media (max-width: 640px) { .os-place { grid-template-columns: minmax(0, 1fr); } }

/* Courier reference row */
.os-ref { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem; }
.os-ref code { font-size: 1rem; padding: .35em .6em; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; }

/* ---------- Install teaser: illustration, next steps, key facts ---------- */
.os-install__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.os-install__media { background: var(--steel-bg); border-right: 1px solid var(--line); display: grid; place-items: center; }
.os-install__media img { width: 100%; height: auto; }
.os-install__body { padding: clamp(20px, 2.6vw, 30px); align-self: center; }
.os-install__body h2 { margin: 0 0 .5rem; }
.os-install__body > p { color: var(--ink-2); font-size: .96rem; }
.os-install__facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0;
  background: var(--line); border-top: 1px solid var(--line);
}
.os-install__facts > div { background: var(--surface-2); padding: .95rem 1.2rem; }
.os-install__facts dt { display: flex; align-items: center; gap: .4rem; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-3); margin-bottom: .3rem; }
.os-install__facts dt .icon { width: 15px; height: 15px; color: var(--accent-ink); }
.os-install__facts dd { margin: 0; color: var(--ink); font-weight: 600; font-size: .93rem; line-height: 1.4; }
@media (max-width: 720px) {
  .os-install__top { grid-template-columns: minmax(0, 1fr); }
  .os-install__media { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 420px) { .os-install__facts { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Order summary (aside) ---------- */
.os-summary h2 { margin: 0 0 1rem; }
.os-items { list-style: none; margin: 0 0 .6rem; padding: 0 0 .9rem; border-bottom: 1px solid var(--line); display: grid; gap: .9rem; }
.os-item { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: .9rem; align-items: center; }
.os-item__thumb.photo-stage { width: 60px; height: 60px; border-radius: var(--radius-sm); box-shadow: none; }
.os-item__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.os-item__title { display: block; font-weight: 650; color: var(--ink); line-height: 1.3; }
.os-item__note { display: block; font-size: .8rem; color: var(--ink-3); line-height: 1.4; margin-top: .15rem; }
.os-item__price { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.os-summary .summary__row span:first-child { min-width: 0; }
.os-summary .summary__total span:last-child { font-size: 1.5rem; }
.os-summary__actions { display: grid; gap: .6rem; margin-top: 1.3rem; }

/* Help card */
.os-help h2 { margin: 0 0 .9rem; }
.os-help .meta-list a { text-decoration: none; font-weight: 600; }
.os-help .meta-list a:hover { text-decoration: underline; }
.os-help .meta-list .small { display: block; margin-top: .1rem; }

/* ---------- Tracking lookup ---------- */
.os-lookup { display: grid; gap: .9rem; }
.os-lookup__head { display: flex; align-items: center; gap: .9rem; }
.os-lookup__head h2 { margin: 0; }
.os-lookup__row { display: flex; gap: .6rem; }
.os-lookup .os-lookup__row input[type="text"] { flex: 1; min-width: 0; min-height: 52px; font-size: 1.05rem; letter-spacing: .01em; }
.os-lookup__row .btn { min-height: 52px; }
@media (max-width: 520px) {
  .os-lookup__row { flex-direction: column; }
  .os-lookup__row .btn { width: 100%; }
}

.os-result__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1rem; padding-bottom: 1.2rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.os-result__head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
.os-result__head p { margin: .25rem 0 0; }
.os-result__section { margin-top: 1.6rem; }
.os-result__section h3 { font-size: 1.05rem; margin-bottom: .7rem; }

/* Tools card (tracking page) */
.os-tools__media { background: var(--steel-bg); border-bottom: 1px solid var(--line); }
.os-tools__media img { width: 100%; height: auto; }
.os-tools__body { padding: clamp(20px, 2.6vw, 30px); }
.os-tools__body h2 { margin: 0 0 .5rem; }
.os-tools__body > p { color: var(--ink-2); font-size: .96rem; }
.os-tools__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1.2rem; margin: 1.1rem 0 1.4rem; }
.os-tools__list li { font-size: .93rem; }
@media (max-width: 520px) { .os-tools__list { grid-template-columns: minmax(0, 1fr); } }
/* The drawing's labels shrink to about 5px on a phone, and the tick list
   right below already names every tool, so phones get the list only. */
@media (max-width: 640px) { .os-tools__media { display: none; } }

/* Flash message on the tracking page (.alert--warn itself is in site.css) */
.alert p { margin: 0; }

/* ---------- How tracking works / payment help strip ---------- */
.os-strip .feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.2vw, 24px); box-shadow: var(--shadow-xs); }
.os-strip .feature p a { font-weight: 600; }

/* ---------- Print: a clean receipt ---------- */
@media print {
  .os-hero { padding-block: 8px 16px; background: none; }
  .os-badge { width: 56px; height: 56px; box-shadow: none; animation: none; }
  .os-copy, .os-summary__actions, .os-layout__install, .os-help, .os-actions, .os-lookup { display: none !important; }
  .os-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "status" "aside" "next"; grid-template-rows: none; }
}

@media (max-width: 520px) {
  .os-actions .btn { width: 100%; }
}
