/* Kasse: einheitliche Abstände über (32px) und unter (16px) den Abschnittsüberschriften */
.checkout-step { margin: 0 0 32px; padding: 0; border: 0; min-width: 0; }
.checkout-step > :last-child { margin-bottom: 0; }
.checkout-step__title { margin: 0 0 18px; font-size: 1.25rem; line-height: 1.125; }

/* Eingabefelder mit schwebendem Label */
.field { position: relative; margin-top: 16px; }
.checkout-step__title + .field,
.checkout-step__title + .address-form > :first-child { margin-top: 0; }

.field input,
.field select {
  display: block;
  width: 100%;
  height: 3.125em;
  padding: 14px 7px;
  border: 1px solid rgb(18 18 18 / 80%);
  border-radius: 4px;
  background: #fff;
  color: #2b2d2f;
  font: inherit;
  line-height: 14px;
  appearance: none;
}

.field input:focus,
.field input:not(:placeholder-shown) { padding: 21px 7px 7px; }

.field select { padding-top: 14px; padding-bottom: 0; line-height: 1.6; }

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: #2b2d2f; box-shadow: 0 0 0 1px #2b2d2f; }

.field label {
  position: absolute;
  /* Versalmitte auf Feldmitte: 43.75px / 2 − (Halbdurchschuss 1.5px + Oberlänge 14px − Versalhöhe 10.4px / 2) */
  top: 11.58px;
  left: 7.875px;
  max-width: calc(100% - 32px);
  overflow: hidden;
  color: rgb(18 18 18 / 70%);
  line-height: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform-origin: 0 0;
  transition: transform 0.15s;
  pointer-events: none;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label { transform: translateY(-8px) scale(0.75); }

/* Stamm von „L“ bündig mit dem Wert (8px + 0.129 × 14px − 0.131 × 10.5px); Versalien 7.4px unter dem Rand wie bei hochgerutschten Labels */
.field--select label { top: 3.83px; left: 8.43px; color: #2b2d2f; font-size: 0.75rem; line-height: 1.5; }

.field--select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 24px;
  height: 24px;
  background: currentColor;
  mask: url("../images/icons/chevron-down.svg") center / contain no-repeat;
  transform: translateY(-50%);
  pointer-events: none;
}

.field--invalid input,
.field--invalid select { border-color: var(--color-danger); }

.field__error { margin: 0.3em 0 0; color: var(--color-danger); font-size: 0.8rem; line-height: 1.4; }

.address-form { display: flex; flex-wrap: wrap; gap: 0 12px; margin-bottom: 16px; }
.address-form > * { flex: 1 1 100%; }
.address-form > .field--half { flex: 1 1 calc(50% - 6px); min-width: 0; }
.address-form > .field--narrow { flex: 0 0 9.5rem; min-width: 0; }
.address-form > .field--fill { flex: 1 1 0; min-width: 0; }

/* Kontrollkästchen */
.checkbox { display: flex; align-items: flex-start; gap: 12.25px; margin-top: 14px; font-size: 0.875rem; line-height: 1.5; }

.checkbox input {
  flex: none;
  width: 18.375px;
  height: 18.375px;
  margin: 0;
  border: 1px solid rgb(25 23 17 / 48%);
  border-radius: 4px;
  background: #fff center / 75% no-repeat;
  appearance: none;
}

.checkbox input:checked { background-image: url("../images/icons/check.svg"); }
.checkbox input[required] { border-width: 2px; }
.checkbox input:focus-visible { outline: 1.5px dotted var(--color-text); outline-offset: 2px; }
.checkbox label { cursor: pointer; }
.checkbox a { text-decoration: none; }
.checkbox--invalid { color: var(--color-danger); }
.checkbox--invalid .field__error { margin: 0; }

/* Auswahl (Versand, Zahlungsart) */
.choice-list { display: block; }

.choice {
  display: block;
  padding: 16px;
  border-radius: 4px;
  cursor: pointer;
}

.choice:hover:not(.choice--static, :has(input:checked)) { background: #f9f9f9; }

.choice:has(input:checked),
.choice--static { background: var(--gradient-panel); }

.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:focus-visible) { outline: 1.5px dotted var(--color-text); outline-offset: -3px; }

.choice__label { display: block; line-height: 24px; }
.choice:has(input:checked) .choice__label,
.choice--static .choice__label { font-weight: 700; }
.choice__description { display: block; font-size: 0.875rem; line-height: 1.55; margin: var(--space-03rem) 0 0; }

/* Zahlungsart: Kopfzeile wie die Einträge des Stripe Payment Element (Symbol 24px, Beschriftung ab 76px, Zeile 62px),
   Beschreibung nur bei Auswahl, mit Stripes Abstand zwischen Kopfzeile und Hinweistext */
.choice__head { display: flex; align-items: center; min-height: 30px; }
.choice__icon { flex: none; width: 24px; height: 24px; margin-right: 36px; }
.choice--method .choice__description { margin-top: 20px; }
.choice--method:not(:has(input:checked)) .choice__description { display: none; }

/* Stripe Payment Element: Online-Zahlungsarten in derselben Liste wie Rechnung (Stil in js/services/stripe.js) */
.payment-element__status { margin: 0; padding: 16px; font-size: 0.875rem; line-height: 1.55; }
.choice-list + .field__error { margin-top: 8px; }

/* Express-Zahlung (Direktzahlungsbuttons des Stripe Express Checkout Element) über dem Formular */
.express-checkout .checkout-step__title { text-align: center; }
.express-checkout .checkbox { margin-top: 0; }
.express-checkout__buttons { margin-top: 16px; }
.express-checkout__or { display: flex; align-items: center; gap: 16px; margin: 32px 0 0; color: rgb(18 18 18 / 70%); font-size: 1rem; }
.express-checkout__or::before,
.express-checkout__or::after { content: ""; flex: 1; border-top: 1px solid var(--color-line); }

/* Rechtliches */
.fine-print { margin: 8.96px 0; font-size: 0.875rem; line-height: 1.68; }
.choice--static + .fine-print { margin-top: 25px; }
.checkbox + .fine-print { margin-top: 18px; line-height: 1.5; }
.checkbox + .fine-print + .fine-print { margin-top: 8px; }

.order-note { display: block; width: 100%; margin-top: 14px; padding: 11.2px; border: 1px solid #50575e; background: #fff; font: inherit; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Bestellübersicht: Fläche und Anordnung wie im Warenkorb (.cart__panel), Schrift und Cover kleiner */
.order-summary__items { margin: 0; padding: 0; list-style: none; }

.order-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  column-gap: 24px;
  margin: 0;
  padding-block: 18px;
  font-size: 0.875rem;
  line-height: 1.6;
}

.order-item:first-child { padding-top: 0; }
.order-item:last-child { padding-bottom: 16px; }

.order-item__image { position: relative; }
.order-item__image img { display: block; width: 48px; height: auto; border-radius: var(--radius-cover); }

.order-item__quantity {
  position: absolute;
  top: -10px;
  right: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 4.9px;
  border: 2px solid rgb(18 18 18 / 11%);
  border-radius: 12.25px;
  background: #fff;
  box-shadow: 0 0 0 2px #fff;
  color: #000;
  font-size: 0.875rem;
  line-height: 1;
}

.order-item__description { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; padding-bottom: 14px; }
.order-item__name { margin: 3px 0 0; font-size: inherit; line-height: 1.4; color: var(--color-ink); }
.order-item__price { margin: 0; line-height: 1.2; }
.order-item__total { margin: 3px 0 0; font-weight: 700; line-height: 1.4; text-align: right; white-space: nowrap; }

.order-summary .totals { margin-top: 24px; padding-top: 28px; padding-bottom: 0; }