/* DANA Thank You page (order confirmation): structured cards on the site's own tokens.
   The thank-you card first, then the order summary beside the journey, delivery details and help.
   On phones it is one column: thank you, summary, what happens next, delivery details, help. */
.ty { width: min(1120px, var(--wrap)); margin-inline: auto; padding-block: 20px 64px; }
.ty h1 { font-size: clamp(26px, 2.2vw + 16px, 38px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }
[dir='rtl'] .ty h1 { font-weight: 700; letter-spacing: 0; line-height: 1.35; }
.ty h2 { font-size: 18px; line-height: 1.3; margin-bottom: 14px; }
.ty__hero, .ty__card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); }
.ty__card { padding: 20px; }

/* Thank you: the check, the greeting, the order number and where the order stands */
.ty__hero { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px; }
.ty__ok { position: relative; flex-shrink: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; }
.ty__ok svg { width: 30px; height: 30px; }
.ty__ok::after { content: ''; position: absolute; top: -3px; inset-inline-end: -3px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff 0, #F1F4F2 40%, #DAE3E0 72%, #A9BCB8 100%); box-shadow: 0 2px 6px rgba(30, 39, 41, 0.25); } /* the DANA pearl, beside the check */
.ty__tick { stroke-dasharray: 1; stroke-dashoffset: 0; }
.ty__heroText { flex: 1; width: 100%; min-width: 0; }
.ty__hello { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
/* At a glance: order number with its copy button, where the order stands, and the amount paid at the door */
.ty__facts { margin: 16px 0 0; border-top: 1px solid var(--line); }
.ty__fact { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ty__fact dt { font-size: var(--fs-small); color: var(--muted); }
.ty__fact dd { margin: 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.ty__ref { font-size: 18px; font-weight: 800; letter-spacing: 0.05em; font-variant-numeric: tabular-nums; color: var(--ink); }
.ty__copy { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--brand); font: 600 13px/1 var(--font); cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.ty__copy:hover { border-color: var(--brand); }
.ty__copy svg { width: 16px; height: 16px; flex-shrink: 0; }
.ty__copy.is-copied { background: var(--brand); border-color: var(--brand); color: #fff; }
.ty__chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.ty__chip svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--brand); }
.ty__chip--state { background: var(--accent); border-color: transparent; }
/* A clock while waiting, a tick once DANA's team has confirmed it */
.ty__stIcon { display: inline-flex; }
.ty__stIcon--ok { display: none; }
.ty[data-state='confirmed'] .ty__stIcon--wait, .ty[data-state='shipped'] .ty__stIcon--wait, .ty[data-state='delivered'] .ty__stIcon--wait { display: none; }
.ty[data-state='confirmed'] .ty__stIcon--ok, .ty[data-state='shipped'] .ty__stIcon--ok, .ty[data-state='delivered'] .ty__stIcon--ok { display: inline-flex; }
.ty__fact--due strong { font-size: 20px; font-weight: 800; color: var(--copper); font-variant-numeric: tabular-nums; }
.ty__duenote { margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); }
.ty__note { margin-top: 12px; max-width: 52ch; font-size: var(--fs-small); color: var(--ink-2); }
/* "Ask about my order" right under the order number: the page's one main button, copper with the chat icon (dana.css) */
.ty__askRow { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-top: 16px; }
.ty__askRow small { font-size: var(--fs-label); color: var(--muted); text-align: center; }

.ty__grid { display: grid; gap: 16px; margin-top: 16px; }
.ty__side, .ty__main, .ty__end { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Order summary */
.ty__item { display: flex; align-items: center; gap: 14px; }
.ty__img { width: 72px; height: 72px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.ty__img img { width: 100%; height: 100%; object-fit: cover; }
.ty__item > div { flex: 1; min-width: 0; }
.ty__item strong { display: block; font-size: 15.5px; line-height: 1.4; }
.ty__item small { display: block; font-size: var(--fs-xs); color: var(--muted); }
.ty__lines { margin: 14px 0 0; border-top: 1px solid var(--line); }
.ty__lines > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; font-size: var(--fs-small); }
.ty__lines dt { color: var(--muted); }
.ty__lines dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; }
.ty__lines > .ty__total { margin-top: 6px; padding: 14px 16px; border-radius: var(--r-inner); background: var(--accent); font-size: 17px; font-weight: 700; }
.ty__total dt { color: var(--ink); }
.ty__feenote { margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); }
.ty__pay { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-2); }
.ty__pay svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--brand); }

