@font-face {
  font-family: "Vending DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("./assets/dm-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Vending Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./assets/bricolage-grotesque-latin.woff2") format("woff2");
}

// Measurements, colors, shapes and hierarchy taken from the prototype's rendered DOM.
.vm-customer-viewport {
  container: vending-customer / inline-size;
  position: relative;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--vm-customer-page-bg);
}

.vm-customer-canvas {
  --vm-customer-gutter: 32px;
  --vm-customer-ink: #241c3f;
  --vm-customer-primary: var(--vm-primary);
  --vm-customer-soft: var(--vm-customer-soft-bg);
  --vm-customer-accent: #c8f04a;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--vm-customer-ink);
  background: var(--vm-customer-page-bg);
  font-family: "Vending DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  p,
  h1,
  h2 {
    margin: 0;
    color: inherit;
  }
  h1,
  h2,
  .vm-customer-touch-label,
  .vm-customer-buy-title {
    font-family:
      "Vending Bricolage Grotesque", "Vending DM Sans", "PingFang SC",
      "Microsoft YaHei", sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  button {
    font: inherit;
    cursor: pointer;
  }
  button:focus-visible {
    outline: 3px solid var(--vm-customer-primary);
    outline-offset: 4px;
  }
}

.vm-prototype-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  background-color: currentColor;
  -webkit-mask: var(--vm-icon) no-repeat center / 100% 100%;
  mask: var(--vm-icon) no-repeat center / 100% 100%;
}

