@use '../vendor/variables' as vv;

/* Forms */
.required::after {
  color: vv.$danger;
  content: '*';
  font-size: 1.167rem;
  padding-left: 4px;
}

.form-footer {
  display: flex;
  width: 100%;
}

.form-control,
.form-select {
  display: table-cell;

  &:focus {
    border-color: rgba(vv.$primary, 0.8);
    box-shadow: 0 0 3px 2px rgba(vv.$primary, 0.5);
    outline: 0;
  }
}

.custom-checkbox {
  @extend .form-check;
  padding-top: 7px;

  .custom-control-input {
    @extend .form-check-input;
  }

  .custom-control-label {
    @extend .form-check-label;
  }
}

.custom-radio {
  @extend .form-check;
  padding-top: 5px;
}

.cd-col-form {
  @extend .col-12;
  @extend .col-lg-8;
  @extend .col-xl-6;
}

.cd-col-form-label {
  @extend .col-form-label;
  @extend .col-sm-4;
  @extend .col-md-4;
  @extend .col-lg-3;
}

.cd-col-form-input {
  @extend .col-sm-8;
  @extend .col-md-8;
  @extend .col-lg-9;
}

.cd-col-form-offset {
  @extend .offset-sm-4;
  @extend .offset-lg-3;
  @extend .cd-col-form-input;
}

cd-modal {
  .modal {
    /* stylelint-disable */
    background-color: rgba(0, 0, 0, 0.4);
    /* stylelint-enable */
    display: block;
  }

  .modal-dialog {
    max-width: 70vh;
  }

  .cd-col-form-label {
    @extend .col-lg-4;
  }

  .cd-col-form-input {
    @extend .col-lg-8;
  }

  .cd-col-form-offset {
    @extend .offset-lg-4;
  }
}

.invalid-feedback {
  display: block;
}

.form-group {
  @extend .mb-3;
}

.custom-control-label {
  @extend .form-label;
}
