.pisell-big-sale.pisell-big-sale-tmpl--SelfServiceKiosk {
  flex: 1;
  min-width: 0;
  background: transparent;

  // Device pages scroll inside their shell and follow the host's scaled height.
  &.pisell-big-sale--phone {
    min-height: 0;
    max-height: 100%;
    overflow: hidden;

    > .pisell-big-sale__layout {
      flex-direction: row;
      overflow: hidden;
    }
  }
}

.pisell-self-service-kiosk-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.pisell-self-service-kiosk {
  background: #f6f7f9;
  color: #17212f;
  // Tokens consumed by the existing self-service order-line and wallet components.
  --pisell-kiosk-cart-media-width: 148px;
  --pisell-kiosk-cart-rail-width: 240px;
  --pisell-kiosk-cart-content-padding: 24px;
  --pisell-kiosk-cart-title-size: 32px;
  --pisell-kiosk-cart-price-size: 30px;
  --pisell-kiosk-device-primary: var(--kiosk-accent);

  &__shopping,
  &__catalog,
  &__cart,
  &__payment,
  &__result {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
  }
  &__catalog[hidden] {
    display: none;
  }
  &__catalog {
    position: relative;
    --pisell-kiosk-catalog-inset: calc(
      var(--pisell-kiosk-footer-clearance) + var(--pisell-kiosk-offers-height, 0px)
    );
  }
  &__payment > .pisell-self-service-payment,
  &__cart {
    box-sizing: border-box;
    padding-bottom: var(--pisell-kiosk-footer-clearance);
  }
  &__offers {
    position: absolute;
    inset-inline: 18px;
    bottom: var(--pisell-kiosk-footer-clearance);
    z-index: 1;
    max-height: min(37%, calc(100% - var(--pisell-kiosk-footer-clearance)));
    overflow: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.14);
  }
  &__offer-wallet .pisell-sale-detail-main {
    background: #fff;
  }
  &__cart-header {
    flex: none;
    padding: 28px 28px 20px;
    h1 {
      margin: 0;
      font-size: 46px;
      line-height: 1.13;
      font-weight: 750;
      overflow-wrap: anywhere;
    }
  }
  &__cart-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 0 28px;
    > .pisell-sale-detail {
      flex: 1;
    }
    .pisell-sale-detail-scroll-content {
      overscroll-behavior-y: contain;
    }
    .pisell-sale-detail-cart-scroll-panel:not(:first-child),
    .pisell-sale-detail-promotion-wallet-panels {
      margin-top: 16px;
    }
    .pisell-sale-detail-cart-items {
      flex: 1 0 auto;
      gap: 16px;
    }
    .pisell-sale-detail-promotion-wallet-panels {
      max-height: 50%;
    }
    .pisell-sale-detail-footer {
      max-height: 45%;
      margin-top: 16px;
      overflow-y: auto;
      border-radius: 18px;
    }
    .pisell-cart-sku-card-a12__edit {
      width: 64px;
      height: 64px;
      padding: 0;
      border-radius: 50%;
    }
    .pisell-cart-sku-card-a12__quantity-control .numeric-stepper {
      grid-template-columns: 64px minmax(64px, 1fr) 64px;
      width: 100%;
      height: auto;
      gap: 6px;
      .numeric-stepper-button {
        width: 64px;
        height: 64px;
        border-radius: 50%;
        &:not(.numeric-stepper-button-disabled) {
          background: var(--kiosk-accent);
        }
        &.numeric-stepper-minus:not(.numeric-stepper-button-disabled) {
          border: 1px solid #d0d5dd;
          background: #fff;
          color: #1d2939;
        }
        svg {
          width: 28px;
          height: 28px;
        }
      }
      .numeric-stepper-display {
        width: 64px;
        height: 52px;
        padding: 0;
        border-radius: 8px;
        font-size: 28px;
      }
    }
    .pisell-sale-detail-amount-details {
      padding: 8px 20px;
      &__summary-left {
        font-size: 30px;
      }
      &__details-trigger {
        min-height: 64px;
        padding-inline: 12px;
        font-size: 24px;
      }
      &__details--open {
        max-height: none;
      }
      .pisell-lowcode__subtotal-item-label,
      .pisell-lowcode__subtotal-item-value {
        font-size: 24px;
        line-height: 1.5;
      }
    }
  }
  &__notice,
  &__submitted {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: auto;
    max-width: min(90%, 680px);
    padding: 32px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 22px;
    text-align: center;
    overflow-wrap: anywhere;
    h1,
    p {
      margin: 0;
    }
    p {
      font-size: 26px;
    }
    button {
      min-height: 64px;
      font-size: 24px;
    }
  }
  &__result {
    overflow: auto;
  }
}

.pisell-self-service-kiosk-note-modal {
  .note-modal-content textarea {
    min-height: 90px;
    font-size: 24px;
  }
  .action-buttons button {
    min-height: 64px;
    padding-inline: 20px;
  }
}

.pisell-self-service-kiosk__cart-body,
.pisell-self-service-kiosk__offer-wallet {
  --pisell-color-primary: var(--kiosk-accent);
  .pisell-sale-detail-promotion-wallet-panel {
    &__banner {
      padding: 18px 20px;
    }
    &__banner-title {
      font-size: 28px;
      line-height: 1.25;
    }
    &__summary,
    &__banner-action,
    &__tool,
    &__record-action {
      min-height: 64px;
    }
    &__banner-action,
    &__title,
    &__record-title,
    &__record-amount {
      font-size: 24px;
      line-height: 1.25;
    }
    &__banner-description,
    &__summary-action-label,
    &__record-meta,
    &__record-reason,
    &__tool,
    &__record-action {
      font-size: 20px;
      line-height: 1.35;
    }
  }
  .pisell-sale-detail,
  .pisell-sale-detail-tmpl-a,
  .pisell-sale-detail-tmpl-a .pisell-sale-detail-tmpl-body,
  .pisell-sale-detail-tmpl-a .pisell-sale-detail-main {
    background: transparent;
  }
  .pisell-sale-detail-tmpl-a .pisell-sale-detail-main {
    gap: 0;
    padding: 0;
  }
}

// The catalog wallet contains offers only and sizes to its content. The cart
// uses Template A's full-height layout so only its order lines scroll.
.pisell-sale-detail.pisell-self-service-kiosk__offer-wallet {
  height: auto;
  .pisell-sale-detail-tmpl-a,
  .pisell-sale-detail-inline-layout,
  .pisell-sale-detail-tmpl-content,
  .pisell-sale-detail-cart-scroll-panel,
  .pisell-sale-detail-scroll-content {
    height: auto;
    overflow: visible;
  }
}
