#order-drawer {
  --order-gutter: clamp(.95rem, 4vw, 1.45rem);
  --order-head-height: 4.65rem;
}

#order-drawer:has(#order-restaurant-options:not([hidden])) {
  scrollbar-width: none;
}

#order-drawer:has(#order-restaurant-options:not([hidden]))::-webkit-scrollbar {
  display: none;
}

#order-drawer .drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  height: var(--order-head-height);
  padding: .55rem var(--order-gutter);
  background: var(--panel);
}

#order-drawer .drawer-head h2 {
  font-size: clamp(1.85rem, 7.5vw, 2.9rem);
  outline: none;
}

#order-drawer .dialog-close {
  position: static;
  flex: 0 0 auto;
}

.order-flow-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-height: calc(100% - var(--order-head-height));
  padding: .15rem var(--order-gutter) var(--order-gutter);
}

.order-flow-step {
  display: grid;
  gap: .6rem;
  min-width: 0;
}

.order-flow-step p,
.order-flow-unavailable {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}

.order-flow-back {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  align-self: start;
  width: fit-content;
  min-height: 44px;
  padding: .15rem .6rem;
  border: 0;
  border-radius: .55rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
}

.order-flow-modes,
.order-flow-categories,
.order-flow-items {
  display: grid;
  gap: .45rem;
}

.order-flow-categories {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-flow-modes button,
.order-flow-categories button,
.order-flow-items button {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 46px;
  padding: .48rem .65rem;
  border: 0;
  border-radius: .75rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  line-height: 1.2;
}

.order-flow-modes button {
  min-height: 67px;
  padding: .65rem .75rem;
}

.order-flow-modes button > svg,
.order-flow-categories button > svg,
.order-flow-items button > svg {
  flex: none;
  margin-inline-start: auto;
  transition: translate 150ms ease;
}

.order-flow-categories button > svg,
.order-flow-items button > svg {
  width: .95rem;
  height: .95rem;
}

.order-flow-modes button strong,
.order-flow-modes button small {
  display: block;
}

.order-flow-modes button strong {
  font-size: 1.05rem;
}

.order-flow-modes button small {
  margin-top: .14rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 400;
}

.order-flow-mode-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
}

.order-flow-modes button[data-mode="delivery"] .order-flow-mode-icon {
  background: var(--green);
  color: var(--ink);
}

.order-flow-mode-icon svg {
  width: 21px;
  height: 21px;
}

.order-flow-app {
  display: grid;
  justify-items: center;
  gap: .45rem;
  min-width: 0;
}

.order-flow-body > .order-flow-app {
  margin-top: auto;
  padding-top: .3rem;
}

.order-flow-app-title {
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
}

.order-flow-app-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 16rem);
  gap: .5rem;
}

.order-flow-app-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: .35rem .5rem;
  border-radius: .65rem;
  background: var(--surface);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.order-flow-app-links a:is(:focus-visible, :active) {
  background: var(--green);
}

@media (hover: hover) {
  .order-flow-app-links a:hover {
    background: var(--green);
    box-shadow: inset 0 0 0 1px var(--line);
  }
}

.order-flow-app-links svg {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}
@media (max-width: 360px) {
  .order-flow-app-links a {
    gap: .3rem;
    padding-inline: .35rem;
    font-size: clamp(.75rem, 4.3vw, .88rem);
  }
}

.order-flow-categories img,
.order-flow-items img {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: .45rem;
  object-fit: cover;
}

.order-flow-categories button {
  gap: .5rem;
  padding: .35rem .5rem .35rem .35rem;
  font-size: .9rem;
}

.order-flow-subhead {
  font-size: clamp(1.45rem, 4.7vw, 1.9rem);
  line-height: 1.03;
}

.order-flow-subhead:focus {
  outline: none;
}

.order-flow-location-trigger {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) 1.1rem;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 48px;
  padding: .5rem .75rem;
  border: 0;
  border-radius: .75rem;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-weight: 700;
}

.order-flow-location-trigger[aria-expanded="true"] {
  background: var(--green);
}

.order-flow-location-summary {
  display: grid;
  grid-template-columns: fit-content(55%) minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
  line-height: 1.2;
}

.order-flow-location-address {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.3;
  text-align: right;
}

.order-flow-location-trigger svg,
.order-flow-location-option svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.order-flow-location-chevron {
  transition: rotate 150ms ease;
}

.order-flow-location-trigger[aria-expanded="true"] .order-flow-location-chevron {
  rotate: 180deg;
}

.order-flow-location-list {
  max-height: min(19rem, 48dvh);
  margin-top: .35rem;
  padding: .35rem;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: .8rem;
  background: var(--surface);
  box-shadow: 0 6px 18px #17392f15;
}

