/* Labelled fields, the shape every form input shares. */
.field{
  text-align:left;
  margin-bottom:var(--sp-3);
}
.field label{
  display:block;
  font-size:var(--fs-xs);
  font-weight:600;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:var(--text-muted);
  margin-bottom:6px;
}
.field .input-wrap{
  display:flex;
  align-items:center;
  gap:var(--sp-2);
  border:1px solid var(--border-color-strong);
  border-radius:var(--radius-sm);
  padding:var(--sp-2) var(--sp-3);
  transition:border-color var(--transition), box-shadow var(--transition), background var(--transition);
  background:var(--bg-input);
}
.field .input-wrap:focus-within{
  border-color:var(--border-focus);
  box-shadow:var(--primary-glow);
  background:var(--bg-input-focus);
}
.field .input-wrap .icon{flex:none;color:var(--text-muted);}
.field input,
.field select{
  border:none;
  outline:none;
  background:transparent;
  font-size:var(--fs-base);
  width:100%;
  color:var(--text-color);
  font-family:inherit;
}

/* A rejected field states what is wrong in words, next to the input — colour
 * alone would be the only signal for anyone who cannot see it. */
.field-error{
  margin-top:6px;
  font-size:var(--fs-xs);
  color:var(--status-failed);
}
.field:has(.field-error) .input-wrap{border-color:var(--status-failed);}
.field-hint{
  margin-top:6px;
  font-size:var(--fs-xs);
  color:var(--text-secondary);
}

/* A checkbox labels itself horizontally, so it drops the uppercase caption the
 * other fields use above their input. */
.field--checkbox label{
  display:flex;
  align-items:center;
  gap:var(--sp-2);
  text-transform:none;
  letter-spacing:0;
  font-size:var(--fs-base);
  font-weight:600;
  color:var(--text-color);
  margin-bottom:0;
}
.field--checkbox input{width:auto;accent-color:var(--primary-color);}

.form-actions{
  display:flex;
  justify-content:flex-end;
  gap:var(--sp-2);
  margin-top:var(--sp-5);
}
