.sg-actions-categories {
  box-sizing: border-box;
  * {
    box-sizing: border-box;
  }

  .sg-action-category-title {
    line-height: 20px;
    height: 40px;
    font-size: 1em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 10px 1em;
    background: rgba( 0, 0, 0, 0.05 );
    display: block;
    width: 100%;
    cursor: pointer;
    position: relative;

    &:after {
      content: '';
      position: absolute;
      right: 10px;
      top: 15px;
      width: 0;
      height: 0;
      display: block;
      border: 6px solid transparent;
      border-top-color: $purple;
    }
  }

  .sg-actions {
    display:none;
    padding: 1em;

    li {
      position: relative;
      display: block;
      padding: 15px 15px 15px 60px;
      text-align: left;
      box-shadow: 0px 2px 2px rgba( 0, 0, 0, 0.15 );
      cursor: pointer;
      margin-bottom: 1em;

      .sg-action-icon {
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: $purple;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 15px;
        margin: auto;
      }

      .button {
        width: 100%;
        white-space: normal;
      }

    }
  }

  .sg-action-category.active {
    .sg-action-category-title {
      &:after {
        border-top-color: transparent;
        border-bottom-color: $purple;
        top: 10px;
      }
    }
    .sg-actions { display: block; }
  }
}

.sg-admin-action {

  &:not(:last-child) {
    margin-bottom: 20px;
  }

  .sg-admin-action-title {
    height: 40px;
    line-height: 36px;
    border-radius: 3px;
    background: white;
    padding-right: 40px;
    padding-left: 1em;
    font-weight: 600;
    border: 2px solid $purple;
    position: relative;
    cursor: pointer;
    margin: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;

    &:after {
      content: '';
      position: absolute;
      width: 0;
      height: 0;
      border: 4px solid transparent;
      top: 17px;
      right: 10px;
      border-top-color: $purple;
    }
  }

  .sg-admin-form {
    display: none;

    .sg-form-field {
      flex-wrap: wrap;

      label {
        width: 150px;
      }

      .sg-action-input-container {
        width: calc(100% - 150px);
      }

      .select2-container {
        width: 100% !important;
      }

      &.sg-form-field-mandatory_specific_actions {
        label {
          vertical-align: top;
        }
      }

      .sg-select-specific-mandatory-actions {
        label {
          width: 100%;
          display: block;

          &:not(:last-child) {
            margin-bottom: 10px;
          }
        }
      }
    }

    .sg-multioption-input {
      display: flex;

      .button {
        width: 30px;
        margin-left: 10px;
      }
    }
  }

  &:not(.active) {
    &.sg-admin-action-with-errors {
      .sg-admin-action-title {
        color: $red;
      }
    }
  }

  &.active {
    box-shadow: 0px 2px 5px rgba( 0, 0, 0, 0.15 );

    .sg-admin-form {
      display: block;
      border: 1px solid $purple;
    }

    .sg-admin-action-title {
      background: $purple;
      color: white;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;

      &:after {
        border-top-color: transparent;
        border-bottom-color: white;
        top: auto;
        bottom: 15px;
      }
    }
  }
}