/* What happens next: only the first step is marked done, because only that has happened */
.ty__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ty__steps li { position: relative; display: flex; gap: 14px; padding-bottom: 22px; }
.ty__steps li:last-child { padding-bottom: 0; }
.ty__steps li::before { content: ''; position: absolute; inset-inline-start: 15px; top: 36px; bottom: 4px; width: 2px; border-radius: 2px; background: var(--line); }
.ty__steps li:last-child::before { display: none; }
.ty__dot { position: relative; z-index: 1; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--sand-2); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; }
.ty__dot svg { width: 16px; height: 16px; }
.is-done .ty__dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.is-next .ty__dot { border-color: var(--brand); color: var(--brand); }
.ty__steps strong { display: block; font-size: 15.5px; }
.ty__steps p { font-size: var(--fs-small); color: var(--muted); }
.ty__steps em { display: inline-block; margin-top: 4px; font-style: normal; font-size: var(--fs-label); font-weight: 700; color: var(--brand); }
.ty__steps li:not(.is-done):not(.is-next):not(.is-now) strong { color: var(--ink-2); }
.ty__tickIcon { display: none; }
.is-done .ty__tickIcon { display: inline-flex; }
.is-done .ty__num { display: none; }
.is-now .ty__dot { border-color: var(--brand); background: var(--accent); color: var(--brand); }
.is-cancelled { opacity: 0.55; }
.is-cancelled em { color: var(--muted); }
/* Where the order stands, as saved by DANA's team */
.ty[data-state='confirmed'] .ty__chip--state,
.ty[data-state='shipped'] .ty__chip--state,
.ty[data-state='delivered'] .ty__chip--state { background: var(--brand); color: #fff; }
.ty[data-state='confirmed'] .ty__chip--state svg,
.ty[data-state='shipped'] .ty__chip--state svg,
.ty[data-state='delivered'] .ty__chip--state svg { color: #fff; }
.ty[data-state='cancelled'] .ty__chip--state { background: var(--miss-bg); color: var(--miss-ink); }
.ty[data-state='cancelled'] .ty__chip--state svg { color: var(--miss-ink); }
.ty__retry { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--miss-bg); color: var(--miss-ink); font-size: var(--fs-xs); font-weight: 600; }
.ty__retryBtn { min-height: 36px; padding: 0 14px; border: 1.5px solid currentColor; border-radius: var(--r-pill); background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.ty__retryBtn:hover { background: rgba(154, 74, 28, 0.08); }
.ty__delHidden { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-small); color: var(--muted); }
.ty__delHidden svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 4px; }

/* Delivery details: shown from this browser tab only */
.ty__del { margin: 0; border-top: 1px solid var(--line); }
.ty__del > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.ty__del dt { color: var(--muted); }
.ty__del dd { margin: 0; overflow-wrap: anywhere; }
[dir='rtl'] .ty__del dd[dir='ltr'] { text-align: right; }
.ty__priv { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.ty__priv svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; }

/* Reassurance, and the way back to the store: a plain secondary link, not a second button */
.ty__trust { list-style: none; margin: 0; padding: 4px 8px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--fs-xs); color: var(--ink-2); }
.ty__trust li { display: inline-flex; align-items: center; gap: 6px; }
.ty__trust svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--brand); }
.ty__cont { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; color: var(--brand); font-size: var(--fs-small); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ty__cont:hover { text-decoration-thickness: 2px; }
.ty__cont svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease-out); }
.ty__cont:hover svg { transform: translateX(3px); }
[dir='rtl'] .ty__cont svg { transform: scaleX(-1); }
[dir='rtl'] .ty__cont:hover svg { transform: scaleX(-1) translateX(3px); }

/* No order to show: a calm note, with no personal details */
.ty__empty { max-width: 620px; margin: 32px auto 0; padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); }
.ty__empty h1 { font-size: clamp(22px, 1.4vw + 16px, 30px); }
.ty__empty p { color: var(--ink-2); }
.ty__emptyRef { font-weight: 600; }
.ty__emptyActions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

@media (min-width: 900px) {
  .ty { padding-block: 28px 80px; }
  .ty__hero { flex-direction: row; gap: 20px; padding: 28px; }
  .ty__card { padding: 24px; }
  .ty__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; }
  .ty__side { grid-column: 2; grid-row: 1; }
  .ty__end { grid-column: 2; grid-row: 2; }
  .ty__main { grid-column: 1; grid-row: 1 / span 2; }
  .ty__facts { max-width: 560px; }
  .ty__askRow { flex-direction: row; align-items: center; gap: 14px; }
  .ty__askRow small { text-align: start; }
}

/* Entrance, only when the script found an order and motion is allowed: the check draws, the cards arrive in turn */
.ty--anim .ty__ok { opacity: 0; transform: scale(0.6); }
.ty--anim .ty__tick { stroke-dashoffset: 1; }
.ty--anim .ty__hero, .ty--anim .ty__card, .ty--anim .ty__end { opacity: 0; transform: translateY(12px); }
.ty--in .ty__ok { opacity: 1; transform: none; transition: opacity 0.3s var(--ease-out) 0.15s, transform 0.5s var(--ease-out) 0.15s; }
.ty--in .ty__tick { stroke-dashoffset: 0; transition: stroke-dashoffset 0.5s var(--ease-out) 0.5s; }
.ty--in .ty__hero, .ty--in .ty__card, .ty--in .ty__end { opacity: 1; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.ty--in .ty__side .ty__card { transition-delay: 0.1s; }
.ty--in .ty__main .ty__card:nth-child(1) { transition-delay: 0.16s; }
.ty--in .ty__main .ty__card:nth-child(2) { transition-delay: 0.22s; }
.ty--in .ty__main .ty__card:nth-child(3) { transition-delay: 0.28s; }
.ty--in .ty__end { transition-delay: 0.32s; }
