/* The "Join the race" page (js/views/join.js): how it works beside the form.
   The fields borrow the Professions tab's inputs (.pf-search), the send
   button the import dialog's gold button. No opacity on a disabled form:
   its words stay as readable as the rest. */

.jn-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--gap);
  align-items: start;
}

@media (max-width: 900px) {
  .jn-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.jn-steps {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  counter-reset: jn-step;
}

.jn-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-height: 2rem;
  padding-left: 2.7rem;
}

.jn-step::before {
  content: counter(jn-step);
  counter-increment: jn-step;
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: #0d0a12;
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 800;
  color: var(--text-gold-bright);
}

.jn-step-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-gold-bright);
}

.jn-step-text {
  font-size: var(--fs-text);
  color: var(--text);
}

.jn-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jn-fieldset {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.jn-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.jn-label {
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-gold);
}

.jn-input {
  font-size: var(--fs-text);
}

.jn-input[aria-invalid="true"] {
  border-color: var(--bad);
  box-shadow: 0 0 0 1px var(--bad);
}

.jn-fieldset:disabled .jn-input {
  border-style: dashed;
  cursor: not-allowed;
}

.jn-note {
  min-height: 5.2rem;
  line-height: 1.45;
  resize: vertical;
}

.jn-help {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.jn-counter {
  white-space: nowrap;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.jn-counter-full {
  font-weight: 700;
  color: var(--text-warn);
}

.jn-error {
  padding-left: 0.6rem;
  border-left: 3px solid var(--bad);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text-bad);
}

.jn-turnstile {
  min-height: 65px;
  max-width: 100%;
  overflow: hidden;
}

.jn-fieldset:disabled .jn-check-field {
  display: none;
}

.jn-actions {
  display: flex;
}

.jn-send {
  min-width: 11rem;
}

.jn-send:disabled {
  cursor: not-allowed;
  filter: saturate(0.4);
}

.jn-send:focus-visible,
.jn-input:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

.jn-status {
  padding: 0.6rem 0.85rem;
  border-left: 3px solid var(--gold-dim);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--tint-row);
  font-size: var(--fs-text);
  color: var(--text);
}

.jn-status:empty {
  display: none;
}

.jn-status-ok {
  border-left-color: var(--ok);
  color: var(--text-ok);
}

.jn-status-bad {
  border-left-color: var(--bad);
  color: var(--text-bad);
}