.order-flow-location-group + .order-flow-location-group {
  margin-top: .4rem;
}

.order-flow-location-group-label {
  padding: .35rem .5rem .25rem;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
}

.order-flow-location-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.15rem;
  align-items: center;
  gap: .5rem;
  min-height: 46px;
  padding: .35rem .5rem;
  border-radius: .55rem;
  cursor: pointer;
  font-weight: 700;
}

.order-flow-location-option small {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 400;
  line-height: 1.3;
}

.order-flow-location-option:not([aria-selected="true"]) svg {
  visibility: hidden;
}

.order-flow-location-option[aria-selected="true"] {
  background: var(--panel);
}

.order-flow-location-option[data-active] {
  background: var(--green);
}

#order-restaurant-note {
  color: var(--red);
}

.order-flow-unavailable {
  color: var(--red);
}

.order-flow-selection-photo {
  display: block;
  width: 100%;
  height: clamp(9rem, 29dvh, 15rem);
  border-radius: .95rem;
  object-fit: cover;
}

.order-flow-actions {
  margin-top: auto;
  padding-top: .35rem;
}

.order-flow-pickup-actions [data-order-provider] {
  text-align: center;
}

.order-flow-pickup-actions [data-order-provider] strong {
  color: var(--ink);
}

.order-flow-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: .45rem;
  min-height: 44px;
  padding: .4rem .8rem;
  border: 0;
  border-radius: .65rem;
  background: var(--surface);
  color: var(--ink);
  font-size: .87rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms, box-shadow 150ms;
}

.order-flow-copy svg { width: 18px; height: 18px; }
.order-flow-copy:is(:focus-visible, :active) { background: var(--green); }

@media (hover: hover) {
  .order-flow-copy:hover { box-shadow: inset 0 0 0 1px var(--line); }
}

.order-flow-actions > .pill {
  justify-content: center;
  width: 100%;
  min-height: 48px;
}

.order-flow-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .15rem clamp(.65rem, 3vw, 1.4rem);
}

.order-flow-secondary-actions .inline-link,
.order-flow-actions .order-flow-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 44px;
  padding: .25rem .2rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .87rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.order-flow-secondary-actions .inline-link:is(:hover, :active, :focus-visible),
.order-flow-actions .order-flow-text-button:is(:hover, :active, :focus-visible) {
  background: transparent;
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.order-flow-body button:active {
  background: var(--green);
}

@media (hover: hover) {
  .order-flow-body button:hover {
    background: var(--green);
  }

  .order-flow-body :is(.order-flow-modes, .order-flow-categories, .order-flow-items) button:hover > svg {
    translate: 2px 0;
  }

  .order-flow-body .order-flow-back:hover > svg {
    translate: -2px 0;
  }

  .order-flow-location-option:hover {
    background: var(--green);
  }
}

@media (max-width: 480px) {
  .order-flow-location-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: .2rem;
  }

  .order-flow-location-address {
    text-align: left;
  }
}

@media (max-width: 360px) {
  .order-flow-categories img {
    width: 35px;
    height: 35px;
  }

  .order-flow-categories button {
    gap: .32rem;
    font-size: .8rem;
  }
}

@media (max-width: 420px) and (max-height: 600px) {
  .order-flow-body:has(.order-flow-copy:not([hidden])) {
    gap: .65rem;
  }

  .order-flow-body:has(.order-flow-copy:not([hidden])) .order-flow-selection-photo {
    height: clamp(5rem, 18dvh, 7rem);
  }
}

@media (max-height: 460px) {
  #order-drawer {
    --order-head-height: 3.4rem;
  }

  #order-drawer .drawer-head h2 {
    font-size: 2.15rem;
  }

  .order-flow-body {
    gap: .6rem;
    padding-bottom: .75rem;
  }

  .order-flow-location-list {
    max-height: 40dvh;
  }

  .order-flow-step[data-order-selection]:has(.order-flow-selection-media:not([hidden])) {
    grid-template-columns: minmax(0, 6rem) minmax(0, 1fr);
    align-items: center;
    column-gap: .75rem;
  }

  .order-flow-selection-media {
    grid-row: span 2;
  }

  .order-flow-selection-photo {
    height: 4.6rem;
  }

  .order-flow-body:has(.order-flow-pickup-actions:not([hidden])) {
    gap: .4rem;
  }

  .order-flow-body:has(.order-flow-pickup-actions:not([hidden])) .order-flow-selection-photo {
    height: 3.75rem;
  }

  .order-flow-actions {
    gap: .25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .order-flow-app-links a,
  .order-flow-copy,
  .order-flow-body button > svg,
  .order-flow-location-chevron {
    transition: none;
  }
}

