@import '../settings/variables';
@import '../tools/mixins/transition';

$popup-edge-padding: 1.5rem;

.c-dropdown-popup-window {
  &__container {
    position: relative;
    @include transition((opacity, visibility));
    visibility: hidden;
    opacity: 0;
    z-index: $layer-tooltip;

    &--open {
      opacity: 1;
      visibility: visible;
    }
  }

  &__pop-up {
    z-index: $layer-tooltip;
    position: absolute;
    top: 8px;
    left: 0;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    width: 100%;
    background-color: $color-white;
  }

  &__pop-up-content {
    padding: $popup-edge-padding 0;
    max-height: 35vh;
    overflow: auto;

    &--no-gutter {
      padding: 0 0 $popup-edge-padding 0;
    }
  }

  &__scroller {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 2em;
    background: linear-gradient(182.84deg, rgba(255, 255, 255, 0) 2.34%, #ffffff 79.64%);
  }
}

.c-dropdown-option {
  position: relative;
  cursor: pointer;
  height: 2.5em;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  background-color: $color-white;
  padding: 0 $popup-edge-padding;

  &:hover {
    background-color: $color-background-alternative;
  }

  &__content {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  &__gutters {
    padding-left: $popup-edge-padding;
    padding-right: $popup-edge-padding;
  }

  &__checkmark {
    font-size: 0.6em;
  }

  &__checkmark-not-selected {
    padding-left: 1.4rem;
  }
}
