/* Reservation drawer geometry. Loaded after the shared manager skin.
   The list, New Reservation, pricing policy and printed documents are untouched. */
body.frch-ui:has(#reservationDrawer.reservation-workspace-open:not(.hidden)) #drawerBackdrop {
  left: 0;
  background: rgba(9,25,47,.16);
  backdrop-filter: none;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open {
  left: auto;
  right: 16px;
  top: 16px;
  width: min(1120px,calc(100vw - var(--ui-sidebar-width) - 200px)) !important;
  max-width: none !important;
  height: calc(100dvh - 32px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 65px #10253c29;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .drawer-head {
  padding: 18px 22px 14px !important;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .drawer-head h2 {
  font-size: 24px;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-toolbar {
  padding: 12px 20px !important;
  flex-shrink: 0;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-columns {
  display: grid;
  grid-template-columns: minmax(255px,29%) minmax(0,1fr);
  align-items: stretch;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 20px;
  scrollbar-gutter: auto;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open :is(.rw-summary-column,.rw-operations-column) {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 3px 8px 0;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-summary-column {
  position: static;
  grid-column: 1;
  grid-row: 1;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-operations-column {
  grid-column: 2;
  grid-row: 1;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-section {
  padding: 18px !important;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-fields {
  gap: 14px;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-field > span {
  font-size: 13px;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-field :is(input,select,textarea) {
  font-size: 14px;
  min-height: 42px;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-field small {
  font-size: 11px;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-line {
  font-size: 13px;
  gap: 12px;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-line.rw-total {
  font-size: 20px;
}
html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-summary-column .rw-section-head h3 {
  font-size: 19px;
}
/* Laptops retain the right-side window; phones get one usable scroll area with
   editable fields before the summary, not an extra view/edit navigation step. */
@media(min-width:761px) and (max-width:1279px) {
  html body.frch-ui #reservationDrawer.reservation-workspace-open {
    width: calc(100vw - var(--ui-sidebar-width) - 40px) !important;
  }
}
@media(max-width:1100px) {
  html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-columns {
    display: flex;
    flex-direction: column;
    overflow: auto;
    gap: 18px;
  }
  html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-operations-column {
    order: 0;
    height: auto;
    overflow: visible;
    flex: none;
  }
  html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-summary-column {
    order: 1;
    height: auto;
    overflow: visible;
    flex: none;
  }
}
@media(max-width:760px) {
  html body.frch-ui #reservationDrawer.reservation-workspace-open {
    left: 0;
    right: 0;
    top: 0;
    width: 100% !important;
    height: 100dvh;
    border-radius: 0;
  }
  html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-columns {
    padding: 14px;
  }
  html body.frch-ui #reservationDrawer.reservation-workspace-open .rw-toolbar {
    padding: 10px 14px !important;
  }
}

/* We restore scroll explicitly after render. Native anchor compensation for
   weekday hints or updated row labels must not move the operator elsewhere. */
body.frch-ui #reservationTable .table-wrap,
html body.frch-ui #reservationDrawer.reservation-workspace-open :is(.rw-columns,.rw-summary-column,.rw-operations-column) {
  overflow-anchor: none;
}
