#ui__ac {
  &-inner {
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;

    .menu-link {
      .has-help {
        display: flex;
        align-items: center;
        justify-content: space-between;

        small {
          visibility: hidden;
          cursor: help;

          svg {
            opacity: .5;
          }

          &:hover svg {
            opacity: .9;
          }
        }
      }

      &:hover, &.chosen {
        .has-help small {
          visibility: visible;
        }
      }
    }
  }
}

.ui__ac-group-name {
  @apply p-2 text-xs;
  color: var(--ls-block-ref-link-text-color);
}

.search-all #ui__ac-inner {
  max-height: none;
}

.ui__notifications {
  position: fixed;
  z-index: var(--ls-z-index-level-4);
  width: 100%;
  top: 3.2em;
  pointer-events: none;

  &-content {
    @apply inset-0 flex items-end justify-center px-4 py-3
    pointer-events-none sm:px-6 sm:py-3 sm:items-start
    sm:justify-end;
  }

  .notification-area {
    background-color: var(--ls-tertiary-background-color, #fff);
    color: var(--ls-primary-text-color);
  }
}

.ui__toggle {
  .wrapper {
    @apply relative flex-shrink-0
    h-6 w-11 border-2 border-transparent flex
    rounded-full cursor-pointer focus:outline-none focus:shadow-outline;
  }

  .switcher {
    @apply inline-block h-5 w-5 rounded-full bg-white shadow;
  }

  &.is-small {
    .wrapper {
      @apply h-4 w-8;
    }

    .switcher {
      @apply h-3 w-3;
    }
  }
}

.ui__modal {
  @apply fixed bottom-0 inset-x-0 px-4 pb-4;

  @screen sm {
    & {
      @apply inset-0 flex items-baseline justify-center top-24;
    }
  }

  &-overlay {
    @apply fixed inset-0 transition-opacity;
  }

  &-overlay div {
    background: var(--ls-tertiary-background-color);
  }

  &-panel {
    @apply relative rounded-md shadow-xl;

    overflow: hidden;
    background: var(--ls-secondary-background-color);
    max-width: 96vw;

    .panel-content {
      overflow-y: auto;
      max-width: 1024px;
      max-height: 85vh;
      padding: 2rem;
    }
  }

  &-close {
    @apply text-gray-400 hover:text-gray-500
    focus:outline-none focus:text-gray-500
    transition ease-in-out duration-150;
  }
}

.ui__confirm-modal {
  .sublabel {
    display: flex;
    padding: 2px 0;
    align-items: center;
    font-size: 14px;

    input[type='checkbox'] {
      margin-right: 8px;
    }
  }
}

@media (min-width: 1024px) {
  .panel-content {
    min-width: 820px;
  }

  .panel-content .ls-card {
    width: 740px;
    min-height: 60vh;
    max-height: 740px;
  }
}

.ui__button {
  @apply items-center px-3 py-2 border border-transparent
  text-sm leading-4 font-medium rounded-md text-white
  focus:outline-none transition ease-in-out duration-150 mt-1;

  &:disabled {
    opacity: 0.5;
  }

  &:hover {
    opacity: 0.8;
  }

  &.is-link {
    @apply text-white;
  }

  &[intent='logseq'] {
    @apply focus:border-gray-500 dark:hover:text-gray-200;

    color: var(--ls-primary-text-color);
    background: var(--ls-secondary-background-color);

    &:hover {
      color: var(--ls-link-text-color);
    }
  }

  &[intent='link'] {
    @apply focus:border-gray-500 dark:hover:text-gray-200;

    color: var(--ls-primary-text-color);
    background: transparent;

    &:hover {
      color: var(--ls-link-text-color);
    }
  }

  &.p-1 {
    padding: 0.25rem 0.5rem !important;
  }
}

.dropdown-wrapper {
  background-color: var(--ls-primary-background-color, #fff);
  min-width: 12rem;
}

.dropdown-caret {
  display: inline-block;
  width: 0;
  height: 0;
  vertical-align: middle;
  content: '';
  border-top-style: solid;
  border-top-width: 4px;
  border-right: 4px solid transparent;
  border-bottom: 0 solid transparent;
  border-left: 4px solid transparent;
}

.form-select {
  @apply block w-full pl-3 pr-10 py-2 text-base leading-6
  border-gray-300 focus:outline-none focus:shadow-outline-blue sm:text-sm sm:leading-5;

  background-color: var(--ls-primary-background-color, transparent);
  background-repeat: no-repeat;
  border-width: 1px;
  border-color: var(--ls-border-color);

  &.is-small {
    @apply pl-2 py-1.5 sm:leading-4 sm:text-xs;
  }
}

.form-input {
  @apply block w-full pl-2
  sm:text-sm sm:leading-5;

  border-width: 1px;
  border-color: var(--ls-border-color);

  &:focus {
    box-shadow: 0 0 0 2px rgba(164, 202, 254, 0.45);
  }

  &.is-small {
    @apply py-1.5 sm:leading-4 sm:text-xs;
  }
}

.rotating-arrow.not-collapsed svg {
  transform: rotate(90deg);
}

.rotating-arrow svg {
  transition: all 100ms ease-in 0ms;
}