.vm-customer-idle {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow-y: auto;
  user-select: none;
}
.vm-customer-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.vm-customer-blob {
  position: absolute;
  animation: vm-customer-drift 7s ease-in-out infinite;
}
.vm-customer-blob-purple {
  top: -112px;
  right: -144px;
  width: 440px;
  height: 440px;
  border-radius: 46% 54% 58% 42% / 48% 38% 62% 52%;
  background: var(--vm-customer-primary);
  opacity: 0.1;
  animation-duration: 11s;
}
.vm-customer-blob-lime {
  top: 46%;
  left: -96px;
  width: 300px;
  height: 300px;
  border-radius: 58% 42% 44% 56% / 52% 60% 40% 48%;
  background: var(--vm-customer-accent);
  opacity: 0.6;
  animation-duration: 9s;
  animation-delay: -3s;
}
.vm-customer-blob-ring {
  top: 30%;
  right: 40px;
  width: 180px;
  height: 180px;
  border: 18px solid var(--vm-customer-primary);
  border-radius: 50%;
  opacity: 0.15;
  animation-duration: 8s;
  animation-delay: -5s;
}
.vm-customer-blob-soft {
  right: -48px;
  bottom: 96px;
  width: 220px;
  height: 220px;
  border-radius: 52% 48% 40% 60% / 44% 56%;
  background: var(--vm-customer-soft);
  animation-duration: 13s;
  animation-delay: -7s;
}
.vm-customer-blob-small {
  bottom: 38%;
  left: 42%;
  width: 72px;
  height: 72px;
  border: 10px solid var(--vm-customer-ink);
  border-radius: 50%;
  opacity: 0.1;
  animation-delay: -2s;
}
.vm-customer-idle-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(200px, 1fr) auto;
  row-gap: 32px;
  height: 100%;
  min-height: min-content;
  padding: 48px 40px 40px;
}
.vm-customer-idle-header,
.vm-customer-idle-actions,
.vm-customer-idle-footer {
  min-width: 0;
}
.vm-customer-idle-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vm-customer-idle-footer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  .vm-customer-scan-hint-pill {
    margin-top: 0;
  }
}
.vm-customer-brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 16px;
  > div {
    min-width: 0;
  }
  .vm-customer-monogram {
    display: flex;
    flex: 0 0 56px;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--vm-customer-ink);
    color: var(--vm-customer-accent);
    font-size: 24px;
    font-weight: 700;
    line-height: 32px;
  }
  .vm-customer-brand-name {
    font-size: 24px;
    font-weight: 600;
    line-height: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .vm-customer-brand-subtitle {
    color: rgba(36, 28, 63, 0.55);
    font-size: 16px;
    line-height: 24px;
    min-height: 24px;
  }
}
.vm-customer-idle-copy {
  flex-shrink: 0;
  margin-top: 56px;
  h1 {
    font-size: 64px;
    line-height: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  p {
    max-width: 30ch;
    margin-top: 24px;
    color: rgba(36, 28, 63, 0.7);
    font-size: 24px;
    line-height: 1.375;
  }
}
.vm-customer-start {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
}
.vm-customer-touch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
}
.vm-customer-pulse {
  position: absolute;
  inset: 0;
  border: 4px solid var(--vm-customer-primary);
  border-radius: 50%;
  animation: vm-customer-pulse 1.8s ease-out infinite;
  &:nth-child(2) {
    animation-delay: 0.9s;
  }
}
.vm-customer-hand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--vm-customer-primary);
  color: var(--vm-primary-foreground);
  font-size: 40px;
}
.vm-customer-start .vm-customer-touch-label {
  margin-top: 16px;
  font-size: 30px;
  line-height: 45px;
}
.vm-customer-scan-hint {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  color: rgba(36, 28, 63, 0.75);
  font-size: 18px;
  line-height: 1.375;
  > span:not(.vm-prototype-icon) {
    flex: 1;
  }
  .vm-prototype-icon:first-child {
    font-size: 28px;
    color: var(--vm-customer-primary);
  }
  .vm-prototype-icon:last-child {
    font-size: 24px;
    color: rgba(36, 28, 63, 0.4);
  }
}
.vm-customer-scan-hint-pill {
  gap: 12px;
  margin-top: 20px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  line-height: 28px;
  .vm-prototype-icon:first-child {
    font-size: 24px;
  }
  .vm-prototype-icon:last-child {
    font-size: 20px;
  }
}
.vm-customer-canvas .vm-customer-technical-support {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  border: 0;
  padding: 6px 0;
  background-color: rgba(0, 0, 0, 0.31);
  color: #fff;
  font-size: 16px;
  line-height: normal;
  text-align: center;
  &:focus-visible {
    outline-offset: -3px;
  }
}
.vm-customer-canvas .vm-customer-idle-hitarea {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  &:focus-visible {
    outline-offset: -6px;
  }
}
.vm-customer-home {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.vm-customer-home-header {
  display: flex;
  align-items: center;
  height: 80px;
  flex: 0 0 80px;
  padding: 0 var(--vm-customer-gutter);
}
.vm-customer-brand-compact {
  gap: 12px;
  .vm-customer-monogram {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 16px;
    line-height: 24px;
  }
  .vm-customer-brand-name {
    font-size: 18px;
    line-height: 28px;
    color: rgba(36, 28, 63, 0.75);
  }
}
.vm-customer-home-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px var(--vm-customer-gutter);
  > h1 {
    font-size: 48px;
    line-height: 1.05;
  }
  .vm-customer-home-description {
    margin-top: 12px;
    max-width: 38ch;
    font-size: 20px;
    line-height: 1.375;
    color: rgba(36, 28, 63, 0.7);
  }
}
.vm-customer-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}
.vm-customer-buy {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 176px;
  width: 100%;
  border: 1px solid rgba(36, 28, 63, 0.1);
  border-radius: 24px;
  padding: 28px;
  color: var(--vm-customer-ink);
  background: #fff;
  text-align: left;
  &:hover:not(:disabled) .vm-customer-buy-icon {
    background: var(--vm-primary-hover);
  }
  &:active:not(:disabled) {
    transform: scale(0.99);
    .vm-customer-buy-icon {
      background: var(--vm-primary-active);
    }
  }
  &:disabled {
    opacity: 0.55;
    cursor: wait;
  }
  > .vm-prototype-icon {
    font-size: 36px;
    color: rgba(36, 28, 63, 0.3);
  }
}
.vm-customer-buy-icon {
  display: flex;
  flex: 0 0 96px;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: var(--vm-customer-primary);
  color: var(--vm-primary-foreground);
  font-size: 48px;
}
.vm-customer-redeem {
  .vm-customer-buy-icon,
  &:hover:not(:disabled) .vm-customer-buy-icon,
  &:active:not(:disabled) .vm-customer-buy-icon {
    background: var(--vm-customer-accent);
    color: var(--vm-customer-ink);
  }
}
.vm-customer-buy-copy {
  flex: 1;
  min-width: 0;
}
.vm-customer-buy-title {
  display: block;
  font-size: 32px;
  line-height: 1.25;
}
.vm-customer-buy-description {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.375;
  color: rgba(36, 28, 63, 0.7);
}
.vm-customer-loading {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.vm-customer-load-error {
  margin-top: 16px;
}
.vm-customer-home-footer {
  flex-shrink: 0;
  padding: 12px var(--vm-customer-gutter) 20px;
}
.vm-customer-canvas .vm-customer-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  border: 2px solid rgba(36, 28, 63, 0.14);
  border-radius: 16px;
  background: #fff;
  color: var(--vm-customer-ink);
  font-size: 22px;
  font-weight: 600;
  .vm-prototype-icon {
    font-size: 28px;
  }
}
.vm-customer-machine-row {
  display: flex;
  align-items: center;
  margin-top: 16px;
}
.vm-customer-canvas .vm-customer-machine {
  padding: 4px 0;
  border: 0;
  background: none;
  font-size: 14px;
  line-height: 20px;
  color: rgba(36, 28, 63, 0.4);
  cursor: default;
  user-select: none;
}

