.oc-item-steppers,
.oc-stepper,
.oc-sheet__head,
.oc-order-row,
.oc-add-more,
.oc-actions {
  box-sizing: border-box;
}

.oc-item-steppers {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
  max-width: 100%;
}

.oc-choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: .5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: .75rem;
}

.oc-choice__field {
  display: grid;
  gap: .3rem;
  min-width: 0;
  color: inherit;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
}

.oc-choice__control {
  min-width: 0;
}

.oc-choice__note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--oc-muted, currentColor);
  font-size: .75rem;
  line-height: 1.4;
}

.oc-stepper {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--oc-border, currentColor);
  border-radius: var(--oc-radius, .35rem);
  color: inherit;
  overflow: hidden;
}

.oc-stepper__label {
  min-width: 0;
  padding: .45rem .65rem;
  font: inherit;
  font-size: .82em;
  overflow-wrap: break-word;
}

.oc-stepper__button,
.oc-sheet__close {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-inline-start: 1px solid var(--oc-border, currentColor);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
  touch-action: manipulation;
}

.oc-stepper__button:first-of-type {
  border-inline-start: 0;
  border-inline-end: 1px solid var(--oc-border, currentColor);
}

.oc-stepper__button:disabled,
.oc-stepper__button[aria-disabled="true"] {
  opacity: .42;
  cursor: default;
}

/* the + that holds keyboard focus at the cap (A42) keeps its focus ring at full strength: an outline is painted with its element's
   opacity, so the capped look faded the ring to 42% on the one control the keyboard is on (gate A43) */
.oc-stepper__button[aria-disabled="true"]:focus-visible {
  opacity: 1;
}

.oc-stepper__button[data-oc-limit-reached="true"] {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.oc-stepper__qty {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  padding-inline: .25rem;
  font-variant-numeric: tabular-nums;
}

#oc-pill {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--oc-dock-offset, 4.75rem) + env(safe-area-inset-bottom));
  z-index: var(--oc-pill-z, 40);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: 100%;
  min-width: 44px;
  min-height: 52px;
  max-width: 100%;
  box-sizing: border-box;
  padding: .75rem max(1rem, env(safe-area-inset-right)) .75rem max(1rem, env(safe-area-inset-left));
  border: 1px solid var(--oc-accent, currentColor);
  border-radius: 0;
  background: var(--oc-accent, currentColor);
  box-shadow: var(--oc-shadow, 0 .7rem 2rem color-mix(in srgb, currentColor 25%, transparent));
  color: var(--oc-accent-ink, Canvas);
  font: inherit;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

#oc-pill[inert] {
  pointer-events: none;
}

#oc-pill[hidden],
#oc-sheet[hidden],
.oc-order-row[hidden],
.oc-sheet__empty[hidden],
.oc-toast[hidden],
.oc-fallback-wrap[hidden] {
  display: none !important;
}

.oc-pill__count {
  font-weight: 800;
}

.oc-pill__total {
  color: inherit;
  font-variant-numeric: tabular-nums;
}

.oc-pill__review {
  white-space: nowrap;
}

#oc-sheet {
  position: fixed;
  inset: 0;
  z-index: var(--oc-sheet-z, 70);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: max(1rem, env(safe-area-inset-top));
  background: var(--oc-backdrop, color-mix(in srgb, currentColor 58%, transparent));
  color: var(--oc-ink, CanvasText);
}

