/* =========================================================
   Checkout
   ========================================================= */

.checkout-page {
  width: 100%;
  padding: 3.5rem 0 1.5rem;
}

.checkout-page__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: max(37rem, calc(100vh - 18rem));
}

.checkout-page__title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  line-height: 1.15;
}

.checkout-page__intro {
  width: min(44rem, calc(100% - 2rem));
  margin: 1.25rem auto 0;
  text-align: center;
  line-height: 1.55;
}

.checkout-account-contact {
  display: flex;
  justify-content: center;
  gap: .4rem;
  width: min(44rem, calc(100% - 2rem));
  margin: 1.5rem auto 0;
  text-align: center;
}

.checkout-account-contact__label,
.checkout-account-contact__value {
  display: inline-block;
}

.checkout-address-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

.checkout-address-selection {
  width: min(850px, calc(100% - 2rem));
  margin: 3.6rem auto 0;
  text-align: left;
}

.checkout-address-options {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.checkout-address-options__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.checkout-address-option {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  align-items: start;
  gap: .55rem;
  padding: .7rem 0;
  cursor: pointer;
}

.checkout-address-option + .checkout-address-option {
  margin-top: 2.2rem;
}

.checkout-address-option__radio {
  width: 1rem;
  height: 1rem;
  margin: .18rem 0 0;
  accent-color: var(--cBlack, #000);
  cursor: pointer;
}

.checkout-address-option__content {
  display: block;
  min-width: 0;
}

.checkout-address-option__title {
  display: block;
  font-weight: 700;
  line-height: 1.35;
}

.checkout-address-option__address {
  display: block;
  margin-top: .65rem;
  line-height: 1.55;
}

.checkout-notice {
  width: min(850px, calc(100% - 2rem));
  margin: 1.5rem auto 0;
  padding: .85rem 1rem;
  border: 1px solid var(--cGrayFlat, #777);
  line-height: 1.5;
  text-align: left;
}

.checkout-notice--error {
  border-color: var(--cBlack, #000);
  font-weight: 700;
}

.checkout-notice--warning {
  background: var(--cGrayLight, #e8e8e8);
}

.checkout-policy-blocked .checkout-page__inner > h1,
.checkout-policy-blocked .checkout-page__inner > p {
  text-align: center;
}

/* =========================================================
   Checkout footer navigation
   ========================================================= */

.checkout-address-footer {
  display: grid;
  grid-template-columns: 1fr minmax(18rem, 34rem) 1fr;
  align-items: end;
  gap: 2rem;
  width: 100%;
  margin-top: auto;
  padding: 3rem clamp(1rem, 4vw, 4rem) .75rem;
}

.checkout-address-footer__back {
  justify-self: start;
}

.checkout-address-footer__next {
  justify-self: end;
}

.checkout-address-management {
  justify-self: center;
  text-align: center;
}

.checkout-address-management__text {
  margin: 0 0 .45rem;
  line-height: 1.45;
}

.checkout-address-management .simple-text-link-button {
  display: inline-block;
}

/* Wird auch von den weiteren Checkout-Schritten verwendet. */
.checkout-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-top: auto;
  padding: 3rem clamp(1rem, 4vw, 4rem) .75rem;
}


/* =========================================================
   Checkout shipping
   ========================================================= */

.checkout-shipping-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

.checkout-shipping-content {
  width: min(850px, calc(100% - 2rem));
  margin: 3.5rem auto 0;
  text-align: center;
}

.checkout-shipping-card__title,
.checkout-shipping-address__title,
.checkout-import-notice__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.checkout-shipping-card__text {
  margin: .75rem auto 0;
  max-width: 42rem;
  line-height: 1.55;
}

.checkout-shipping-address {
  margin-top: 3rem;
}

.checkout-shipping-address__value {
  margin: .75rem 0 0;
  line-height: 1.55;
}

.checkout-import-notice {
  margin-top: 3rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--cGrayFlat, #777);
  text-align: left;
}

.checkout-import-notice__title {
  text-align: center;
}

.checkout-import-notice__text {
  margin: 1rem 0 0;
  line-height: 1.6;
}

.checkout-import-confirmation {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-top: 1.4rem;
  cursor: pointer;
}

.checkout-import-confirmation__checkbox {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: .2rem 0 0;
  accent-color: var(--cBlack, #000);
}

.checkout-import-confirmation__text {
  line-height: 1.5;
}

.checkout-form-error {
  margin: .9rem 0 0 1.7rem;
  font-weight: 700;
  line-height: 1.4;
}

@media (max-width: 560px) {
  .checkout-shipping-content {
    margin-top: 2.5rem;
  }

  .checkout-shipping-address,
  .checkout-import-notice {
    margin-top: 2.25rem;
  }

  .checkout-import-notice {
    padding: 1.15rem 1rem;
  }
}

/* =========================================================
   Checkout payment
   ========================================================= */

.checkout-payment-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

.checkout-payment-test-notice {
  width: min(42rem, calc(100% - 2rem));
  margin: 1.75rem auto 0;
  padding: .9rem 1rem;
  border: 1px solid #b00020;
  color: #b00020;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}

.checkout-payment-options {
  width: min(34rem, calc(100% - 2rem));
  margin: 3.5rem auto 0;
  padding: 0;
  border: 0;
}

.checkout-payment-options__legend {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.checkout-payment-option {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.4rem;
  padding: .8rem 1rem;
  border: 1px solid var(--cGrayFlat, #777);
  cursor: pointer;
  text-align: left;
}

.checkout-payment-option + .checkout-payment-option {
  margin-top: .75rem;
}

.checkout-payment-option:hover,
.checkout-payment-option.is-selected {
  border-color: var(--cBlack, #000);
}

.checkout-payment-option.is-selected {
  background: var(--cGrayLight, #e8e8e8);
}

.checkout-payment-option__radio {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--cBlack, #000);
  cursor: pointer;
}

.checkout-payment-option__label {
  font-weight: 700;
  line-height: 1.35;
}

.checkout-payment-error {
  width: min(34rem, calc(100% - 2rem));
  margin: 1rem auto 0;
  text-align: left;
}

@media (max-width: 560px) {
  .checkout-payment-test-notice {
    margin-top: 1.5rem;
  }

  .checkout-payment-options {
    margin-top: 2.25rem;
  }

  .checkout-payment-option {
    min-height: 3.2rem;
    padding: .75rem;
  }
}

/* =========================================================
   Checkout review
   ========================================================= */

.checkout-review-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

.checkout-review-content {
  width: min(850px, calc(100% - 2rem));
  margin: 3.5rem auto 0;
  text-align: left;
}

.checkout-review-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 3rem;
}

.checkout-review-info__title,
.checkout-review-section-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.checkout-review-info__value {
  margin: .65rem 0 0;
  line-height: 1.55;
}

.checkout-review-items {
  margin-top: 3.5rem;
}

.checkout-review-item-list {
  margin-top: 1rem;
  border-top: 1px solid var(--cGrayFlat, #777);
}

.checkout-review-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cGrayFlat, #777);
}

.checkout-review-item__description {
  min-width: 0;
}

.checkout-review-item__title {
  display: block;
  line-height: 1.4;
}

.checkout-review-item__variant {
    display: block;
    margin-top: .35rem;
    color: var(--cGrayDark, #333);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.checkout-review-item__price {
  white-space: nowrap;
  line-height: 1.4;
}

.checkout-review-import-notice {
  margin-top: 2.5rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--cGrayFlat, #777);
  line-height: 1.55;
}

.checkout-review-import-notice p {
  margin: .75rem 0 0;
}

.checkout-review-totals {
  width: min(100%, 26rem);
  margin: 2.5rem 0 0 auto;
}

.checkout-review-total-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  padding: .45rem 0;
  line-height: 1.4;
}

.checkout-review-total-row--muted {
  font-size: .88rem;
}

.checkout-review-total-row--grand {
  margin-top: .45rem;
  padding-top: .9rem;
  border-top: 1px solid var(--cBlack, #000);
  font-size: 1.05rem;
  font-weight: 700;
}

.checkout-review-contact {
  margin-top: 2rem;
  text-align: right;
  line-height: 1.5;
}

.checkout-review-contact strong {
  margin-left: .35rem;
}

@media (max-width: 700px) {
  .checkout-review-info-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .checkout-review-content {
    margin-top: 2.5rem;
  }
}

@media (max-width: 480px) {
  .checkout-review-item {
    grid-template-columns: 1fr;
    gap: .5rem;
  }

  .checkout-review-item__price {
    white-space: normal;
  }

  .checkout-review-contact {
    text-align: left;
  }
}

/* =========================================================
   Checkout success
   ========================================================= */

.checkout-success-content {
  width: min(620px, calc(100% - 2rem));
  margin: 0 auto;
  text-align: center;
}

.checkout-success-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.75rem;
  border: 1px solid var(--cBlack, #000);
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}

.checkout-success-summary {
  margin-top: 3rem;
  border-top: 1px solid var(--cGrayFlat, #777);
  border-bottom: 1px solid var(--cGrayFlat, #777);
}

.checkout-success-summary__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  padding: 1rem 0;
  text-align: left;
}

.checkout-success-summary__row + .checkout-success-summary__row {
  border-top: 1px solid var(--cGrayFlat, #777);
}

.checkout-success-summary__label {
  line-height: 1.4;
}

.checkout-success-summary__value {
  white-space: nowrap;
  text-align: right;
  line-height: 1.4;
}

.checkout-success-message {
  max-width: 38rem;
  margin: 2.5rem auto 0;
  line-height: 1.6;
}

.checkout-success-actions {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

@media (max-width: 480px) {
  .checkout-success-summary__row {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .checkout-success-summary__value {
    white-space: normal;
    text-align: left;
  }

  .checkout-success-actions .ui-button {
    width: 100%;
  }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 850px) {
  .checkout-page {
    padding-top: 2.5rem;
  }

  .checkout-address-selection {
    margin-top: 2.75rem;
  }

  .checkout-address-footer {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .checkout-address-management {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .checkout-address-footer__back {
    grid-column: 1;
    grid-row: 2;
  }

  .checkout-address-footer__next {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 560px) {
  .checkout-page {
    padding-top: 2rem;
  }

  .checkout-page__inner {
    min-height: 0;
  }

  .checkout-account-contact {
    display: block;
  }

  .checkout-account-contact__value {
    display: block;
    margin-top: .25rem;
  }

  .checkout-address-selection {
    width: calc(100% - 2rem);
    margin-top: 2.25rem;
  }

  .checkout-address-option + .checkout-address-option {
    margin-top: 1.5rem;
  }

  .checkout-address-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 2.5rem 1rem .5rem;
  }

  .checkout-address-management {
    order: 1;
    margin-bottom: .75rem;
  }

  .checkout-address-footer__next {
    order: 2;
  }

  .checkout-address-footer__back {
    order: 3;
  }

  .checkout-address-footer .ui-button {
    width: 100%;
  }

  .checkout-actions {
    flex-direction: column-reverse;
    padding: 2.5rem 1rem .5rem;
  }

  .checkout-actions .ui-button {
    width: 100%;
  }
}

/* AP4.2 additions; original checkout geometry and typography remain intact. */
.checkout-hold{margin:1.25rem 0;padding:1rem 1.25rem;border:1px solid currentColor;border-radius:4px;}
.checkout-hold__clock{margin:0 0 .4rem;font-weight:600;font-variant-numeric:tabular-nums;}
.checkout-hold__hint{margin:0;font-size:.9em;opacity:.8;}
.checkout-notice p:last-child{margin-bottom:0;}
.checkout-page button:disabled{cursor:not-allowed;opacity:.5;}
