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

    &:hover {
      background: transparent;
    }

    td {
      padding-block-end: 0;
    }

    .form-item {
      margin-block: 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-block: 0;
    margin-inline: calc(var(--gin-spacing-m) * -1);
  }
}

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

  .fieldset__wrapper {
    margin-block-end: 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 {
      inset-inline-start: var(--gin-spacing-xs);
    }

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

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