@import "../variables";

.kit-dropdown {
  position: relative;
  margin: 0 15px;
  box-sizing: border-box;
  font-family: "PT Sans", sans-serif;

  @media (max-width: $mobile-large) {
    width: 100%;
    margin: 0 0 15px;
  }

  &__btn {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 130px;
    height: 28px;
    background-color: #e2eaf0;
    border: 1px solid #8aacc2;
    border-radius: 3px;
    outline: none;
    font-weight: bold;
    color: #000000;
    cursor: pointer;

    @media (max-width: $mobile-large) {
      justify-content: center;
      width: 100%;
    }

    &:hover:not(:disabled) {
      background-color: darken($color: #e2eaf0, $amount: 8%);
      border-color: darken($color: #8aacc2, $amount: 8%);
    }

    &_open {
      background-color: darken($color: #f2f2f2, $amount: 8%);
      border-color: darken($color: #d4d4d4, $amount: 8%);
      border-bottom-right-radius: 0;
      border-bottom-left-radius: 0;

      &:hover:not(:disabled) {
        background-color: darken($color: #f2f2f2, $amount: 9%);
        border-color: darken($color: #d4d4d4, $amount: 9%);
      }
    }
  }

  &__icon {
    transition: transform .2s ease;

    &_open {
      transform: rotate(180deg);
    }
  }

  &__list {
    position: absolute;
    top: 27px;
    left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 130px;
    max-height: 483px;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
    border: 1px solid darken($color: #d4d4d4, $amount: 8%);
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
    overflow: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    opacity: 0;
    list-style: none;
    pointer-events: none;

    @media (max-width: $mobile-large) {
      width: 100%;
    }

    &_open {
      opacity: 1;
      pointer-events: all;
    }
  }

  &__list-item {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #d4d4d4;

    &:last-child {
      border-bottom: none;
    }
  }

  &__year {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background-color: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
  }

  &__year-value {
    font-weight: bold;
  }

  &__month {
    display: none;
    flex-direction: column;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;

    &_open {
      display: flex;
    }
  }

  &__month-item {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1;
    color: #000000;
    cursor: pointer;

    &:hover {
      background-color: #ffffff;
    }

    &_active {
      background-color: #ffffff;
    }
  }

}
