/* Hide the weight toggle in compact Media Library widgets. */
.js-media-library-widget-toggle-weight {
  display: none;
}

/* Keep the add form separated from the media browser when Claro is not active. */
.media-library-add-form {
  margin-bottom: 1rem;
}

.media-library-views-form .views-table {
  width: 100%;
}

.media-library-item__attributes {
  min-width: 0;
  width: 100%;
}

/* Center previews consistently in non-Claro active themes. */
.media-library-item__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-gray-050-o-40, #f3f4f9);
}

.media-library-item__preview img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Avoid double spacing inside Drupal dialogs. */
.ui-dialog-content .media-library-wrapper {
  margin: 0;
}

.ui-dialog-content .media-library-content {
  padding: 0;
}
