.vm-customer-canvas .vm-redeem-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--vm-customer-soft);

  .vm-redeem-brand {
    display: flex;
    flex: 0 0 80px;
    align-items: center;
    padding: 0 var(--vm-customer-gutter);
    .vm-customer-brand-name {
      font-size: 24px;
    }
  }
  .vm-redeem-heading {
    flex-shrink: 0;
    padding: 24px var(--vm-customer-gutter) 28px;
    h1 {
      font-size: clamp(36px, 5.7cqw, 64px);
      line-height: 1.1;
      overflow-wrap: anywhere;
    }
  }
  .vm-redeem-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 var(--vm-customer-gutter) var(--vm-bottom-bar-space);
  }
  .vm-redeem-scanner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: clamp(28px, 3.75cqw, 42px) 24px;
    border: 1px solid rgba(36, 28, 63, 0.1);
    border-radius: 40px;
    background: #fff;
    text-align: center;
  }
  .vm-redeem-scanner-symbol {
    position: relative;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: clamp(200px, 31cqw, 344px);
    max-width: 100%;
    aspect-ratio: 43 / 35;
    border-radius: 48px;
    background: var(--vm-customer-soft);
  }
  .vm-redeem-scanner-corner {
    position: absolute;
    width: 18%;
    height: 22%;
    border: 6px solid var(--vm-customer-primary);
    pointer-events: none;
    &-tl {
      top: 24px;
      left: 24px;
      border-right: 0;
      border-bottom: 0;
      border-top-left-radius: 24px;
    }
    &-tr {
      top: 24px;
      right: 24px;
      border-left: 0;
      border-bottom: 0;
      border-top-right-radius: 24px;
    }
    &-bl {
      bottom: 24px;
      left: 24px;
      border-right: 0;
      border-top: 0;
      border-bottom-left-radius: 24px;
    }
    &-br {
      bottom: 24px;
      right: 24px;
      border-left: 0;
      border-top: 0;
      border-bottom-right-radius: 24px;
    }
  }
  .vm-redeem-scanner-icon {
    display: flex;
    color: rgba(36, 28, 63, 0.8);
    font-size: clamp(96px, 14.3cqw, 160px);
  }
  .vm-redeem-scan-line {
    position: absolute;
    top: 72%;
    right: 16%;
    left: 16%;
    height: 4px;
    border-radius: 999px;
    background: var(--vm-customer-primary);
    color: var(--vm-customer-primary);
    box-shadow: 0 0 14px currentColor, 0 6px 20px currentColor;
    animation: vm-redeem-scan 2.8s ease-in-out infinite alternate;
    pointer-events: none;
  }
  .vm-redeem-scanner-copy {
    min-width: 0;
    max-width: 100%;
    margin-top: 4px;
    overflow-wrap: anywhere;
  }
  .vm-redeem-scanner-title {
    font-family: inherit;
    font-size: clamp(28px, 4cqw, 44px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
  }
  .vm-redeem-scanner-hint {
    margin-top: 16px;
    color: rgba(36, 28, 63, 0.65);
    font-size: clamp(22px, 2.7cqw, 30px);
    line-height: 1.4;
  }
  .vm-redeem-code-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    li {
      max-width: 100%;
      padding: 14px 24px;
      border-radius: 999px;
      background: var(--vm-customer-soft);
      color: rgba(36, 28, 63, 0.8);
      font-size: clamp(20px, 2.4cqw, 26px);
      font-weight: 500;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }
  }
  .vm-redeem-scanner-direction {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--vm-customer-primary);
    color: var(--vm-primary-foreground);
    font-size: 36px;
    animation: vm-redeem-direction 1.6s ease-in-out infinite;
  }
  .vm-redeem-divider {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 16px 0;
    color: rgba(36, 28, 63, 0.55);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.4;
    &::before,
    &::after {
      content: '';
      flex: 1;
      height: 1px;
      background: rgba(36, 28, 63, 0.16);
    }
  }
  .vm-redeem-code-field {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: clamp(80px, 10.5cqw, 118px);
    padding: 16px 30px;
    border: 3px solid rgba(36, 28, 63, 0.15);
    border-radius: 24px;
    background: #fff;
    &:focus-within {
      border-color: var(--vm-customer-primary);
    }
    input {
      flex: 1;
      width: 100%;
      min-width: 0;
      padding: 0;
      border: 0;
      outline: none;
      background: transparent;
      color: var(--vm-customer-ink);
      font-family: inherit;
      font-size: clamp(26px, 4cqw, 44px);
      line-height: 1.3;
      caret-color: var(--vm-customer-primary);
      &::placeholder {
        color: rgba(36, 28, 63, 0.3);
        opacity: 1;
      }
    }
  }
  .vm-redeem-keyboard-icon {
    flex: none;
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: rgba(36, 28, 63, 0.4);
  }
  .vm-redeem-code-clear {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(36, 28, 63, 0.5);
    font-size: 30px;
    line-height: 1;
  }
  &.vm-customer-paused .vm-redeem-scan-line,
  &.vm-customer-paused .vm-redeem-scanner-direction,
  &[aria-busy='true'] .vm-redeem-scan-line,
  &[aria-busy='true'] .vm-redeem-scanner-direction {
    animation-play-state: paused;
  }
}

@container vending-customer (max-width: 620px) {
  .vm-customer-canvas .vm-redeem-screen {
    .vm-redeem-heading {
      padding-top: 12px;
      padding-bottom: 24px;
    }
    .vm-redeem-scanner-card {
      gap: 24px;
      padding: 28px 16px;
      border-radius: 28px;
    }
    .vm-redeem-scanner-symbol {
      border-radius: 32px;
    }
    .vm-redeem-scanner-corner {
      border-width: 4px;
    }
    .vm-redeem-code-types {
      gap: 8px;
      li {
        padding: 10px 16px;
      }
    }
    .vm-redeem-scanner-direction {
      width: 56px;
      height: 56px;
      font-size: 28px;
    }
    .vm-redeem-divider {
      gap: 16px;
      font-size: 22px;
    }
    .vm-redeem-code-field {
      gap: 12px;
      padding-inline: 18px;
      border-width: 2px;
      border-radius: 20px;
    }
    .vm-redeem-keyboard-icon {
      width: 26px;
      height: 26px;
    }
  }
}

@keyframes vm-redeem-scan {
  from { top: 30%; }
  to { top: 72%; }
}

@keyframes vm-redeem-direction {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .vm-customer-canvas .vm-redeem-screen .vm-redeem-scan-line,
  .vm-customer-canvas .vm-redeem-screen .vm-redeem-scanner-direction {
    animation: none;
  }
}
