// The lightbox owns its own scroll region so the footer can be a plain flex item outside it.
// Without this the footer has to rely on position:sticky inside the host's scrolling .modal-body,
// where it competes with the grid's own scroll container and its z-index:99 header — the grid ends
// up rendering through it. min-height:0 is required at every level: a flex child will not shrink
// below its content height by default, and the inner region would never scroll.
:host {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.LotDetailBody {
  color: rgba(26, 26, 26, 0.87);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.LotDetailBody > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.LotDetailScroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
}

// The `width: fit-content; max-width: 100%` override that used to live here is now the default
// in gbformgrid.component.scss (.Grid-sticky-header), so the lightbox no longer needs its own copy.

.LightBox-Save {
  font-weight: 700;
  font-size: 12px;
  background-color: #32AE73;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline-style: none;
  cursor: pointer;
  border: none;
  min-width: 120px;
  height: 32px;
  border-radius: 4px;
}

// A normal flex item, not sticky: it is outside .LotDetailScroll, so nothing can overlap it and
// no z-index is needed.
.modal-footer {
  flex: 0 0 auto;
  background: #fff;
  padding: 12px 20px;
  border-top: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

[dir="rtl"] .modal-footer {
  flex-direction: row-reverse;
}
