.barschel-file-preview-modal {
  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-file-preview-modal__dialog {
  width: min(70vw, 1400px);
  max-width: min(70vw, 1400px);
  height: calc(100dvh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  min-height: 0;
  margin: 0;
}

.barschel-file-preview-modal__content {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.barschel-file-preview-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.barschel-file-preview-modal__body > .row {
  flex: 1 1 auto;
  min-height: 0;
}

.barschel-file-preview-modal__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.barschel-file-preview-modal__surface {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--bs-border-color, rgba(0, 0, 0, .15));
  border-radius: var(--bs-border-radius, .5rem);
  background: var(--bs-body-bg, #fff);
  overflow: hidden;
}

.barschel-file-preview-modal__frame {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.barschel-file-preview-modal__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 991.98px) {
  .barschel-file-preview-modal__dialog {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
  }
}
