// Select

.c-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  &.disabled {
    opacity: 0.2;
    pointer-events: none;
  }

  &__content {
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    height: 38px;
    cursor: pointer;
    border: 1px solid #dedeec;
    position: relative;
  
    &.success {
      border-color: #00ba88;
    }

    &.error, &--error {
      border-color: #ed2e7e;
    }

    &.active {
      svg {
        transform: rotate(-90deg);
      }
    }
  }

  &--action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: -webkit-fill-available;
    color: #111;
    padding: 0 12px;
    position: relative;

    > svg {
      position: absolute;
      left: auto;
      right: 5px;
    }
  }

  &__label {
    font-size: 12px;
    color: #40405b;

    .required {
      font-size: 12px;
      font-weight: 500;
      line-height: 16px;
      color: red;
    }
  }

  &__list {
    position: absolute;
    margin: 0;
    border-radius: 8px;
    border: 0.5px solid #dedeec;
    background: #fff;
    box-shadow: 0px 12px 24px 0px rgba(37, 37, 37, 0.1);
    overflow: hidden;
    z-index: 999;

    &-content {
      padding: 0 12px;
      &.checkbox{
        .c-select__group {
          margin-bottom: 0px;
        }
      }
    }

    .select-scroll {
      //max-height: 400px;
      overflow: hidden;
      overflow-y: scroll;
      padding: 12px 0px 12px 12px;
      margin: 0;
      height: 100%;
      box-sizing: border-box;
    }

  }

  &__placeholder {
    font-size: 14px;
    font-weight: 400;
    color: #c1c1c1;
    overflow-x: clip;
    text-overflow: clip;
    scrollbar-width: 1px;
    white-space: nowrap;
    width: calc(100% - 28px);
    
    > span{
      display: inline-block;
      font-size: 12px;
      //max-width: 80px;
      overflow: hidden;
      //text-overflow: ellipsis;
      background-color: #dedeec;
      border-radius: 6px;
      padding: 0px 12px;
      margin: 9px 6px 0px 0px;
      color: #14142a;
    }
  }

  &.has-value &__placeholder {
    color: #14142a;
  }

  &__item {
    list-style: none;
    display: flex;
    align-items: center;
    padding: 0 0 0 16px;
    gap: 8px;
    cursor: pointer;
    max-height: 36px;

    &-value {
      font-size: 13px;
      font-weight: 500;
      margin: 0;
      padding: 8px;
      width: calc(100% - 41px);

      &:hover,
      &:active,
      &:focus {
        color: #5050ff;
      }
    }

    &.active {
      .c-select__item-value {
        padding: 16px;
        border-radius: 8px;
        background: rgba(42, 70, 255, 0.05);
        margin-bottom: 11px;
        display: flex;
        align-items: center;
        gap: 19px;
      }
    }

    &--selected {
      color: #5050ff;
      font-weight: 700;
    }
		&--checkbox{
			min-height: 34px;
      height: auto;
      max-height :none;
			padding: 2px 12px;
			border-radius: 8px;
			margin: 4px 0px;
		}
		&--checked{
			background-color: #eeeeff;
		}
  }

  &__group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 12px;
    cursor: pointer;

    &:last-child {
      margin-bottom: 0;
    }

    ul {
      padding-left: 0;
    }

    &-content {
      display: flex;
      flex-direction: column;
    }

    &-label {
      font-size: 14px;
      font-weight: 500;
      color: #40405b;
      padding: 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    &.active {
      .c-select__group-label {
        color: #5050FF;
        background: #EEF;
        border-radius: 8px;
        svg {
          transform: rotate(-90deg);
        }
      }
    }
  }

  &__error {
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0.75px;
    text-transform: capitalize;
    margin: 8px 0 0;
    color: #c30052;
  }
}
