/* Shared shopping controls: list cards, basket panel and checkout use one state.
   Compact panel padding is local to shopping; independent sections keep section-gap. */
.dish-card-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dish-title-row h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dish-title-row .price,
.cart-item-end .price {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.dish-shopping-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: auto;
  padding-block: var(--space-3);
}
.dish-shopping-actions .button {
  min-height: 48px;
  padding-inline: var(--space-3);
  font-size: 14px;
}
.dish-shopping-actions .text-button {
  min-height: 48px;
  flex-shrink: 0;
}
.dish-shopping-actions .text-button span {
  font-size: 12px;
}
.shopping-unavailable {
  font-size: 14px;
  color: var(--muted);
  min-height: 48px;
  display: flex;
  align-items: center;
}
.quantity output {
  min-width: 28px;
  line-height: var(--touch-target);
  height: var(--touch-target);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.quantity button:disabled {
  opacity: 0.45;
  cursor: default;
}
.quantity button:focus-visible,
.remove-link:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}
.cart-group {
  margin-block: 0 var(--section-gap);
}
.cart-item {
  gap: var(--space-3);
  align-items: center;
}
.cart-item > a {
  flex-shrink: 0;
  width: auto;
}
.cart-item .food-photo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-small);
}
.cart-item-copy {
  min-width: 0;
}
.cart-item-copy h3 {
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.cart-item-copy p {
  margin-block: 6px;
}
.cart-item-copy .remove-link {
  min-height: 44px;
  padding: 6px 0;
  border-bottom: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.cart-item-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.cart-item-end .price {
  font-size: 18px;
}
dialog.shopping-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: 85dvh;
  padding: var(--space-5);
  border-radius: var(--radius);
  overflow: auto;
}
dialog.shopping-dialog h2 {
  padding-inline-end: 40px;
}
.shopping-dialog .wrap {
  width: 100%;
  max-width: none;
  padding: 0;
}
.shopping-dialog .page-section {
  padding: 0;
}
.shopping-dialog .page-heading {
  display: none;
}
.shopping-dialog .cart-layout {
  display: block;
}
.shopping-dialog .cart-group h2 {
  font-size: 18px;
}
.shopping-dialog .order-summary {
  position: static;
  margin-block-start: var(--section-gap);
  padding: var(--space-4);
}
.shopping-dialog .order-summary h2 {
  font-size: 22px;
}
.quick-dish {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-block: var(--space-4);
}
.quick-dish .food-photo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--radius-small);
}
.quick-dish p {
  margin-block: 6px;
}
.shopping-dialog form {
  display: grid;
  gap: var(--space-4);
}
.shopping-dialog .field {
  min-width: 0;
}
.shopping-dialog .text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-block-start: var(--space-3);
}
.shopping-dialog .dialog-actions {
  display: grid;
  gap: var(--field-gap);
}
.shopping-dialog .dialog-actions .button {
  white-space: normal;
  min-width: 0;
  min-height: var(--touch-target);
}
.shopping-checkout {
  max-width: 1100px;
}
.shopping-checkout .work-heading {
  margin-block-end: var(--space-4);
}
.shopping-checkout > .info-note {
  font-size: 14px;
  line-height: 1.7;
  padding: var(--space-4);
  margin-block-end: var(--section-gap);
}
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--section-gap);
  align-items: start;
}
.checkout-grid > .work-panel,
.checkout-actions > form {
  margin: 0;
  padding: var(--space-5);
}
.checkout-actions {
  display: grid;
  gap: var(--section-gap);
  min-width: 0;
}
.checkout-grid .work-panel h2 {
  font-size: 22px;
}
.checkout-dish {
  align-items: start;
  gap: var(--space-3);
}
.checkout-dish > div {
  min-width: 0;
}
.checkout-dish > strong {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.checkout-dish p {
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.checkout-new-address {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.checkout-new-address summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--copper);
}
.checkout-new-address form {
  margin-top: var(--space-4);
}
.checkout-total {
  padding-block-start: var(--space-3);
  border-top: 1px solid var(--line);
  line-height: 1.6;
}
@media (max-width: 768px) {
  .checkout-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cart-item {
    flex-wrap: wrap;
  }
  .cart-item-copy {
    flex: 1;
  }
  .cart-item-end {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cart-item .food-photo {
    width: 64px;
    height: 64px;
  }
  .shopping-checkout .work-panel,
  .checkout-actions > form {
    padding: var(--space-4);
  }
  .dish-shopping-actions {
    flex-wrap: wrap;
  }
  dialog.shopping-dialog {
    padding: var(--space-4);
  }
}
@media (prefers-reduced-motion: reduce) {
  .quick-add,
  .quantity button {
    transition: none;
  }
}
/* Put the existing support action in mobile navigation instead of covering dishes. */
@media (max-width: 640px) {
  body:has(.mobile-bottom-nav) .support-launcher { display: none; }
  .mobile-bottom-nav > :is(a, button) { flex: 1; min-width: 0; }
  .mobile-bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: var(--space-1); min-height: 44px; padding: 0;
    background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px;
  }
  .mobile-bottom-nav button:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
  body:has(.mobile-bottom-nav) .support-chat { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
