// Shared fixed metrics for vending, self-service carts and payment navigation.
// Keep 820px-based spacing, with larger touch targets independent of host width.
@bar-unit: 0.640625px;
@bar-button-height: 84px;
@bar-button-min-width: 144px;
@bar-action-padding: 16px;
@bar-icon-size: 24px;
@bar-arrow-size: 22px;
@bar-amount-label-size: 20px;
@bar-amount-size: 28px;

.kiosk-self-service-bar-metrics() {
  --pisell-kiosk-cart-capsule-width: calc(100% - 36 * @bar-unit);
  --pisell-kiosk-cart-capsule-bottom: max(calc(30 * @bar-unit), env(safe-area-inset-bottom, 0px));
  --pisell-kiosk-cart-capsule-min-height: 132px;
  --pisell-kiosk-cart-capsule-content-gap: calc(20 * @bar-unit);
}

.kiosk-self-service-bar-frame() {
  position: absolute;
  right: calc(18 * @bar-unit);
  bottom: var(--pisell-kiosk-cart-capsule-bottom);
  left: calc(18 * @bar-unit);
  display: flex;
  flex-flow: row nowrap;
  width: var(--pisell-kiosk-cart-capsule-width);
  min-height: var(--pisell-kiosk-cart-capsule-min-height);
  align-items: center;
  gap: calc(8 * @bar-unit);
  box-sizing: border-box;
  padding: calc(27 * @bar-unit) 21.32px; // 820 * 2.6%.
  border: 1px solid rgba(89, 113, 166, 0.4);
  border-radius: 999px;
  background: rgba(14, 22, 40, 0.96);
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px);
}

.kiosk-self-service-bar-button() {
  display: inline-flex;
  flex: none;
  min-width: @bar-button-min-width;
  min-height: @bar-button-height;
  align-items: center;
  justify-content: center;
  gap: calc(8 * @bar-unit);
  box-sizing: border-box;
  padding: 0 @bar-action-padding;
  border-radius: 999px;
  font-size: 24px;
  font-weight: 900;
  font-family: inherit;
  line-height: 1.25;
  touch-action: manipulation;
  cursor: pointer;

  &:disabled {
    opacity: 0.35;
    cursor: default;
  }
  &:not(:disabled):active {
    transform: scale(0.97);
  }

  &,
  span {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }
}

.kiosk-self-service-bar-action-slot() {
  display: flex;
  flex: 0 1 auto;
  min-width: min(36%, @bar-button-min-width);
  max-width: 36%;
  align-items: center;
  > button {
    flex: 0 1 auto;
    max-width: 100%;
    min-width: min(100%, @bar-button-min-width);
  }
}

.kiosk-self-service-bar-arrow() {
  display: inline-flex;
  flex: none;
  width: @bar-arrow-size;
  height: @bar-arrow-size;
  align-self: center;
  align-items: center;
  justify-content: center;
  font-size: @bar-arrow-size;
  line-height: 1;
  fill: currentColor;
  stroke: none;
  > .anticon,
  svg {
    display: block;
    width: 100%;
    height: 100%;
  }
}

.kiosk-self-service-bar-icon-button() {
  width: @bar-button-height;
  min-width: @bar-button-height;
  height: @bar-button-height;
  min-height: @bar-button-height;
  padding: 0;
}

.kiosk-self-service-bar-label() {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
