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

    .menu-link {
      word-break: break-all;

      .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 px-4 pb-4 inset-0 flex items-baseline justify-center top-12 sm: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);

    .panel-content {
      overflow-y: auto;
      overflow-x: hidden;
      width: 94vw;
      max-height: 89vh;
      padding: 2rem 1.5rem;

      @screen sm {
        overflow-y: overlay;
        min-width: 720px;
        max-height: 85vh;
        padding: 2rem;
        width: auto;

        .ls-card, .ls-search {
          width: 740px;
          min-height: 60vh;
        }

        .ls-search {
          width: var(--ls-main-content-max-width);
        }
      }
    }
  }

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

  &[label="ls-modal-align-center"] {
    top: 0;

    .ui__modal-panel {
      top: 50vh;
      transform: translateY(-52%);
    }
  }

  &[label="diff__cp"] {
      .panel-content {
          padding: 2rem 1rem;

          @screen sm {
              padding: 2rem;
          }
      }
  }

  &[label="flashcards__cp"] {
      .panel-content {
          padding: 2rem 0;

          @screen sm {
              padding: 2rem 2rem;
          }
      }
  }

  &[label="instruction__cp"] {

      .ui__modal-panel {
          height: 90%;
      }

      .panel-content {
          height: 100%;
      }
  }
}

.instruction {
    height: 40%;

    @screen sm {
        height: 70%;
    }
}

html.is-native-android,
html.is-native-iphone,
html.is-native-iphone-without-notch
{
    .references  {
        .blocks-container {
            transform: translateX(-8px);
            width: 104%;
        }
    }

    .ls-card {
        min-height: 65vh;
    }

    .ui__modal {
        &[label="flashcards__cp"] {
            .panel-content {
                padding: 2rem 1rem 1rem;
                width: 90vw;

                .cards-review {
                    padding-left: 0px;
                    padding-right: 0px;
                }

                .blocks-container {
                    transform: translateX(-7px);
                    width: 103%;
                }
            }
        }
    }
}

html.is-mobile {
  .ui__modal {
    @apply bottom-0 inset-x-0;
  }
}

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

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

.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;
    cursor: not-allowed;
  }

  &:hover:not([disabled]) {
    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'], &[intent='border-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);
    }
  }

  &[intent='border-link'] {
      border: 1px solid;
  }

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

.dropdown-wrapper {
  background-color: var(--ls-primary-background-color, #fff);
  border: 1px solid var(--ls-tertiary-background-color);
  min-width: 12rem;
  border-radius: 6px;
}

.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;
}

.bg-quaternary {
  background-color: var(--ls-quaternary-background-color);
}
