/* Selectores múltiples: cada opción es una unidad visual y táctil. */
.stack-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.stack-form fieldset legend {
  margin: 0 0 5px;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.stack-form fieldset .helptext {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

div.choice-card-list {
  display: grid;
  width: 100%;
  gap: 9px;
}

div.choice-card-list > div {
  min-width: 0;
}

.stack-form div.choice-card-list label {
  display: grid;
  min-height: 54px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.stack-form div.choice-card-list label:hover {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  background: color-mix(in srgb, var(--brand-soft) 40%, var(--paper));
}

.stack-form div.choice-card-list input[type="checkbox"] {
  appearance: none;
  display: grid;
  width: 24px;
  height: 24px;
  min-height: 24px;
  place-content: center;
  margin: 0;
  padding: 0;
  border: 2px solid #94a8a5;
  border-radius: 7px;
  background: var(--paper);
  cursor: pointer;
}

.stack-form div.choice-card-list input[type="checkbox"]::before {
  width: 10px;
  height: 6px;
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  content: "";
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform .12s ease;
}

.stack-form div.choice-card-list input[type="checkbox"]:checked {
  border-color: var(--brand);
  background: var(--brand);
}

.stack-form div.choice-card-list input[type="checkbox"]:checked::before {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.stack-form div.choice-card-list label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 4px 0 0 var(--brand);
}

.stack-form div.choice-card-list label:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent);
  outline-offset: 2px;
}

div.choice-card-list:empty::after {
  display: block;
  padding: 13px 14px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--canvas);
  content: "No hay opciones disponibles";
  font-size: 13px;
}

html[data-theme="dark"] .stack-form div.choice-card-list label {
  border-color: var(--line);
  background: var(--paper);
}

html[data-theme="dark"] .stack-form div.choice-card-list label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

html[data-theme="dark"] .stack-form div.choice-card-list input[type="checkbox"] {
  border-color: #718b87;
  background: var(--canvas);
}

html[data-theme="dark"] .stack-form div.choice-card-list input[type="checkbox"]:checked {
  border-color: var(--brand);
  background: var(--brand);
}

@media (max-width: 680px) {
  .stack-form div.choice-card-list label {
    min-height: 58px;
    padding: 13px;
    font-size: 13px;
  }
}
