/* The "Create your account" section. Matches the app's sign-up screen: cards, rounded fields, avatars. */
.signup {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  align-items: start;
  padding-top: 110px;
  scroll-margin-top: 22px;
}

.signup-text p {
  margin-top: 16px;
}

.signup-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}

.field {
  margin-bottom: 18px;
}

.field label,
.avatar-choice legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--fieldBorder);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.field input:focus-visible,
.show-password:focus-visible,
.avatar-option:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.field input[aria-invalid='true'] {
  border-color: var(--error);
}

/* Long "Show password" labels (German) move the button under the field instead of squeezing it. */
.password-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.password-row input {
  flex: 1 1 180px;
  width: auto;
}

.show-password {
  flex-shrink: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--pink);
  color: var(--accent);
  font:
    600 15px 'DM Sans',
    system-ui,
    sans-serif;
  cursor: pointer;
}

.hint,
.problem,
.optional {
  font-size: 15px;
  margin: 6px 0 0;
}

.hint,
.optional {
  color: var(--muted);
  font-weight: 400;
}

.problem,
.form-feedback {
  color: var(--error);
}

.problem:empty,
.form-feedback:empty {
  display: none;
}

.avatar-choice {
  border: 0;
  margin: 0 0 18px;
  padding: 0;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.avatar-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  line-height: 1.3;
}

/* The radio itself is hidden; the whole card is the choice, with a border and bold name when picked. */
.avatar-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-option:has(input:checked) {
  border: 2px solid var(--accent);
  background: var(--pink);
}

.avatar-option:has(input:checked) .avatar-name {
  color: var(--accent);
}

.avatar-option img {
  border-radius: 50%;
  margin-bottom: 6px;
}

.avatar-name {
  font-size: 15px;
  font-weight: 600;
}

.avatar-traits {
  font-size: 13px;
  color: var(--muted);
}

.form-feedback {
  margin: 0 0 14px;
}

.signup-card .button {
  width: 100%;
  min-height: 52px;
}

.button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.done {
  padding: 12px 4px;
  outline: none;
}

.done h3 {
  font-size: 28px;
  margin-bottom: 10px;
}

.done p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .signup {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .signup-card {
    text-align: left;
  }

  .avatar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
