@use '../params/index' as *;

@mixin border-error() {
  .x-border-error {
    position: absolute;
    height: 0.75rem;
    width: 0.75rem;
    z-index: 10;
    @include border-placement(top, left);
    @include border-placement(top, right);
    @include border-placement(bottom, left);
    @include border-placement(bottom, right);
  }
}

@mixin border-error-focus() {
  .x-border-error {
    border-width: $x-border-width !important;
  }
}

@mixin border-placement($first, $second) {
  &.x-#{$first}-#{$second} {
    border-#{$first}-#{$second}-radius: $x-border-radius;
    #{$first}: 0;
    #{$second}: 0;
    border-#{$first}: $x-border-width solid $x-danger;
    border-#{$second}: $x-border-width solid $x-danger;
  }
}
