/* Preference chooser — a ranked select row (1st/2nd/3rd programme choice). */

.c-choice {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surf);
  margin-block-end: 10px;
}
.c-choice:last-child { margin-block-end: 0; }

.c-choice__rank {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--teal);
  color: var(--on-accent);
  display: grid; place-items: center;
  font-weight: var(--fw-black); font-size: 13px;
}
.c-choice--optional .c-choice__rank { background: var(--ink-4); }

.c-choice__select { flex: 1; min-width: 0; }
.c-choice__select select { width: 100%; }

/* Paired variant — a college select + its dependent programme select. */
.c-choice--pair { align-items: flex-start; }
.c-choice--pair .c-choice__rank { margin-block-start: 18px; }
.c-choice__fields {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
/* Stacked variant — college above combination instead of side by side. Was an
 * inline style="display:block" on every preference row; it is a layout decision
 * about this component, so it lives here. Block layout ignores the grid `gap`,
 * hence the explicit spacing between the stacked fields. */
.c-choice__fields--stack { display: block; }
.c-choice__fields--stack > .c-choice__field { margin-block-end: 10px; }
.c-choice__fields--stack > .c-choice__field:last-child { margin-block-end: 0; }

.c-choice__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.c-choice__cap { font-size: 12px; font-weight: var(--fw-label); color: var(--ink-2); }
.c-choice__field select { width: 100%; }

/* Per-preference flags — reuse the shared .c-check for the checkbox styling;
 * this modifier only positions the row full-width under the selects. */
.c-choice__sibling {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .c-choice__fields { grid-template-columns: 1fr; }
  .c-choice--pair .c-choice__rank { margin-block-start: 0; }
}