// Reflow compact hosts instead of scaling the entire page and its controls.
@container vending-customer (max-width: 620px) {
  .vm-customer-canvas {
    --vm-customer-gutter: 18px;

    .vm-customer-idle-layout {
      grid-template-rows: auto minmax(160px, 1fr) auto;
      gap: 24px;
      padding: 40px 20px 24px;
    }
    .vm-customer-idle-copy {
      margin-top: 32px;
      h1 {
        font-size: 44px;
      }
      p {
        margin-top: 16px;
        font-size: 20px;
      }
    }
    .vm-customer-home-content > h1 {
      font-size: 36px;
    }
    .vm-customer-buy {
      gap: 16px;
      padding: 20px;
      > .vm-prototype-icon {
        font-size: 24px;
      }
    }
    .vm-customer-buy-icon {
      flex-basis: 56px;
      width: 56px;
      height: 56px;
      border-radius: 18px;
      font-size: 30px;
    }
    .vm-customer-buy-title {
      font-size: 26px;
    }
    .vm-customer-buy-description {
      font-size: 16px;
    }
    .vm-customer-scan-hint {
      gap: 10px;
      font-size: 16px;
    }
  }
}

@keyframes vm-customer-drift {
  0%,
  100% {
    transform: translate(0) rotate(0);
  }
  50% {
    transform: translate(12px, -18px) rotate(6deg);
  }
}
@keyframes vm-customer-pulse {
  0% {
    opacity: 0.8;
    transform: scale(0.9);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}
.vm-customer-paused .vm-customer-blob,
.vm-customer-paused .vm-customer-pulse {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .vm-customer-blob,
  .vm-customer-pulse {
    animation: none;
  }
  .vm-customer-pulse {
    opacity: 0.25;
  }
}

// Lucide icon masks used by the reference; see assets/Lucide-LICENSE.txt.
.vm-prototype-icon-sparkles {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0zM20 3v4m2-2h-4M4 17v2m1-1H3'/%3E%3C/svg%3E");
}
.vm-prototype-icon-hand {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2m0 4V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2m0 4.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8'/%3E%3Cpath d='M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'/%3E%3C/g%3E%3C/svg%3E");
}
.vm-prototype-icon-qr-code {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='5' height='5' x='3' y='3' rx='1'/%3E%3Crect width='5' height='5' x='16' y='3' rx='1'/%3E%3Crect width='5' height='5' x='3' y='16' rx='1'/%3E%3Cpath d='M21 16h-3a2 2 0 0 0-2 2v3m5 0v.01M12 7v3a2 2 0 0 1-2 2H7m-4 0h.01M12 3h.01M12 16v.01M16 12h1m4 0v.01M12 21v-1'/%3E%3C/g%3E%3C/svg%3E");
}
.vm-prototype-icon-arrow-down {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 5v14m7-7l-7 7l-7-7'/%3E%3C/svg%3E");
}
.vm-prototype-icon-arrow-left {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m12 19-7-7 7-7M5 12h14'/%3E%3C/svg%3E");
}
.vm-prototype-icon-receipt-text {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 3v18l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V3l-2 1-2-1-2 1-2-1-2 1-2-1-2 1ZM8 8h8m-8 4h8m-8 4h5'/%3E%3C/svg%3E");
}
.vm-prototype-icon-footprints {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0m16 4v-2.38c0-2.12 1.03-3.12 1-5.62c-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0m-4-3h4M4 13h4'/%3E%3C/svg%3E");
}
.vm-prototype-icon-chevron-right {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m9 18l6-6l-6-6'/%3E%3C/svg%3E");
}
.vm-prototype-icon-life-buoy {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m4.93 4.93l4.24 4.24m5.66 0l4.24-4.24m-4.24 9.9l4.24 4.24m-9.9-4.24l-4.24 4.24'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/g%3E%3C/svg%3E");
}

.vm-prototype-icon-check {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

.vm-prototype-icon-loader-circle {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 12a9 9 0 1 1-6.219-8.56'/%3E%3C/svg%3E");
}

.vm-prototype-icon-circle-dashed {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10.1 2.182a10 10 0 0 1 3.8 0m0 19.636a10 10 0 0 1-3.8 0m7.509-18.097a10 10 0 0 1 2.69 2.7M2.182 13.9a10 10 0 0 1 0-3.8m18.097 7.509a10 10 0 0 1-2.7 2.69M21.818 10.1a10 10 0 0 1 0 3.8M3.721 6.391a10 10 0 0 1 2.7-2.69m-.03 16.578a10 10 0 0 1-2.69-2.7'/%3E%3C/svg%3E");
}

.vm-prototype-icon-circle-alert {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4m0 4h.01'/%3E%3C/g%3E%3C/svg%3E");
}

.vm-prototype-icon-search {
  --vm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}