.oc-sheet__panel {
  width: min(100%, 44rem);
  max-height: calc(100% - max(1rem, env(safe-area-inset-top)));
  max-height: min(92dvh, 52rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border: 1px solid var(--oc-border, currentColor);
  border-bottom: 0;
  border-radius: var(--oc-sheet-radius, 1rem) var(--oc-sheet-radius, 1rem) 0 0;
  background: var(--oc-surface, Canvas);
  box-shadow: var(--oc-shadow, 0 -1rem 3rem color-mix(in srgb, currentColor 25%, transparent));
  animation: oc-sheet-in 180ms ease-out;
}

.oc-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.oc-sheet__heading {
  min-width: 0;
}

.oc-sheet__eyebrow,
.oc-sheet__lede,
.oc-sheet__pickup,
.oc-sheet__empty,
.oc-explainer p,
.oc-toast {
  margin: 0;
}

.oc-sheet__eyebrow {
  color: var(--oc-muted, currentColor);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.oc-sheet__title {
  margin: .15rem 0 0;
  color: inherit;
  font: inherit;
  font-size: clamp(1.45rem, 8vw, 2.1rem);
  font-weight: 800;
  line-height: 1.05;
  text-transform: none;
}

.oc-sheet__pickup {
  margin-top: .35rem;
  color: var(--oc-muted, currentColor);
  font-size: .88rem;
}

.oc-sheet__lede {
  margin-top: .35rem;
  color: var(--oc-muted, currentColor);
  font-size: .88rem;
}

.oc-sheet__close {
  flex: 0 0 auto;
  padding-inline: .6rem;
  border: 1px solid var(--oc-border, currentColor);
  border-radius: var(--oc-radius, .35rem);
  font-size: .8rem;
}

.oc-sheet__order {
  display: grid;
  gap: .5rem;
  margin-top: 1rem;
}

.oc-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-block: .65rem;
  border-bottom: 1px solid var(--oc-border, currentColor);
}

.oc-order-row--choice {
  flex-wrap: wrap;
}

.oc-choice--sheet {
  flex: 1 0 100%;
  margin-top: .15rem;
}

.oc-order-row__copy {
  min-width: 0;
}

.oc-order-row__copy strong,
.oc-order-row__copy span {
  display: block;
  overflow-wrap: break-word;
}

.oc-order-row__copy span {
  margin-top: .12rem;
  color: var(--oc-muted, currentColor);
  font-size: .78rem;
}

.oc-order-row__copy .oc-order-row__line-total {
  color: inherit;
  font-weight: 800;
}

.oc-sheet__empty {
  padding-block: .75rem;
  color: var(--oc-muted, currentColor);
}

.oc-add-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-width: 44px;
  min-height: 44px;
  padding: .65rem .8rem;
  border: 1px solid var(--oc-border, currentColor);
  border-radius: var(--oc-radius, .35rem);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.oc-sheet__subtotal {
  margin: .85rem 0 0;
  font-weight: 800;
}

.oc-fields {
  display: grid;
  gap: .8rem;
  margin-top: 1rem;
}

.oc-field {
  display: grid;
  gap: .35rem;
  color: inherit;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
}

.oc-input {
  display: block;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: .65rem .75rem;
  border: 1px solid var(--oc-border, currentColor);
  border-radius: var(--oc-radius, .35rem);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
}

.oc-textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.oc-explainer {
  margin-top: 1rem;
  padding: .8rem;
  border: 1px solid var(--oc-border, currentColor);
  border-radius: var(--oc-radius, .35rem);
  color: inherit;
  font-size: .82rem;
}

.oc-explainer p {
  margin-top: .3rem;
  color: var(--oc-muted, currentColor);
}

.oc-actions {
  position: sticky;
  bottom: calc(-1rem - env(safe-area-inset-bottom));
  display: grid;
  gap: .55rem;
  margin: 1rem -1rem 0;
  padding: .8rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--oc-border, currentColor);
  background: var(--oc-surface, Canvas);
}

.oc-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  padding: .65rem .8rem;
  border: 1px solid var(--oc-border, currentColor);
  border-radius: var(--oc-radius, .35rem);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  cursor: pointer;
}

.oc-exit--primary {
  background: var(--oc-accent, currentColor);
  color: var(--oc-accent-ink, Canvas);
}

.oc-exit[aria-disabled="true"] {
  opacity: .45;
}

.oc-toast {
  margin-top: .75rem;
  color: inherit;
  font-size: .82rem;
}

.oc-fallback-wrap {
  display: grid;
  gap: .65rem;
  margin-top: .75rem;
}

.oc-fallback--copying {
  position: fixed;
  left: -10000px;
  top: 0;
}

.oc-stepper__button:focus-visible,
.oc-sheet__close:focus-visible,
.oc-add-more:focus-visible,
#oc-pill:focus-visible,
.oc-input:focus-visible,
.oc-exit:focus-visible {
  outline: 3px solid var(--oc-focus, currentColor);
  outline-offset: 3px;
}

body.oc-sheet-open {
  overflow: hidden;
}

@keyframes oc-sheet-in {
  from { transform: translateY(1.25rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 48rem) {
  #oc-pill {
    left: 50%;
    right: auto;
    width: min(calc(100vw - 2rem), 44rem);
    border-radius: var(--oc-radius, .35rem);
    transform: translateX(-50%);
  }

  .oc-actions {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .oc-sheet__panel {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
