/**
 * @author Nicolas CARPi <nico-git@deltablot.email>
 * @copyright 2012 Nicolas CARPi
 * @see https://www.elabftw.net Official website
 * @license AGPL-3.0
 * @package elabftw
 */

@use './variables';

.rte-autocomplete {
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  display: block;
  font-family: sans-serif;
  font-size: 14px;
  min-width: 160px;
  top: 0;
  // keep this above 1200 for tinymce fullscreen mode
  // see #2401
  z-index: 1985;

  &::before {
    border-bottom: 7px solid rgba(0, 0, 0, 0.2);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    content: '';
    display: inline-block;
    left: 9px;
    position: absolute;
    top: -7px;
  }

  &::after {
    border-bottom: 6px solid #fff;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    content: '';
    display: inline-block;
    left: 10px;
    position: absolute;
    top: -6px;
  }

  li {
    /* without the parent seletor (&) the css is not applied and the spinner is too big */
    /* stylelint-disable-next-line selector-no-qualifying-type */
    &.lds-dual-ring::after {
      border: 4px solid currentColor;
      border-color: variables.$elabblue transparent variables.$elabblue transparent;
      height: 20px;
      margin-left: auto;
      margin-right: auto;
      width: 20px;
    }

    a {
      line-height: 20px;
      padding: 3px 20px;
      white-space: nowrap;
    }
  }

  > .active {
    > a,
    > a:hover,
    > a:focus {
      background-color: variables.$superlight;
      color: variables.$mediumstrong;
      outline: 0;
      text-decoration: none;
    }
  }
}
