@import "@/styles/variables";
@import "@/styles/mixins";

.tagContainer {
  cursor: pointer;
  padding: 8px 18px 8px 16px;
  border: 1px solid rgba(44, 44, 44, 0.15);
  border-radius: 0.625rem;
  .headerContainer {
    h5 {
      font-size: 16px;
      line-height: 1.75;
      color: $black;
    }
    .tipArea {
      text-align: center;
      line-height: 1.75;
      display: flex;

      .tipTitle {
        @include text-overflow;
        max-width: 11rem;
      }

      span {
        font-size: 12px;
        line-height: 2.33;
        opacity: 0.6;
      }
      i {
        display: block;
        font-size: 12px;
        color: $black;
        transform: rotate(90deg);
        transition: all 0.25s linear;
      }
    }
  }

  .tagList {
    display: none;
    li {
      cursor: pointer;
      padding: 0.625rem 0;
      box-shadow: inset 0px -1px 0px rgba(44, 44, 44, 0.15);
      &:nth-last-child(1) {
        box-shadow: none;
      }
      p {
        @include p1;
        opacity: 0.6;
        color: $black;
      }
    }

    .checkboxWrapper {
      label {
        @include p1;
        opacity: 0.8;
        color: $black;
      }
      span.iconChecked {
        color: $blue;
      }
      span.iconNormal {
        color: $font-color-8;
      }
      i {
        font-size: $font-h5;
        margin-right: 0.5rem;
      }
    }
  }
  :global(.tagListActive) {
    & + .tagList {
      display: block;
      position: absolute;
      top: calc(100% + 0.5rem);
      padding: 1rem 0 0;
      left: 0;
      right: 0;
      background-color: $white;
      z-index: 1;
      border: 1px solid rgba(44, 44, 44, 0.15);
      border-radius: 0.625rem;
      overflow: hidden;
      ul {
        padding: 0 1rem;
        max-height: 22.25rem;
        overflow-y: scroll;
      }
      button {
        display: block;
        width: 100%;
        height: 2.75rem;
        border-radius: unset;
      }
    }

    .tipArea {
      .tipTitle {
        color: $blue;
        opacity: 1;
      }

      i {
        transform: rotate(-90deg);
      }
    }
  }
}
