/* Container geometry only. Restaurant content has its own width-aware styles. */
.restaurant-card {
  --restaurant-viewport-height:100vh;
  --restaurant-viewport-bottom:0px;
  --restaurant-height-large:calc(var(--restaurant-viewport-height) - max(12px,env(safe-area-inset-top,0px)));
  --restaurant-height-medium:calc(var(--restaurant-viewport-height) * .56);
  --restaurant-height-small:180px;
  --restaurant-height:var(--restaurant-height-large);
  box-sizing:border-box;
  position:fixed;
  z-index:40;
  inset-inline:env(safe-area-inset-left,0px) env(safe-area-inset-right,0px);
  bottom:calc(var(--restaurant-viewport-bottom) + var(--pass-dock-height,0px));
  width:auto;
  max-width:960px;
  height:var(--restaurant-drag-height,var(--restaurant-height));
  max-height:var(--restaurant-height-large);
  min-width:0;
  margin-inline:auto;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  isolation:isolate;
  container-type:inline-size;
  container-name:restaurant;
  border:1px solid var(--control-line,#dda0b9);
  border-bottom:0;
  border-radius:25px 25px 0 0;
  background:var(--paper,#fff3f8);
  color:var(--ink,#701a42);
  box-shadow:0 -8px 34px #701a4220;
  transition:height 180ms ease-out;
}
@supports (height:100dvh) {
  .restaurant-card { --restaurant-viewport-height:100dvh; }
}
.restaurant-card[data-dragging] { transition:none; user-select:none; }
.restaurant-card[data-presentation='sheet'][data-extent='medium'] { --restaurant-height:var(--restaurant-height-medium); }
.restaurant-card[data-presentation='sheet'][data-extent='small'] { --restaurant-height:var(--restaurant-height-small); }
.restaurant-chrome {
  flex:none;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:8px;
  min-height:56px;
  padding:4px 12px;
  position:relative;
  z-index:2;
  background:inherit;
  touch-action:none;
}
.restaurant-handle {
  grid-column:2;
  grid-row:1;
  display:flex;
  align-items:center;
  justify-content:center;
  width:72px;
  min-height:44px;
  border:0;
  padding:12px;
  border-radius:12px;
  background:transparent;
  color:inherit;
  cursor:ns-resize;
  touch-action:none;
}
.restaurant-handle span { display:block; width:38px; height:5px; border-radius:99px; background:currentColor; opacity:.45; pointer-events:none; }
.restaurant-handle[hidden] { display:none; }
.restaurant-return {
  grid-column:1;grid-row:1;justify-self:start;display:none;
  align-items:center;gap:8px;min-height:44px;padding:8px 12px;
  border:1px solid var(--control-line,#dda0b9);border-radius:99px;
  background:transparent;color:inherit;font:inherit;font-weight:550;cursor:pointer;
}
.restaurant-handle:focus-visible,.restaurant-return:focus-visible { outline:3px solid var(--action,#ad1855); outline-offset:2px; }
.restaurant-scroll {
  flex:1 1 auto;
  min-height:0;
  min-width:0;
  padding:0 16px max(20px,env(safe-area-inset-bottom,0px));
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  scrollbar-gutter:stable;
  scroll-padding-block:16px max(20px,env(safe-area-inset-bottom,0px));
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y pinch-zoom;
}
.restaurant-scroll:focus { outline:none; }
/* Vertical content gestures keep native scrolling except when the controller
   starts a new downward gesture at the top or a compact-card expansion. */
/* Collapse the existing body, not a second summary. The controller also makes
   these offscreen controls inert; a tall compact header can still be scrolled. */
.restaurant-card[data-presentation='sheet'][data-extent='small'] .restaurant-body {
  max-height:0;
  min-height:0;
  overflow:hidden;
  visibility:hidden;
  margin-block:0;
  padding-block:0;
  border-block-width:0;
}
.restaurant-card[data-presentation='sheet'][data-extent='small'] .restaurant-heading :is([data-card-secondary],.restaurant-secondary) { display:none; }
@media (min-width:900px) and (min-height:500px) {
  .restaurant-card .restaurant-handle { display:none; }
  .restaurant-card .restaurant-chrome { grid-template-columns:minmax(0,1fr); }
  .restaurant-card .restaurant-return { grid-column:1; display:inline-flex; }
  .restaurant-card[data-mode='map'] {
    inset-inline:max(12px,env(safe-area-inset-left,0px)) auto;
    bottom:calc(var(--restaurant-viewport-bottom) + var(--pass-dock-height,0px) + 8px);
    width:min(430px,calc(100vw - 32px));
    max-width:calc(100vw - 32px);
    height:calc(var(--restaurant-height-large) - 8px);
    margin:0;
    border-bottom:1px solid var(--control-line,#dda0b9);
    border-radius:24px;
  }
}
.restaurant-card .restaurant-return[hidden] { display:none; }
@media (prefers-reduced-motion:reduce) {
  .restaurant-card { transition:none; }
}

/* Only a measured, edge-to-edge join loses the standalone dock corners. */
.discovery-pass-dock[data-restaurant-joined] { border-top-left-radius:0; border-top-right-radius:0; box-shadow:none; }
