/* @see core/themes/olivero/css/components/form.css */

.fieldset-legend.form-required::after,
.form-label.form-required::after,
.form-check-label.form-required::after,
.required-mark::after {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.3em;
  margin-left: 0.3em;
  content: "";
  vertical-align: text-top;
  /* Use a background image to prevent screen readers from announcing the text. */
  background-image: url("data:image/svg+xml,%3Csvg height='16' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m0 7.562 1.114-3.438c2.565.906 4.43 1.688 5.59 2.35-.306-2.921-.467-4.93-.484-6.027h3.511c-.05 1.597-.234 3.6-.558 6.003 1.664-.838 3.566-1.613 5.714-2.325l1.113 3.437c-2.05.678-4.06 1.131-6.028 1.356.984.856 2.372 2.381 4.166 4.575l-2.906 2.059c-.935-1.274-2.041-3.009-3.316-5.206-1.194 2.275-2.244 4.013-3.147 5.206l-2.856-2.059c1.872-2.307 3.211-3.832 4.017-4.575-2.081-.402-4.058-.856-5.93-1.356' fill='%23dc3545'/%3E%3C/svg%3E%0A");
  background-repeat: no-repeat;
  background-size: 0.5rem 0.5rem;
}

@media screen and (-ms-high-contrast: active) {
  .fieldset-legend.form-required::after,
  .form-label.form-required::after,
  .form-check-label.form-required::after,
  .required-mark::after {
    background-image: url("data:image/svg+xml,%3Csvg height='16' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m0 7.562 1.114-3.438c2.565.906 4.43 1.688 5.59 2.35-.306-2.921-.467-4.93-.484-6.027h3.511c-.05 1.597-.234 3.6-.558 6.003 1.664-.838 3.566-1.613 5.714-2.325l1.113 3.437c-2.05.678-4.06 1.131-6.028 1.356.984.856 2.372 2.381 4.166 4.575l-2.906 2.059c-.935-1.274-2.041-3.009-3.316-5.206-1.194 2.275-2.244 4.013-3.147 5.206l-2.856-2.059c1.872-2.307 3.211-3.832 4.017-4.575-2.081-.402-4.058-.856-5.93-1.356' fill='%23ffffff'/%3E%3C/svg%3E%0A");
  }
}

/* Bootstrap 5.3 bug workaround. */
body
  .form-floating
  > .form-control:not(:-moz-placeholder-shown)
  ~ label::after {
  position: unset;
  background-color: unset;
}
body .form-floating > .form-control:focus ~ label::after,
body .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
body .form-floating > .form-control-plaintext ~ label::after,
body .form-floating > .form-select ~ label::after {
  position: unset;
  background-color: unset;
}
