.fr-select-rich.fr-fieldset {
  margin: 0 0 1rem;
}

.fr-select-rich .fr-select {
  text-align: left;
}

.fr-select-rich__tags {
  display: flex;
  align-items: center;
}

.fr-select-rich__tags .fr-tags-group {
  display: inline-flex;
}

.fr-select-rich__tags .fr-btn {
  margin: 0 .5rem .5rem;
}

.fr-select-rich .fr-collapse.fr-menu {
  margin: 0;
  pointer-events: all;
  transition: none;
  max-height: 30vh;
  min-width: max(100%, 25rem);
  max-width: min(100%, 25rem);
  overflow: hidden auto;
  background-color: var(--background-default-grey);
  border: 1px solid var(--border-default-grey);
  margin-block-start: 0;
}

.fr-select-rich .fr-collapse.fr-menu::before {
  transition: none;
}

.fr-select-rich__item {
  border-bottom: 2px solid var(--border-default-grey);
}

.fr-select-rich__item:hover {
  background-color: var(--hover);
}

.fr-select-rich__item:last-of-type {
  border-bottom: none;
}

.fr-select-rich__option {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  user-select: none;
}

.fr-select-rich .fr-checkbox-group input[type="checkbox"] + label::before {
  margin-top: .5rem;
}

.fr-select-rich__option:has(input:focus) {
  background-color: var(--hover);
}

.fr-select-rich.fr-select-group.fr-select-group--error legend {
  color: var(--text-default-error);
}

.fr-select-rich.fr-select-group.fr-select-group--error label.fr-select-rich__option {
  color: unset;
}

.fr-select-rich.fr-input-group.fr-select-group--error input.fr-input[type=search] {
  box-shadow: unset;
}

.fr-select-rich__error {
  width: 100%;
}
