.add-on-select {
  position: relative;
  display: block;
  height: auto;
  margin-top: 4px;

  .add-on-head {
    padding: 0 16px 20px 16px;
    border-bottom: 1px solid $color-border;
  }

  .yml-addon-group {
    border-bottom: 1px solid $color-border;
  }

  .addon-group-head {
    padding: 12px 16px;
    border-bottom: 1px solid $color-border;
    cursor: pointer;

    .head-icon {
      display: inline-block;
      width: 16px;
      height: 16px;
      margin-right: 8px;
      color: $color-dark-4;
      transform: translateY(4px);
    }

    .group-name {
      color: $color-dark-8;
      font-size: 14px;
      line-height: 22px;
    }
  }

  .empty-content {
    border-bottom: none;
  }

  .dice-yml-add-on {
    position: relative;
    display: block;
    height: 99px;
    padding: 16px;
    cursor: pointer;

    .add-on-icon,
    .add-on-icon-container {
      display: inline-block;
      vertical-align: middle;
      border-radius: 100%;
    }

    .add-on-icon-container {
      width: 64px;
      height: 64px;
      margin-right: 12px;
      background: $white;
      border: 1px solid $color-border;
    }

    .add-on-icon {
      display: block;
      width: 56px;
      height: 56px;
      margin: 4px auto;
      background-repeat: repeat;
      background-position: center;
      background-size: contain;
    }

    .add-on-info {
      display: inline-block;
      width: calc(100% - 76px);
      height: 100%;
      overflow: hidden;
      vertical-align: middle;

      .add-on-info-name {
        margin-bottom: 4px;
        color: $color-dark-8;
        font-size: 14px;
        line-height: 22px;
        letter-spacing: 0;

        .display-name {
          display: inline-block;
          width: auto;
          max-width: calc(100% - 64px);
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          vertical-align: middle;
        }

        .reselect {
          display: inline-block;
          margin-left: 8px;
          color: $color-primary;
          font-size: 14px;
        }
      }

      .add-on-info-description {
        display: inline-block;
        width: 100%;
        height: 40px;
        overflow: hidden;
        color: $color-dark-6;
        font-size: 12px;
        line-height: 20px;
        letter-spacing: 0;
        white-space: normal;
        text-overflow: ellipsis;
      }
    }

    .add-on-border-bottom {
      position: absolute;
      bottom: 0;
      left: 0;
      display: block;
      width: calc(100% - 32px);
      height: 1px;
      margin: 0 16px;
      background: $color-dark-1;
    }
  }
}

.selected-addon {
  height: 100%;
  padding: 0 16px;

  .dice-yml-add-on {
    height: auto;
    padding: 0;
  }
}

.dice-yml-add-on:last-child {
  .add-on-border-bottom {
    display: none;
  }
}

.add-on-form-btn-group {
  position: absolute;
  right: 16px;
  bottom: 0;
  text-align: right;
}

.add-on-form {
  margin-top: 16px;
}

.add-on-select-label {
  margin-bottom: 4px;
  color: $color-dark-4;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: 0;
}

.add-on-select-label-required {
  color: $red;
}

.addon-error-tag {
  margin-bottom: 12px;
}
