.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;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 660px;

    li {
      display: block;
      width: 200px;
      padding: 0.5em;
      text-align: center;
      box-shadow: 0px 2px 2px rgba( 0, 0, 0, 0.15 );
      cursor: pointer;
      margin-bottom: 1em;

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

      .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: flex; }
  }
}

.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);
      }
    }

    .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;
      }
    }
  }
}