.ief-entity-table {
  .ief-row-form {
    border: 1px solid var(--gin-border-color);

    &:hover {
      background: transparent;
    }

    td {
      padding-bottom: 0;
    }

    .form-item {
      margin-top: var(--gin-spacing-density-s);
      margin-bottom: var(--gin-spacing-density-s);
    }
  }
}

.ief-form {
  > .form-wrapper > .form-wrapper:last-of-type {
    background: var(--gin-bg-layer2);
    padding: 0 var(--gin-spacing-m);
    margin: 0 calc(var(--gin-spacing-m) * -1);
  }
}

.ief-form.ief-form-bottom {
  border: 1px solid var(--gin-border-color);

  .fieldset__wrapper {
    margin-bottom: 0;
  }
}

/* Fixes for 'Inline entity form - Complex' widgets inside paragraphs */
.paragraphs-tabs-wrapper .field-multiple-table {
  .ief-entity-table .draggable {
    display: table-row;

    /* The .draggable padding is not applied because of display: table-row */
    &.drag-previous > .tabledrag-cell::before {
      left: var(--gin-spacing-xs);
    }

    .tabledrag-cell-content__item {
      padding-left: var(--gin-spacing-s);
    }
  }

  .ief-entity-operations {
    display: flex;
  }
}
