/* Multi-select over the orders list: the header row that turns it on, the
   checkboxes it reveals, and the bar that floats over the bottom while rows
   are ticked. */

/* The orders subtab's own column: the filter row, the sections, and nothing
   between them but this gap. The select form stays out of the layout — it is
   empty, and its fields join it by id from the rows. */
.orders--select-scope {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--rem-24);
}

.orders--select-form {
  display: contents;
}

.orders--header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--rem-12);
}

.orders--header-actions {
  display: flex;
  align-items: center;
  gap: var(--rem-8);
}

.orders--header-divider {
  width: 1px;
  height: 1rem;
  background-color: var(--border-secondary);
}

/* Inside the header the "New order" button no longer owns the whole row, but it
   is also re-rendered on its own by Turbo, so its width gives way here rather
   than in the component. */
.orders--header .patient-chart--orders-filters-container {
  width: auto;
  margin-left: auto;
}

/* The checkbox only appears in select mode. The row's actions stay in place and
   only turn invisible, so the row keeps the width it has outside the mode. */
.order-list--check {
  display: none;
}

.orders-select--on .order-list--check {
  display: block;
}

.orders-select--on .order-list--item {
  column-gap: var(--rem-12);
}

.orders-select--on .order-list--actions {
  visibility: hidden;
}

.orders-select--toolbar {
  position: fixed;
  bottom: var(--rem-24);
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: var(--rem-16);
  padding: var(--rem-8) var(--rem-16);
  background-color: var(--surface-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 8px -2px rgb(33 37 43 / 5%);
}

.orders-select--summary {
  display: flex;
  align-items: center;
  gap: var(--rem-12);
}

.orders-select--clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--rem-24);
  height: 1rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.orders-select--count {
  font-size: var(--rem-14);
  line-height: var(--rem-24);
  font-variation-settings: "wght" var(--text-medium);
  color: var(--text-information);
  white-space: nowrap;
}

.orders-select--divider {
  width: 1px;
  height: 1rem;
  background-color: var(--border-secondary);
}

.orders-select--actions {
  display: flex;
  align-items: center;
  gap: var(--rem-8);
}

/* The whole row is a target in select mode, so it says so. The title stops
   being a link there — the click belongs to the selection, not to a page the
   user did not ask for. */
.orders-select--on .order-list--item {
  cursor: pointer;
}

.orders-select--on .order-list--title {
  pointer-events: none;
}
