/* DoIT Lions - player signup form.
   Leans on system.css for colour, type and the shell. Only form furniture
   lives here, because the club has one design system and this is not a
   second one. */

/* The hidden attribute has to beat the display rules below. Without this,
   .field { display:flex } wins on specificity and the conditional fields
   (ex-pro detail, the whole ID fieldset) render anyway. */
[hidden] { display: none !important; }

.join { max-width: 640px; margin: 0 auto; }

.join__intro {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 6px;
}
.join__intro + .join__intro { margin-top: 10px; }

/* ── Fieldsets read as sections, not as boxes ───────────────── */
.jf {
  border: 0;
  padding: 0;
  margin: 26px 0 0;
}
.jf__legend {
  font-family: var(--t-meta);
  font-size: 19px;
  letter-spacing: 0.08em;
  color: var(--ink);
  padding: 0;
  margin: 0 0 3px;
}
.jf__hint {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 14px;
}

.jf__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.jf__grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jf__grid > .field--wide { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .jf__grid, .jf__grid--three { grid-template-columns: 1fr; }
}

/* ── Fields ─────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.field__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field__label .opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-4);
}

.field input[type="text"],
.field input[type="date"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--t-body);
  font-size: 16px; /* 16px or iOS zooms on focus */
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 76px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(184, 148, 54, 0.18);
}

.field__note { font-size: 12px; color: var(--ink-4); line-height: 1.5; }

.field__error {
  font-size: 12.5px;
  color: var(--loss);
  font-weight: 600;
  display: none;
}
.field.is-error input,
.field.is-error select,
.field.is-error textarea { border-color: var(--loss); }
.field.is-error .field__error { display: block; }

/* ── File inputs ────────────────────────────────────────────── */
.filefield {
  border: 1px dashed var(--rule);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.filefield input[type="file"] { font-size: 13px; color: var(--ink-2); flex: 1 1 200px; min-width: 0; }
.filefield__preview {
  width: 54px; height: 54px; flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yellow);
  display: none;
}
.filefield__preview.is-shown { display: block; }

/* ── Consent block. Deliberately plain and readable. ─────────── */
.consent {
  background: var(--paper-2);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
}
.check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 9px 0;
}
.check + .check { border-top: 1px solid var(--rule-2); }
.check input[type="checkbox"] {
  width: 18px; height: 18px; margin: 2px 0 0;
  accent-color: var(--yellow);
}
.check__text { font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.check__text strong { color: var(--ink); font-weight: 600; }
.check.is-error .check__text strong { color: var(--loss); }

/* ── Actions ────────────────────────────────────────────────── */
.join__actions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-primary {
  font-family: var(--t-meta);
  font-size: 19px;
  letter-spacing: 0.08em;
  background: var(--yellow);
  color: var(--yellow-ink);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 13px 30px;
  cursor: pointer;
  transition: transform .15s var(--ease), filter .15s var(--ease);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }

.join__status { font-size: 13.5px; color: var(--ink-3); }
.join__status.is-bad { color: var(--loss); font-weight: 600; }

/* ── Closed / success states ────────────────────────────────── */
.join__panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.join__panel h2 {
  font-family: var(--t-meta);
  font-size: 26px;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
  color: var(--ink);
}
.join__panel p { color: var(--ink-2); font-size: 15px; line-height: 1.65; margin: 0 0 10px; }
.join__ref {
  font-family: var(--t-mono);
  font-size: 15px;
  background: var(--canvas-2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: inline-block;
  color: var(--ink);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
