.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.field__label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-700);
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--ink-500);
}

.field__error {
  display: flex;
  align-items: flex-start;
  gap: var(--s-1);
  font-size: var(--fs-xs);
  color: var(--danger);
}

.field__control {
  width: 100%;
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color var(--motion), box-shadow var(--motion);
  box-shadow: inset 0 1px 1px rgba(26, 22, 23, 0.03);
}

.field__password {
  position: relative;
}

.field__password .field__control {
  padding-right: 2.75rem;
}

.field__password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-500);
  cursor: pointer;
  padding: 0;
}

.field__password-toggle:hover {
  color: var(--brand-700);
  background: var(--brand-50);
}

.field__password-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  color: var(--brand-800);
}

@media (min-width: 640px) {
  .field__control {
    min-height: 40px;
  }
}

.field__control:hover {
  border-color: var(--ink-400);
}

.field__control:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--focus);
}

.field__control[aria-invalid="true"] {
  border-color: var(--danger);
}

.field textarea.field__control {
  min-height: 6.5rem;
  resize: vertical;
  line-height: 1.45;
}

.field select.field__control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6264' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--s-2);
}

.field--checkbox input {
  margin-top: 0.2rem;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--brand-700);
}

/* Seletor de tipo sanguíneo */
.blood-type {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-2);
}

@media (max-width: 40rem) {
  .blood-type {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.blood-type__option {
  position: relative;
}

.blood-type__option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.blood-type__face {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-lg);
  transition: border-color var(--motion), background var(--motion), color var(--motion);
}

.blood-type__option input:focus-visible + .blood-type__face {
  box-shadow: var(--focus);
}

.blood-type__option input:checked + .blood-type__face {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #fff;
}

.blood-type__option:hover .blood-type__face {
  border-color: var(--brand-600);
}
