@import "../../styles/colors.scss";
@import "../../styles/fonts.scss";

.light_dropdown_wrapper {
  display: flex;
  flex-direction: column;
  max-width: 303px;
  min-width: 120px;
  position: relative;
  .light_dropdown_title {
    color: $blackPrimary;
    font-feature-settings: "clig" off, "liga" off;
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 28px; /* 200% */
    margin: 0 0 10px 0;
    &:hover {
      cursor: pointer;
    }
  }

  .light_dropdown {
    z-index: 1;
    background-color: $whiteBlue;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 3px 36px 3px 0px;
    position: relative;
    min-height: 40px;
    // min-width: 100%;
    border-radius: 10px;
    box-sizing: border-box;
    border: 0.2px solid $greyTertiary;
    .placeholder {
      margin: 0;
      padding-left: 10px;
      color: $blackPrimary;
      font-feature-settings: "clig" off, "liga" off;
      font-family: Poppins;
      font-size: 12px;
      font-style: normal;
      font-weight: 300;
      line-height: 28px; /* 233.333% */
    }
    > img {
      position: absolute;
      right: 10px;
      top: 12px;
    }
    .open_dropdown_icon {
      transform: rotate(180deg);
    }
    .close_dropdown_icon {
    }
    .optionsWrapper {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      .option {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        padding: 2px 8px;
        border-radius: 8px;
        border: 1px solid $orangePrimary;
        background: transparent;
        align-items: center;
        margin-left: 4px;

        > p {
          margin: 0 10px 0 0;
          color: $orangePrimary;
          font-feature-settings: "clig" off, "liga" off;
          font-family: Poppins;
          font-size: 14px;
          font-style: normal;
          font-weight: 500;
          line-height: 28px; /* 200% */
        }
      }
    }
  }
  .dropdown_modal {
    transform: translateY(calc(100% - 58px));
    z-index: 5;
    bottom: -38px;
    left: 0;
    position: absolute;
    padding: 0 3px 0;
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    background-color: $whiteBlue;
    border: 0.2px solid $greyTertiary;
    :hover {
      background-color: $orangePrimary;
      color: $white;
      border-radius: 10px;
    }
    > div {
      cursor: pointer;
      padding: 0;
      color: $orangePrimary;
      font-feature-settings: "clig" off, "liga" off;
      font-family: Poppins;
      font-size: 14px;
      font-style: normal;
      font-weight: 400;
      line-height: 28px; /* 200% */
      border-radius: 10px;
      margin-top: 1px;
      > div {
        padding: 6px 7px;
      }
    }
    .active_option {
      background-color: $whiteBlue;
      color: $orangePrimary;
      border: 0.5px solid $orangePrimary;
    }
  }
  .dropdown_modal_scroll {
    max-height: 350px;
    overflow: scroll;
  }
}

.dark_dropdown_wrapper {
  display: flex;
  flex-direction: column;
  max-width: 303px;
  min-width: 120px;
  position: relative;
  .dark_dropdown_title {
    color: $darkGrey;
    font-feature-settings: "clig" off, "liga" off;
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 28px; /* 200% */
    margin: 0 0 10px 0;
    &:hover {
      cursor: pointer;
    }
  }

  .dark_dropdown {
    z-index: 1;
    background-color: $blackTertinary;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 3px 36px 3px 0px;
    position: relative;
    min-height: 40px;
    // min-width: 300px;
    border-radius: 10px;
    box-sizing: border-box;
    border: 0.2px solid $yellow;
    .placeholder {
      margin: 0;
      padding-left: 10px;
      color: $greySecondary;
      font-feature-settings: "clig" off, "liga" off;
      font-family: Poppins;
      font-size: 12px;
      font-style: normal;
      font-weight: 300;
      line-height: 28px; /* 233.333% */
    }
    > img {
      position: absolute;
      right: 10px;
      top: 12px;
    }
    .open_dropdown_icon {
      transform: rotate(180deg);
    }
    .close_dropdown_icon {
    }
    .optionsWrapper {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      .option {
        box-sizing: border-box;
        display: flex;
        flex-direction: row;
        padding: 2px 8px;
        border-radius: 8px;
        border: 1px solid $yellow;
        background: transparent;
        align-items: center;
        margin-left: 4px;

        > p {
          margin: 0 10px 0 0;
          color: $yellow;
          font-feature-settings: "clig" off, "liga" off;
          font-family: Poppins;
          font-size: 14px;
          font-style: normal;
          font-weight: 500;
          line-height: 28px; /* 200% */
        }
      }
    }
  }
  .dropdown_modal {
    transform: translateY(calc(100% - 58px));
    z-index: 5;
    bottom: -38px;
    left: 0;
    position: absolute;
    padding: 0 3px 0;
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    background-color: $blackTertinary;
    border: 0.2px solid $yellow;
    :hover {
      background-color: $yellow;
      color: $blackSecondary;
      border-radius: 10px;
    }
    > div {
      cursor: pointer;
      padding: 0;
      color: $greySecondary;
      font-feature-settings: "clig" off, "liga" off;
      font-family: Poppins;
      font-size: 14px;
      font-style: normal;
      font-weight: 400;
      line-height: 28px; /* 200% */
      border-radius: 10px;
      margin-top: 1px;
      > div {
        padding: 6px 7px;
      }
    }
    .active_option {
      background-color: transparent;
      color: $yellow;
      border: 0.5px solid $yellow;
    }
  }

  .dropdown_modal_scroll {
    max-height: 350px;
    overflow: scroll;
  }
}

.light_dropdown_wrapper,
.dark_dropdown_wrapper {
  padding-bottom: 20px;
  .error_dropdown_light {
    background-color: $rozePrimary;
    border: 1px solid $redPrimary;
    > .placeholder {
      color: $redPrimary;
    }
  }
  .error_dropdown_dark {
    background-color: transparent;
    border: 1px solid $redPrimary;
    > .placeholder {
      color: $redPrimary;
    }
  }
  .error_text {
    margin: 0;
    position: absolute;
    color: $redPrimary;
    font-feature-settings: "clig" off, "liga" off;
    font-family: Poppins;
    font-size: 10px;
    font-style: normal;
    font-weight: 300;
    line-height: 28px; /* 280% */
    transform: translateY(calc(100% - 20px));
    z-index: 0;
    bottom: 0;
    left: 0;
  }
  .clean_button {
    position: absolute;
    right: -21px;
    top: 51px;
    cursor: pointer;
    height: 16px;
    width: 16px;
  }
}

@media screen and (min-width: 400px) and (max-width: 767px) {
  .light_dropdown_wrapper,
  .dark_dropdown_wrapper {
    margin: 0;
  }
}
