/* The team step after registering in a team division (27-20). Tokens from app.css, light only. A chosen card shows
   its filled radio and a thicker border, never color alone. */
.team-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.team-step__heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-22);
  color: var(--ink);
}

.team-step__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.team-step__choices {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.team-step__choice {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 2.75rem;
  padding: var(--space-sm) var(--space-md);
  background: var(--paper);
  border: 1px solid var(--control);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
}

.team-step__choice:hover {
  background: var(--hover);
}

.team-step__choice:has(> input:checked) {
  background: var(--sel);
  border-width: 3px;
  padding: calc(var(--space-sm) - 2px) calc(var(--space-md) - 2px);
}

.team-step__choice:has(> input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.team-step__choice {
  position: relative;
  /* The legacy label rule sets small capitals; an option reads as a sentence. */
  text-transform: none;
  letter-spacing: normal;
}

/* The radio stretches over the whole card so the target is the card (44px or more); the circle is drawn. */
.team-step__radio {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.team-step__choice::before {
  content: "";
  box-sizing: border-box;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--control);
  border-radius: 50%;
  background: var(--paper);
}

.team-step__choice:has(> input:checked)::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 0.3rem var(--paper);
}

.team-step__choice-label {
  font-weight: 500;
}

.team-step__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

.team-step__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-self: stretch;
  max-width: 24rem;
}

.team-step__label {
  font-size: var(--fs-15);
  font-weight: 500;
  color: var(--ink);
}

.team-step__input {
  min-height: 2.75rem;
  padding: 0 var(--space-md);
  background: var(--paper);
  border: 1px solid var(--control);
  border-radius: var(--r-ctl);
  color: var(--ink);
  font: inherit;
}

.team-step__input--code {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.team-step__input[aria-invalid='true'] {
  border-color: var(--error);
  border-width: 2px;
}

.team-step__error {
  margin: 0;
  min-height: 0;
  font-size: var(--fs-15);
  color: var(--error);
}

.team-step__error:empty {
  display: none;
}

.team-step__submit {
  min-height: 2.75rem;
  min-width: 2.75rem;
}

.team-step__team,
.team-step__free {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.team-step__team-name {
  font-weight: 600;
}

.team-step__team > svg,
.team-step__free > svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
}

.team-step__code-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
}

.team-step__code-label {
  font-size: var(--fs-15);
  color: var(--muted);
}

.team-step__code {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--ink);
}

.team-step__reason {
  margin: 0;
  color: var(--ink);
}

.team-step :focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (min-width: 1024px) {
  .team-step__choices {
    flex-direction: row;
  }

  .team-step__choice {
    flex: 1 1 0;
  }
}
