/**
 * PisellMultipleSelect 组件样式
 * 基于 Figma 设计规范，覆盖时使用 pisell-lowcode-xxx
 */

.pisell-multiple-select {
  width: 100%;

  .pisell-lowcode-select-clear {
    color: #667085;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: -22px -8px;
    padding: 10px 8px;

    &:hover {
      color: #344054;
    }
  }

  &-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
  }

  &-label {
    font-size: 14px;
    font-weight: 600;
    color: #344054; // Gray/700
    line-height: 20px;

    &-required::after {
      content: ' *';
      color: #d92d20; // Error/600
      margin-left: 0;
    }
  }

  &-helper-text {
    font-size: 14px;
    font-weight: 400;
    color: #667085; // Gray/500
    line-height: 20px;
  }

  &-error-text {
    font-size: 12px;
    font-weight: 400;
    color: #d92d20; // Error/600
    line-height: 1.5;
    animation: pisell-multiple-select-fadeIn 0.3s ease-in-out;
  }

  &-option-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  &-option-check {
    color: #7f56d9; // Primary/600
    font-size: 16px;
    margin-left: 8px;
  }

  // 聚合标签（maxTagPlaceholder）
  //&-more-tag {
  //  display: inline-flex;
  //  align-items: center;
  //  background-color: #eaecf0;
  //  color: #344054; // Gray/700
  //  border: none;
  //  border-radius: 6px;
  //  padding: 6px 10px;
  //  font-size: 16px;
  //  font-weight: 500;
  //  line-height: 24px;
  //  cursor: pointer;
  //  transition: background-color 0.2s ease;
  //
  //  &:hover {
  //    background-color: #d0d5dd; // Gray/300
  //  }
  //}

  // 只读状态
  &-readonly {
    &-display {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      align-items: center;
      min-height: 24px;
    }

    &-tag {
      margin: 0;
      cursor: default;
      border-radius: 12px;
      border: 1px solid transparent;
      font-size: 14px;
      line-height: 22px;
      padding: 2px 10px;

      &-icon {
        display: flex;
        align-items: center;
      }
    }

    &-more-tag {
      margin: 0;
      cursor: default;
      border-radius: 12px;
      border: 1px solid transparent;
      font-size: 14px;
      line-height: 22px;
      padding: 2px 10px;
    }

    &-empty {
      color: #667085;
      font-size: 16px;
      font-weight: 400;
      line-height: 24px;
    }
  }
}

@keyframes pisell-multiple-select-fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
