.modal-dialog {
  border-radius: 5px;
}

.modal-content {
  .page-sidebar {
    display: none;
  }

  .blacklight-modal-close {
    display: block;
  }
}

// app/views/catalog/facet.html.erb may be rendered as a modal or a whole page.
// When it's a whole page, don't show the close button.
.blacklight-modal-close {
  display: none;
}

// When modal content is rendered outside of a modal, Bootstrap css variables like
// --bs-modal-footer-border-width are undefined (only in .modal scope). So we apply
// light styling to the modal footer when it's not in a modal.
.modal-footer:not(.modal .modal-footer) {
  border-top: var(--bs-border-width) solid var(--bs-border-color);
  padding-top: 1rem;
  margin-top: 1rem;
}
