html:has(.barschel-modal-overlay),
body:has(.barschel-modal-overlay),
html:has(.barschel-file-preview-modal),
body:has(.barschel-file-preview-modal) {
  overflow: hidden !important;
}

.barschel-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  box-sizing: border-box;
  overflow: hidden;
  overscroll-behavior: contain;
}

.barschel-modal-overlay .modal-dialog {
  margin: 0;
  max-width: 100%;
}

.barschel-modal-dialog--full-height {
  min-height: 0;
  max-height: calc(100dvh - 1.5rem);
  height: calc(100dvh - 1.5rem);
  display: flex;
}

.barschel-modal-content--full-height {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.barschel-modal-content--full-height .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
