/* ==========================================================================
   FoodSync — Bedankpagina / orderbevestiging
   --------------------------------------------------------------------------
   Nieuwe, schone laag. Namespace: .fs-ty-*

   KLEURBELEID (bewust):
   - De NEUTRALEN (kaartvlak, tekst, borders) staan hier vast per thema.
     Reden: de branding-tokens --fs-surface en --fs-text worden per merk los
     ingesteld en kunnen elkaar tegenspreken — een wit surface met witte tekst
     in het dark theme levert een onleesbare pagina op. De bevestigingspagina
     moet bij élk merk leesbaar zijn, dus die combinatie leggen we hier vast.
   - Uit de branding komt alleen wat veilig is: de ACCENTKLEUR (--fs-primary)
     en de VORM (--fs-radius-card / --fs-radius-btn, dus ook fs-shape-soft en
     fs-shape-square). Zo blijft de pagina merkgebonden zonder leesrisico.
   - Wil je toch de merkkleuren voor het kaartvlak: zet in het blok hieronder
     --fs-ty-surface / --fs-ty-text / --fs-ty-border-color terug op de
     var(--fs-...)-varianten. Dat is één plek, verder verandert er niets.
   - Geen !important-stapeling: de oude .fs-thankyou-* regels raken deze
     markup niet, want de klassenamen zijn nieuw.
   ========================================================================== */

