/* Formulários e campos — todas as páginas */

.f {
  display: grid;
  gap: 8px;
}

.f > span {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.select,
.input,
textarea.input,
.cep-strip__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

textarea.input {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.f .input,
.f .select {
  width: 100%;
}

.input::placeholder,
.cep-strip__input::placeholder {
  color: var(--faint);
}

.input[readonly],
.input:disabled,
.select:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

.select:focus,
.input:focus,
textarea.input:focus,
.cep-strip__input:focus {
  border-color: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.22);
}

.input--erro,
.input--erro:focus {
  border-color: var(--err) !important;
  box-shadow: 0 0 0 3px rgba(181, 74, 74, 0.16) !important;
}

.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--fg);
  transition: background-color 9999s ease-out 0s;
}

.input.is-cep-loading {
  opacity: 0.72;
  background-image: linear-gradient(90deg, transparent, rgba(168, 120, 48, 0.08), transparent);
  background-size: 200% 100%;
  animation: cep-shimmer 1s ease-in-out infinite;
}

@keyframes cep-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.cep-lookup-hint {
  display: block;
  min-height: 1.1em;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.cep-lookup-hint.is-ok {
  color: #2e7d32;
}

.cep-lookup-hint.is-error {
  color: var(--err, #b54a4a);
}

/* Faixa CEP */
.cep-strip {
  padding: 0.75rem 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.cep-strip__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cep-strip__form {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.65rem;
  flex: 1 1 280px;
  max-width: 520px;
  min-width: 0;
}

.cep-strip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--orange-dark);
}

.cep-strip__label {
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--fg);
  margin: 0;
}

.cep-strip__input {
  flex: 1;
  min-width: 0;
  height: 42px;
  min-height: 42px;
}

.cep-strip__ok {
  flex-shrink: 0;
  min-height: 42px;
  padding-inline: 16px;
  border-radius: 12px;
}

.cep-strip__hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-left: auto;
}

@media (max-width: 760px) {
  .cep-strip {
    padding: 0.45rem 0;
  }

  .cep-strip__hint {
    display: none;
  }

  .cep-strip__inner {
    justify-content: stretch;
  }

  .cep-strip__form {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .cep-strip__icon svg {
    width: 17px;
    height: 17px;
  }

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

  .cep-strip__input {
    flex: 1;
    min-width: 0;
    height: 36px;
    min-height: 36px;
    font-size: 0.8125rem;
  }

  .cep-strip__ok {
    min-height: 36px;
    height: 36px;
    padding-inline: 12px;
    font-size: 0.75rem;
    border-radius: 10px;
  }
}
