@import '../../scss/styles.scss';

.field-type.relationship {
  position: relative;
}

.relationship {
  &__wrap {
    display: flex;
    width: 100%;

    div.react-select {
      width: 100%;
      min-width: 0;
    }
  }

  &__error-loading {
    border: 1px solid var(--theme-error-500);
    min-height: base(2);
    padding: base(0.5) base(0.75);
    background-color: var(--theme-error-500);
    color: var(--theme-elevation-0);
  }
}

html[data-theme='light'] {
  .relationship {
    &.error {
      > .relationship__wrap {
        .rs__control {
          @include lightInputError;
        }
      }

      button {
        @include lightInputError;
      }
    }
  }
}

html[data-theme='dark'] {
  .relationship {
    &.error {
      > .relationship__wrap {
        .rs__control {
          @include darkInputError;
        }
      }

      button {
        @include darkInputError;
      }
    }
  }
}