.fs-ty {
  /* Vorm + accent: wél uit de branding-instellingen */
  --fs-ty-radius: var(--fs-shape-card-radius, var(--fs-radius-card, 12px));
  --fs-ty-radius-inner: max(0px, calc(var(--fs-ty-radius) - 4px));
  --fs-ty-btn-radius: var(--fs-radius-btn, 6px);
  --fs-ty-accent: var(--fs-primary, #f72828);
  --fs-ty-on-accent: var(--fs-primary-text, var(--fs-primary-contrast, #fff));
  --fs-ty-border-width: 1px;

  /* Neutralen: vast. Standaard = licht. */
  --fs-ty-surface: #ffffff;
  --fs-ty-text: #101828;
  --fs-ty-heading: #101828;
  --fs-ty-muted: #667085;
  --fs-ty-border-color: rgba(16, 24, 40, .11);
  --fs-ty-track: rgba(16, 24, 40, .13);
  --fs-ty-inset: rgba(16, 24, 40, .04);
  --fs-ty-accent-soft: rgba(16, 24, 40, .08);

  --fs-ty-ok: #15803d;
  --fs-ty-warn: #b45309;
  --fs-ty-err: #b91c1c;

  width: 100%;
  padding: 46px 20px 76px;
  font-family: var(--fs-font-family, Inter, system-ui, sans-serif);
  color: var(--fs-ty-text);
}

/* Donker thema: de pagina blijft donker; de kaarten zijn bewust wit. */
body.fs-theme-dark .fs-ty,
.fs-theme-dark .fs-ty {
  --fs-ty-surface: #171B22;
  --fs-ty-text: #FFFFFF;
  --fs-ty-heading: #FFFFFF;
  --fs-ty-muted: #A0A9B8;
  --fs-ty-border-color: rgba(255, 255, 255, .11);
  --fs-ty-track: rgba(255, 255, 255, .15);
  --fs-ty-inset: rgba(255, 255, 255, .05);
  --fs-ty-accent-soft: rgba(255, 255, 255, .10);

  --fs-ty-ok: #37D07A;
  --fs-ty-warn: #E0A32E;
  --fs-ty-err: #F87171;
}

body.fs-theme-dark .fs-ty__card,
.fs-theme-dark .fs-ty__card {
  --fs-ty-surface: #ffffff;
  --fs-ty-text: #101828;
  --fs-ty-heading: #101828;
  --fs-ty-muted: #667085;
  --fs-ty-border-color: rgba(16, 24, 40, .11);
  --fs-ty-track: rgba(16, 24, 40, .13);
  --fs-ty-inset: rgba(16, 24, 40, .04);
  --fs-ty-accent-soft: rgba(16, 24, 40, .08);
  --fs-ty-ok: #15803d;
  --fs-ty-warn: #b45309;
  --fs-ty-err: #b91c1c;
  color: var(--fs-ty-text);
}

/* Licht thema expliciet, voor het geval een merk beide klassen zet. */
body.fs-theme-light .fs-ty,
.fs-theme-light .fs-ty {
  --fs-ty-surface: #ffffff;
  --fs-ty-text: #101828;
  --fs-ty-heading: #101828;
  --fs-ty-muted: #667085;
  --fs-ty-border-color: rgba(16, 24, 40, .11);
  --fs-ty-track: rgba(16, 24, 40, .13);
  --fs-ty-inset: rgba(16, 24, 40, .04);
  --fs-ty-accent-soft: rgba(16, 24, 40, .08);

  --fs-ty-ok: #15803d;
  --fs-ty-warn: #b45309;
  --fs-ty-err: #b91c1c;
}

/* Tekstkleur hard doorzetten: sommige oudere regels in storefront.css zetten
   kleuren met !important op generieke selectors binnen .fs-shop. */
.fs-ty,
.fs-ty p,
.fs-ty span,
.fs-ty div,
.fs-ty dt,
.fs-ty dd,
.fs-ty a,
.fs-ty h1,
.fs-ty h2,
.fs-ty h3,
.fs-ty strong {
  color: inherit;
}

.fs-ty__card,
.fs-ty__card * {
  color: inherit;
}

.fs-ty__shell {
  width: min(1000px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --------------------------------------------------------------------------
   Hero: tekst links, ETA-ring rechts
   -------------------------------------------------------------------------- */
.fs-ty__hero {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 8px 2px 12px;
}

.fs-ty__hero-text {
  flex: 1 1 260px;
  min-width: 260px;
}

.fs-ty__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--fs-ty-accent);
}

.fs-ty__eyebrow--ok { color: var(--fs-ty-ok); }
.fs-ty__eyebrow--warn { color: var(--fs-ty-warn); }
.fs-ty__eyebrow--err { color: var(--fs-ty-err); }

.fs-ty__title {
  margin: 10px 0 0;
  font-size: clamp(25px, 3.2vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--fs-ty-heading);
}

.fs-ty__lead {
  margin: 9px 0 0;
  max-width: 52ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fs-ty-muted);
}

.fs-ty__lead strong {
  color: var(--fs-ty-text);
  font-weight: 600;
}

/* ETA-ring */
.fs-ty__dial {
  position: relative;
  flex: none;
  width: 186px;
  height: 186px;
}

.fs-ty__dial-svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fs-ty__dial-track {
  fill: none;
  stroke: var(--fs-ty-track);
  stroke-width: 8;
}

/* De ring loopt bewust in groen, niet in de merkkleur: op een rood merk
   wordt de pagina anders één rode vlek en leest voortgang als waarschuwing.
   Merkkleur terug? Zet --fs-ty-dial op var(--fs-ty-accent). */
.fs-ty__dial-prog {
  fill: none;
  stroke: var(--fs-ty-dial, var(--fs-ty-ok));
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 521;
  stroke-dashoffset: 521;
  animation: fs-ty-fill 1.1s .2s cubic-bezier(.3, .9, .3, 1) forwards;
}

@keyframes fs-ty-fill {
  to { stroke-dashoffset: var(--fs-ty-dial-offset, 200); }
}

@media (prefers-reduced-motion: reduce) {
  .fs-ty__dial-prog {
    animation: none;
    stroke-dashoffset: var(--fs-ty-dial-offset, 200);
  }
}

.fs-ty__dial-mid {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-align: center;
}

.fs-ty__dial-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--fs-ty-muted);
}

.fs-ty__dial-value {
  margin-top: 3px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--fs-ty-heading);
}

.fs-ty__dial-value--text {
  max-width: 130px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.fs-ty__dial-sub {
  font-size: 12.5px;
  color: var(--fs-ty-muted);
}

.fs-ty__dial-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--fs-ty-muted);
}

.fs-ty__pip {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--fs-ty-accent);
}

/* --------------------------------------------------------------------------
   Kaarten — border + radius exact volgens de branding-instellingen
   -------------------------------------------------------------------------- */
