/*
 * Minor CSS customizations to forms
*/

/* LB iFrame modal close button */

.ui-dialog-titlebar-close {
  background: center center no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z' fill='%23fff' /%3E%3C/svg%3E");
  background-size: 60%;
  opacity: 1;
}

/* Fix styling on Media library tabs */

.media-library-menu {
  margin-top: 1rem;
}

.media-library-menu__link {
  border-bottom: 1px solid #ddd;
  font-size: 1.1em;
  padding: 1em 1.2em;
}

/* Hide required field asterisk on Media fields */
/* Needed for images and documents. */

.field--widget-inline-entity-form-simple
  .field--type-image
  .form-item__label.form-required::after {
  display: none;
}

/* Alter taxonomy/term forms
 * GIn was making them appear like toggle pills
 * Fix Gin theme checkbox styling for this case
 * Make topics appear in columns
*/

/* There is a lot of specificity in the gin theme code. */
/* Make the term reference tree widgets indent properly */
.term-reference-tree-level {
  ul {
    margin-left: 1.3rem !important;
  }
  li {
    padding: 0.5rem 0;
  }
  .form-checkbox,
  .form-checkbox:hover {
    border: 1px solid grey !important;
    opacity: 1 !important;
    height: 1.3rem !important;
    width: 1.3rem !important;
  }
  label {
    padding-left: 1.5rem !important;
  }
}

:not(.form-checkboxes):not(td):not(.tabledrag-cell-content__item):not(.media-library-item__click-to-select-checkbox):not(.field-content) > .form-type--checkbox input {
  position: static !important;
}
.term-reference-tree-button,
.term-reference-tree-level .no-term-reference-tree-button,
.term-reference-tree-level .checkbox-toggle {
  display: none !important;
}

@media all and (min-width: 1000px) {
  .gin--edit-form {
    #edit-field-topics,
    #edit-field-regions {
      column-count: 3;
      column-gap: 1rem;

    }
  }
}

/* Fix ckeditor wrapping  */

.ck.ck-toolbar.ck-toolbar_grouping > .ck-toolbar__items {
  flex-wrap: wrap !important;
}
