/* Controles de elección visibles sobre fondos claros y oscuros. */
:root {
  --choice-border: #684c55;
  --choice-bg: #fff;
  --choice-active: #9d2449;
  --choice-focus: rgba(157, 36, 73, .24);
}

html body input[type="checkbox"]:not(.btn-check),
html body input[type="radio"]:not(.btn-check) {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-grid !important;
  place-content: center;
  float: none !important;
  flex: 0 0 1.25rem !important;
  width: 1.25rem !important;
  min-width: 1.25rem !important;
  height: 1.25rem !important;
  min-height: 1.25rem !important;
  margin: .08rem .4rem .08rem 0 !important;
  padding: 0 !important;
  border: 2px solid var(--choice-border) !important;
  border-radius: .28rem !important;
  color: #fff;
  background: var(--choice-bg) !important;
  background-image: none !important;
  box-shadow: 0 1px 2px rgba(45, 22, 28, .12) !important;
  vertical-align: middle;
  cursor: pointer;
  transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
}

html body input[type="radio"]:not(.btn-check) {
  border-radius: 50% !important;
}

html body input[type="checkbox"]:not(.btn-check)::before {
  width: .62rem;
  height: .34rem;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: translateY(-.08rem) rotate(-45deg) scale(0);
  transform-origin: center;
  transition: transform .1s ease-in-out;
}

html body input[type="radio"]:not(.btn-check)::before {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
  transform: scale(0);
  transition: transform .1s ease-in-out;
}

html body input[type="checkbox"]:not(.btn-check):checked,
html body input[type="checkbox"]:not(.btn-check):indeterminate,
html body input[type="radio"]:not(.btn-check):checked {
  border-color: var(--choice-active) !important;
  background: var(--choice-active) !important;
}

html body input[type="checkbox"]:not(.btn-check):checked::before,
html body input[type="radio"]:not(.btn-check):checked::before {
  transform: translateY(-.08rem) rotate(-45deg) scale(1);
}

html body input[type="radio"]:not(.btn-check):checked::before {
  transform: scale(1);
}

html body input[type="checkbox"]:not(.btn-check):indeterminate::before {
  width: .62rem;
  height: 0;
  border: 0;
  border-top: 2px solid currentColor;
  transform: scale(1);
}

html body input[type="checkbox"]:not(.btn-check):focus-visible,
html body input[type="radio"]:not(.btn-check):focus-visible {
  outline: 3px solid var(--choice-focus) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--choice-active) !important;
}

html body input[type="checkbox"]:not(.btn-check):disabled,
html body input[type="radio"]:not(.btn-check):disabled {
  cursor: not-allowed;
  opacity: .58;
}

html[data-theme="dark"] {
  --choice-border: #dfb4c2;
  --choice-bg: #201a1c;
  --choice-active: #d45a80;
  --choice-focus: rgba(232, 168, 189, .3);
}

@media (prefers-contrast: more) {
  html body input[type="checkbox"]:not(.btn-check),
  html body input[type="radio"]:not(.btn-check) {
    border-width: 3px !important;
  }
}
