/*
 * SEARCH AUTOCOMPLETE
 * Basic theme.
 */

/**
 * THEME BASIC
 */

/* Input box */
.js input.form-autocomplete {
  border: 1px solid #ccc;
}

/* Suggestion menu style */
ul[data-sa-theme="basic"] {
  box-shadow: rgba(0, 0, 0, 0.498039) 0 0 15px;
  background: white;
  border-bottom: 1px solid #bfbfbf;
  text-align: left;
  font-family: 'Lucida Grande', Helvetica, Arial, Verdana, sans-serif;
  min-width: 350px;
}
ul[data-sa-theme="basic"] a.ui-menu-item-wrapper,
ul[data-sa-theme="basic"] a.ui-menu-item-wrapper.ui-state-active {
  display: block;
  background: none;
  border: none;
}

/* Suggestion containers */
ul[data-sa-theme="basic"] .ui-autocomplete-content {
  display: flex;
  flex-direction: row;
}
ul[data-sa-theme="basic"] .ui-autocomplete-container {
  flex: 1 1 100%;
  padding: 0.5rem;
}
ul[data-sa-theme="basic"] .ui-autocomplete-container.ui-autocomplete-container-more_results,
ul[data-sa-theme="basic"] .ui-autocomplete-container.ui-autocomplete-container-no_results {
  display: block;
  text-align: center;
}


/* Suggestion menu elements */
ul[data-sa-theme="basic"] .ui-autocomplete-container > *,
ul[data-sa-theme="basic"] .ui-autocomplete-container > *.ui-state-focus,
ul[data-sa-theme="basic"] .ui-autocomplete-container > *:hover {
  border-color: #bfbfbf;
  border-width: 1px 0 0 0;
  border-style: solid;
  margin: 0;
  padding: 0.5rem 0.7rem;
}

/* Suggestion group header */
ul[data-sa-theme="basic"] .ui-autocomplete-container > div.ui-autocomplete-field-group {
  opacity: 1;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.8em;
  background-color: #ccc;
  padding: 1px 5px;
  margin: 0;
  display: block;
}

/* Suggestion menu items */
ul[data-sa-theme="basic"] .ui-autocomplete-container > li.ui-menu-item {
  background: white;
}
/* Suggestion menu items hovering */
ul[data-sa-theme="basic"] .ui-autocomplete-container > .ui-menu-item.ui-state-focus,
ul[data-sa-theme="basic"] .ui-autocomplete-container > .ui-menu-item:hover {
  background: #0072b9;
  border-top-color: #1f4a64;
  color: white;
}

/* Searched term whithin a suggestion item */
ul[data-sa-theme="basic"] .ui-autocomplete-field-term {
  font-weight: bold;
  border-bottom: 1px dotted;
}

/* Suggestion item fields */
ul[data-sa-theme="basic"] .ui-autocomplete-container:not(.ui-autocomplete-container-more_results):not(.ui-autocomplete-container-no_results) .ui-autocomplete-fields {
  display: table;
}
ul[data-sa-theme="basic"] .ui-autocomplete-fields > * {
  font-size: 0.85em;
  line-height: 1.3em;
  color: #6f6f6f;
  display: block;
}
ul[data-sa-theme="basic"] .ui-autocomplete-fields .ui-autocomplete-field-title {
  font-weight: bold;
  color: black;
}
ul[data-sa-theme="basic"] .ui-autocomplete-fields .ui-autocomplete-field-thumbnail {
  display: table-cell;
  vertical-align: middle;
  padding-right: 0.8em;
}
ul[data-sa-theme="basic"] .ui-autocomplete-fields .ui-autocomplete-field-thumbnail img {
  width: 2em;
  height: 2em;
  object-fit: cover;
  border-radius: 50%;
  vertical-align: middle;
}

/* Suggestion focused fields */
ul[data-sa-theme="basic"] .ui-autocomplete-container > li.ui-menu-item.ui-state-focus .ui-autocomplete-fields > *,
ul[data-sa-theme="basic"] .ui-autocomplete-container > li.ui-menu-item:hover .ui-autocomplete-fields > * {
  color: white;
}

/* Suggestion "no result" and "more resul" customizations */
ul[data-sa-theme="basic"] .ui-autocomplete-container > div.ui-autocomplete-field-group.no_results + li.ui-menu-item,
ul[data-sa-theme="basic"] .ui-autocomplete-container > div.ui-autocomplete-field-group.more_results + li.ui-menu-item {
  padding: 0;
}
ul[data-sa-theme="basic"] .ui-autocomplete-container > div.ui-autocomplete-field-group.no_results + li.ui-menu-item .ui-autocomplete-fields > *:first-child,
ul[data-sa-theme="basic"] .ui-autocomplete-container > div.ui-autocomplete-field-group.more_results + li.ui-menu-item .ui-autocomplete-fields > *:first-child {
  font-weight: normal;
  text-align: center;
  font-style: italic;
}


/**
 * Olivero specifics
 */
[id^="block-olivero-search-form"] .ui-menu .ui-state-focus,
[id^="block-olivero-search-form"] .ui-menu .ui-state-active {
  margin: 0;
}
[id^="block-olivero-search-form"] .block-search-wide__wrapper {
  overflow: visible;
}
[id^="block-olivero-search-form"] ul[data-sa-theme="basic"] {
  display: block;
  overflow-y: scroll;
  box-shadow: none;
}
[id^="block-olivero-search-form"] ul[data-sa-theme="basic"] .ui-autocomplete-container > li.ui-menu-item.ui-state-focus,
[id^="block-olivero-search-form"] ul[data-sa-theme="basic"] .ui-autocomplete-container > li.ui-menu-item:hover {
  background: var(--color--primary-50, #2494DB);
  color: var(--color--white, #FFFFFF);
}
[id^="block-olivero-search-form"] ul[data-sa-theme="basic"] .ui-autocomplete-fields > * {
  font-size: 1.3rem;
}
