/**
 * @file
 * Stylesheet for the Linkit module.
 */
.js input.form-linkit-autocomplete {
  background-image: url(../images/throbber-inactive.png);
  background-position: 100% center; /* LTR */
  background-repeat: no-repeat;
}

.js[dir="rtl"] input.form-linkit-autocomplete {
  background-position: 0 center;
}

.js input.form-linkit-autocomplete.ui-autocomplete-loading {
  background-image: url(../images/throbber-active.gif);
  background-position: 100% center; /* LTR */
}

.js[dir="rtl"] input.form-linkit-autocomplete.ui-autocomplete-loading {
  background-position: 0 center;
}

/* Override the default jQuery UI theme */
.linkit-ui-autocomplete {
  max-height: calc((100vh - 80px)/2);
  overflow: auto;
  position: relative;
}

.linkit-ui-autocomplete.ui-widget {
  font-size: .9em;
  max-width: inherit;
  position: absolute;
}

.linkit-ui-autocomplete.ui-menu .linkit-result-line-wrapper {
  margin: 0;
  padding: 5px 7px;
}

.linkit-ui-autocomplete.ui-menu .linkit-result-line-wrapper.unpublished {
  background: #fff4f4;
}

.linkit-ui-autocomplete.ui-menu .linkit-result-line-wrapper.ui-state-focus,
.linkit-ui-autocomplete.ui-menu .linkit-result-line-wrapper.ui-state-active {
  border: 0;
  border-bottom: 1px solid #bfbfbf;
  background: #0075ba;
  color: #fff;
}

.ui-autocomplete .linkit-result-line-wrapper.ui-menu-item-wrapper.ui-state-active,
.ui-autocomplete .linkit-result-line-wrapper.ui-menu-item-wrapper.ui-state-focus {
  background: #bfbfbf;
}

.linkit-result-line:not(:last-of-type) {
  border-bottom: 1px solid #bfbfbf;
}

.ui-menu .linkit-result-line--group.ui-menu-divider {
  margin: 0;
  height: auto;
  line-height: inherit;
  padding: 3px;
  background-color: #e7e7e7;
  border-bottom: 1px solid #bfbfbf;
  text-align: center;
  font-size: 0.9em;
  font-weight: 600;
  color: #555;
}

.linkit-result-line--title {
  display: block;
  font-weight: 600;
}

.linkit-result-line--description {
  display: block;
  font-size: 0.9em;
  line-height: 1.3;
}

.linkit-result-line--description img {
  display: block;
}
