/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */

/**
 * @file
 * Visual styles for views exposed form.
 */

/**
 * Use flexbox and some margin resets to make the fields + actions go inline.
 *
 * For (at least) Media Library, this file is typically inserted by AJAX add_css
 * command when the dialog is opened. The AJAX add_css command always adds the
 * missing-but-required CSS assets to the beginning of the HTML <head>. Because
 * of this, we cannot rely on the expected loading order of the CSS assets.
 * This is why we have to double these selectors: we have to get the expected
 * output even for the Media Library modal.
 *
 * @todo Remove double selectors after https://www.drupal.org/node/1461322
 * has been resolved.
 */

.views-exposed-form.views-exposed-form {
  display: flex;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1.5rem 1.5rem 1.5rem;
  border: 1px solid #dedfe4;
  border-radius: 2px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.views-exposed-form--preview.views-exposed-form--preview {
  margin-top: 0;
}

.views-exposed-form__item.views-exposed-form__item {
  max-width: 100%;
  margin: 0.75rem 0.5rem 0 0; /* LTR */
}

[dir="rtl"] .views-exposed-form__item.views-exposed-form__item {
  margin-right: 0;
  margin-left: 0.5rem;
}

.views-exposed-form__item--preceding-actions.views-exposed-form__item--preceding-actions {
  margin-right: 1rem; /* LTR */
}

[dir="rtl"] .views-exposed-form__item--preceding-actions.views-exposed-form__item--preceding-actions {
  margin-right: 0;
  margin-left: 1rem;
}

.views-exposed-form__item--actions.views-exposed-form__item--actions .button {
  margin-top: 0;
  margin-bottom: 0;
}

.views-exposed-form__item--actions.views-exposed-form__item--actions .button:last-child {
  margin-right: 0;
}

[dir="rtl"] .views-exposed-form__item--actions.views-exposed-form__item--actions:last-child {
  margin-left: 0;
}

.views-exposed-form .form-item--no-label,
.views-exposed-form__item.views-exposed-form__item.views-exposed-form__item--actions {
  /* Line height of a label + existing margin for the element + margin for label */
  margin-top: 2.375rem;
}
