/* Year-group picker: a six-up radio group styled as chunky tappable pills.
   Used on the parent-facing child form. The hidden radios stay as the
   form's source of truth, so the pills work without JS — the Stimulus
   child-form controller just toggles `checked` in response to DOB
   changes. Keyboard users can still tab into the radios and arrow-key
   between them. */

.year-pills {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 479px) {
  .year-pills {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.year-pill {
  position: relative;
  display: block;
  cursor: pointer;
}

.year-pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.year-pill-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.65rem 0.25rem;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  font-weight: 700;
  color: #475569;
  transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s, transform 0.08s;
  text-align: center;
  user-select: none;
}

.year-pill:hover .year-pill-label {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1D4ED8;
}

.year-pill input:focus-visible + .year-pill-label {
  outline: 2px solid #1565C0;
  outline-offset: 2px;
}

.year-pill input:checked + .year-pill-label {
  background: linear-gradient(135deg, #4389DD 0%, #1565C0 100%);
  border-color: #1565C0;
  color: #FFFFFF;
  box-shadow: 0 4px 12px -2px rgba(21, 101, 192, 0.35);
  transform: translateY(-1px);
}

.year-pill:active .year-pill-label {
  transform: translateY(0);
}

.year-pill-word {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  line-height: 1;
}

.year-pill input:checked + .year-pill-label .year-pill-word {
  opacity: 0.85;
}

.year-pill-number {
  font-size: 1.25rem;
  line-height: 1;
}
