form {
  .form-label {
    margin-bottom: 0;
    opacity: 0.8;

    &.required::after {
      color: var(--bs-red);
      content: " \2a";
    }
  }

  .input-group {
    > .input-group-text:has(~ .form-control),
    > .input-group-text:has(~ .form-select) {
      border-radius: 0;
    }

    > .input-group-text:first-child:has(~ .form-control),
    > .input-group-text:first-child:has(~ .form-select) {
      border-top-left-radius: var(--bs-border-radius);
      border-bottom-left-radius: var(--bs-border-radius);
    }

    > .form-control ~ .input-group-text,
    > .form-select ~ .input-group-text {
      border-radius: 0;
    }

    > .input-group-text:last-child {
      border-top-right-radius: var(--bs-border-radius);
      border-bottom-right-radius: var(--bs-border-radius);
    }

    textarea.form-control {
      field-sizing: content;
      word-break: break-all;
    }

    .form-control.is-invalid:not(:last-child) {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }

    .form-control.is-invalid:not(:first-child) {
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }

    .form-control.is-invalid {
      background-position: right calc(.375em + .1875rem) center !important;
      background-size: calc(.75em + .375rem) calc(.75em + .375rem) !important;
    }

    .form-check {
      &.disabled {
        pointer-events: none;
        cursor: default;
      }
    }
  }

  .invalid-feedback {
    display: block;
  }

  &.form-default {
    padding: 1rem 1rem 0 1rem;

    background-color: var(--bs-form-bg);

    border-radius: var(--bs-border-radius);
    border: 1px solid var(--bs-border-color);
  }

  &.form-search {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
  }

  &.form-modal {
    width: 100%;
  }

  &.form-single {
    .row [class*="col-"] {
      margin-bottom: 0;

      .form-control {
        background-color: var(--bs-form-bg);
      }
    }
  }
}