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

.c-period-filter {
  &__input {
    padding: 0.75em 1em;
    border: none;
    background-color: $color-background-alternative;
    min-width: 12.5em;
    width: 100%;
    cursor: pointer;
    text-align: left;
  }

  &__input-text {
    font-weight: $font-weight-normal;
    font-size: $font-size-caption;
    margin: 0;
    line-height: 1rem;
  }

  &__input-container {
    z-index: $layer-screen-attached;
    cursor: pointer;
  }

  &__container {
    position: relative;
    @include transition((opacity, visibility));
    visibility: hidden;
    opacity: 0;

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

  &__item {
    position: relative;
    cursor: pointer;
    padding: 0.875rem 1rem;
    font-size: $font-size-caption;
    background-color: $color-white;

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

    &--disabled {
      cursor: initial;
      color: $color-paragraph-light;

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

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

  &__items {
    padding-bottom: 1em;
    max-height: 35vh;
    overflow: auto;
  }

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

  &__calendar {
    position: absolute;
    top: 0.75em;
    left: 1em;
  }

  &__chevron {
    position: absolute;
    font-size: $font-size-small;
    top: 1.375em;
    right: 1.5em;
  }

  &__selected {
    margin-left: $margin-normal;
    font-size: 0.75em;
    color: $color-primary;
  }
}
