@x-gap: 10px;
@y-gap: 8px;

.lc-field {
  // head
  .lc-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .lc-field-title {
      display: flex;
      align-items: center;
      .lc-valuestate {
        height: 6px;
        width: 6px;
        min-width: 6px;
        border-radius: 100%;
        margin-right: 2px;
        pointer-events: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: white;
        > svg {
          display: none;
        }
        &.valuestate-multiple {
          background-color: rgb(232, 145, 83);
          pointer-events: auto;
          &:hover {
            background-color: rgb(223, 139, 30);
            cursor: pointer;
            transform: scale(2);
            transform-origin: center;
            > svg {
              display: block;
            }
          }
        }
        &.valuestate-isset {
          background-color: rgba(124, 177, 238, 0.6);
          pointer-events: auto;
          &:hover {
            background-color: rgb(45, 126, 219);
            cursor: pointer;
            transform: scale(2);
            transform-origin: center;
            > svg {
              display: block;
            }
          }
        }
        &.valuestate-required {
          background-color: rgb(250, 82, 76);
          pointer-events: auto;
          &:hover {
            background-color: rgb(224, 46, 40);
          }
        }
      }
    }
    .lc-field-icon {
      // margin-right: @x-gap;
      transform-origin: center;
      transition: transform 0.1s;
    }
  }

  &.lc-plain-field {
    // for top-level style
    // padding: 8px 10px;
    > .lc-field-body {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
    }
  }

  &.lc-inline-field {
    display: flex;
    align-items: center;
    // for top-level style
    padding: 16px;
    &:first-child{
      padding-top: 16px;
    }
    &:last-child{
      padding-bottom: 16px;
    }
    &+.lc-inline-field{
      padding-top: 0;
    }

    > .lc-field-head {
      width: 70px;
      margin-right: 1px;
      .lc-title-label {
        width: 70px;
        word-break: break-all;
      }
    }
    > .lc-field-body {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
    }
  }

  &.lc-block-field, &.lc-accordion-field {
    display: block;
    &:not(:first-child) {
      border-top: 1px solid var(--color-line-normal);
    }
    > .lc-field-head {
      // padding-left: @x-gap;
      height: 32px;
      display: flex;
      align-items: center;
      font-weight: 500;
      // background: var(--color-block-background-shallow, rgba(31,56,88,.06));
      // border-bottom: 1px solid var(--color-line-normal);
      // color: var(--color-title);
      padding: 0 16px 0 10px;
      background-color: #F7F9FC;
      color: #8F9BB3;
      user-select: none;
    }

    > .lc-field-body {
      // padding: @y-gap @x-gap/2;
      padding: 16px;
      .lc-inline-field{
        margin-bottom: 16px;
        &:last-child{
          margin-bottom: 0;
        }
      }
    }

    + .lc-inline-field {
      border-top: 1px solid var(--color-line-normal);
    }
  }

  .lc-setter-actions {
    display: flex;
    align-items: center;
  }

  &.lc-block-field {
    position: relative;
    >.lc-field-body>.lc-block-setter>.lc-setter-actions {
      position: absolute;
      right: 10px;
      top: 0;
      height: 32px;
    }
  }

  &.lc-accordion-field {
    position: relative;
    // collapsed
    &:last-child.lc-field-is-collapsed{
      border-bottom: 1px solid var(--color-line-normal);
    }
    &.lc-field-is-collapsed {
      > .lc-field-head .lc-field-icon {
        transform: rotate(180deg);
      }
      > .lc-field-body {
        display: none;
      }
    }

    // 邻近的保持上下距离
    + .lc-field {
      // margin-top: @y-gap;
    }
  }

  // 2rd level reset
  .lc-field-body {
    .lc-inline-field {
      // padding: @y-gap @x-gap/2 0 @x-gap/2;
      padding: 0;
      &:first-child {
        padding-top: 0;
      }
      + .lc-accordion-field, +.lc-block-field {
        margin-top: @y-gap;
      }
    }

    .lc-field {
      border-top: none !important;
    }

    .lc-accordion-field, .lc-block-field {
      > .lc-field-head {
        padding-left: @x-gap/2;
        background: var(--color-block-background-light);
        border-bottom-color: var(--color-line-light, rgba(31, 56, 88, .1));
        > .lc-field-icon {
          // margin-right: @x-gap/2;
          margin-right: 0;
        }
      }
    }

    // 3rd level field title width should short
    .lc-field-body .lc-inline-field {
      > .lc-field-head {
        width: 50px;
        .lc-title-label {
          width: 50px;
        }
      }
    }
    >.lc-block-setter {
      flex: 1;
    }
  }
}