.fs-ty__card {
  /* Deze witte bevestigingskaarten zijn geen merkvlak. De klant kan hun
     neutralen daarom niet via de storefront-branding onleesbaar maken. */
  --fs-heading: #101828;
  --fs-heading-color: #101828;
  --fs-text: #101828;
  --fs-muted: #667085;
  background: var(--fs-ty-surface);
  border: var(--fs-ty-border-width) solid var(--fs-ty-border-color);
  border-radius: var(--fs-ty-radius);
  color: #101828;
  overflow: hidden;
}

.fs-ty__card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-bottom: var(--fs-ty-border-width) solid var(--fs-ty-border-color);
}

.fs-ty__card-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #101828 !important;
}

.fs-ty__card-body {
  padding: 6px 20px 16px;
}

.fs-ty__card-body--pad {
  padding: 16px 20px 18px;
}

/* --------------------------------------------------------------------------
   Statusrail
   -------------------------------------------------------------------------- */
.fs-ty__rail { padding: 24px 24px 20px; }

.fs-ty__steps {
  display: flex;
  align-items: flex-start;
}

.fs-ty__step {
  position: relative;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.fs-ty__step-ring {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 11px;
  border-radius: 50%;
  background: var(--fs-ty-inset);
  border: 1px solid var(--fs-ty-border-color);
  color: var(--fs-ty-muted);
}

.fs-ty__courier-icon {
  color: #fff;
  stroke-width: 1.8;
}

.fs-ty__step-ring--courier {
  background: #475467;
  border-color: #475467;
}

.fs-ty__step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fs-ty-muted);
}

.fs-ty__step-time {
  margin-top: 3px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--fs-ty-muted);
}

.fs-ty__step.is-done .fs-ty__step-ring {
  background: var(--fs-ty-accent);
  border-color: var(--fs-ty-accent);
  color: var(--fs-ty-on-accent);
}

.fs-ty__step.is-done .fs-ty__step-title { color: var(--fs-ty-text); }

.fs-ty__step.is-current .fs-ty__step-ring {
  background: transparent;
  border: 2px solid var(--fs-ty-accent);
  color: var(--fs-ty-accent);
  box-shadow: 0 0 0 4px var(--fs-ty-accent-soft);
}

.fs-ty__step.is-current .fs-ty__step-title { color: var(--fs-ty-text); }
.fs-ty__step.is-current .fs-ty__step-time { color: var(--fs-ty-accent); }

.fs-ty__step-line {
  position: absolute;
  top: 20px;
  left: calc(50% + 26px);
  z-index: 1;
  width: calc(100% - 52px);
  height: 2px;
  overflow: hidden;
  background: var(--fs-ty-track);
}

.fs-ty__step-line > i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--fs-ty-accent);
}

.fs-ty__step.is-done .fs-ty__step-line > i { width: 100%; }
.fs-ty__step.is-current .fs-ty__step-line > i { width: 40%; }
.fs-ty__step:last-child .fs-ty__step-line { display: none; }

.fs-ty__rail-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: var(--fs-ty-border-width) solid var(--fs-ty-border-color);
}

.fs-ty__who {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fs-ty__who-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--fs-ty-inset);
  border: 1px solid var(--fs-ty-border-color);
  color: var(--fs-ty-muted);
}

.fs-ty__who-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fs-ty-text);
}

.fs-ty__who-note {
  font-size: 12.5px;
  color: var(--fs-ty-muted);
}

.fs-ty__rail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   Knoppen
   -------------------------------------------------------------------------- */
.fs-ty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--fs-ty-btn-radius);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: filter .16s ease, border-color .16s ease, color .16s ease;
}

.fs-ty__btn--primary {
  background: var(--fs-ty-accent);
  border: 1px solid var(--fs-ty-accent);
  color: var(--fs-ty-on-accent);
}

.fs-ty__btn--primary:hover { filter: brightness(1.06); }

.fs-ty__btn--ghost {
  background: transparent;
  border: 1px solid var(--fs-ty-border-color);
  color: var(--fs-ty-text);
}

.fs-ty__btn--ghost:hover {
  border-color: var(--fs-ty-accent);
  color: var(--fs-ty-accent);
}

/* --------------------------------------------------------------------------
   Onderbouw: bestelling + zijkolom
   -------------------------------------------------------------------------- */
.fs-ty__grid {
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  gap: 18px;
  align-items: start;
}

.fs-ty__col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* Regels */
.fs-ty__line {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--fs-ty-border-color);
}

.fs-ty__line:last-child { border-bottom: none; }

.fs-ty__qty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--fs-ty-radius-inner);
  background: var(--fs-ty-inset);
  border: 1px solid var(--fs-ty-border-color);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fs-ty-muted);
}

.fs-ty__line-main { min-width: 0; }

.fs-ty__line-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fs-ty-text);
}

.fs-ty__line-meta {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fs-ty-muted);
}

.fs-ty__line-price {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--fs-ty-text);
}

.fs-ty__line-price--free { color: var(--fs-ty-ok); }

.fs-ty__subhead {
  margin: 16px 0 2px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fs-ty-muted);
}

/* Totalen */
.fs-ty__sums {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--fs-ty-border-color);
}

.fs-ty__sum {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: var(--fs-ty-muted);
}

.fs-ty__sum--total {
  margin-top: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--fs-ty-border-color);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--fs-ty-heading);
}

/* Sleutel/waarde */
.fs-ty__kv {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--fs-ty-border-color);
  font-size: 13.5px;
}

.fs-ty__kv:last-child { border-bottom: none; }
.fs-ty__kv dt { color: var(--fs-ty-muted); }

.fs-ty__kv dd {
  margin: 0 0 0 auto;
  text-align: right;
  font-weight: 600;
  color: var(--fs-ty-text);
}

/* Statuspil */
.fs-ty__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-size: 11.5px;
  font-weight: 700;
}

.fs-ty__pill--success { color: var(--fs-ty-ok); }
.fs-ty__pill--warning { color: var(--fs-ty-warn); }
.fs-ty__pill--error { color: var(--fs-ty-err); }

/* Vervolgacties */
.fs-ty__next {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--fs-ty-border-color);
  text-decoration: none;
  color: inherit;
}

.fs-ty__next:last-child { border-bottom: none; }
.fs-ty__next:hover .fs-ty__next-title { color: var(--fs-ty-accent); }

.fs-ty__next-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--fs-ty-radius-inner);
  background: var(--fs-ty-inset);
  border: 1px solid var(--fs-ty-border-color);
  color: var(--fs-ty-muted);
}

.fs-ty__next-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fs-ty-text);
  transition: color .16s ease;
}

.fs-ty__next-desc {
  font-size: 12.5px;
  color: var(--fs-ty-muted);
}

.fs-ty__next-go {
  display: flex;
  margin-left: auto;
  color: var(--fs-ty-muted);
}

.fs-ty__help-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fs-ty-muted);
}

.fs-ty__help-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 13px;
}

/* Iconen: lijnstijl, erven de tekstkleur (dus wit in dark theme) */
.fs-ty__ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fs-ty__ico--sm { width: 14px; height: 14px; }
.fs-ty__ico--lg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Foutstatus (mislukt / geannuleerd / niet gevonden)
   -------------------------------------------------------------------------- */
.fs-ty__notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
}

.fs-ty__notice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  border: 1px solid currentColor;
}

.fs-ty__notice--error .fs-ty__notice-icon { color: var(--fs-ty-err); }
.fs-ty__notice--warning .fs-ty__notice-icon { color: var(--fs-ty-warn); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 880px) {
  .fs-ty__grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .fs-ty { padding: 30px 14px 56px; }

  .fs-ty__hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 22px;
  }

  .fs-ty__dial {
    width: 158px;
    height: 158px;
    margin: 0 auto;
  }

  .fs-ty__rail { padding: 18px 16px 16px; }
  .fs-ty__card-head { padding: 14px 16px; }
  .fs-ty__card-body { padding: 4px 16px 14px; }
  .fs-ty__card-body--pad { padding: 14px 16px 16px; }

  .fs-ty__step-title { font-size: 12px; }
  .fs-ty__step-time { font-size: 11px; }

  .fs-ty__step-ring {
    width: 34px;
    height: 34px;
  }

  .fs-ty__step-line {
    top: 17px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
  }

  .fs-ty__rail-actions {
    margin-left: 0;
    width: 100%;
  }

  .fs-ty__rail-actions .fs-ty__btn { flex: 1 1 auto; }
}

@media (max-width: 420px) {
  .fs-ty__steps { gap: 0; }
  .fs-ty__step-title { font-size: 11px; }
}
