/**
 * components.css — Inputs, botões, radio cards, progress bar e steps.
 * Estilos de cada componente individual do formulário.
 * Implementado na Sprint 6.
 */

/* ─── Step: wrapper e tipografia ────────────────────────────────────────────── */

.step {
  display: flex;
  flex-direction: column;
}

.step__greeting {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.step__question {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
  margin-bottom: 24px;
}

/* ─── Input (text, email, tel) ──────────────────────────────────────────────── */

.input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--color-primary);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-input);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(242, 78, 41, 0.12);
}

.input--error {
  border-color: var(--color-error);
  box-shadow: none;
}

.input--error:focus {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* ─── Mensagem de erro ──────────────────────────────────────────────────────── */

.error-message {
  color: var(--color-error);
  font-size: 13px;
  font-weight: 400;
  margin-top: 6px;
  line-height: 1.4;
}

/* ─── Textarea ──────────────────────────────────────────────────────────────── */

textarea.input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* ─── Radio Cards ───────────────────────────────────────────────────────────── */

.radio-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.radio-card {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-input);
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-primary);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
  user-select: none;
  -webkit-user-select: none;
}

.radio-card__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.radio-card:hover {
  border-color: var(--color-accent);
  background: rgba(242, 78, 41, 0.04);
}

.radio-card:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.radio-card--selected {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

.radio-card--selected:hover {
  background: #d94020;
  border-color: #d94020;
}

/* ─── Área de ações (botões) ────────────────────────────────────────────────── */

.step__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
}

/* ─── Botão Prosseguir ──────────────────────────────────────────────────────── */

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition:
    background 150ms ease,
    transform 150ms ease;
}

.btn-next::after {
  content: "→";
  font-size: 16px;
  line-height: 1;
}

.btn-next:hover {
  background: #d94020;
  transform: translateX(3px);
}

.btn-next:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(242, 78, 41, 0.35);
}

.btn-next:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ─── Botão Pular (step opcional) ───────────────────────────────────────────── */

.btn-skip {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 150ms ease;
}

.btn-skip:hover {
  color: var(--color-primary);
}

.btn-skip:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── Botão Voltar ──────────────────────────────────────────────────────────── */

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition:
    color 150ms ease,
    background 150ms ease;
  flex-shrink: 0;
}

.btn-back:hover {
  color: var(--color-primary);
  background: var(--color-border);
}

.btn-back:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(25, 39, 64, 0.2);
}

/* ─── Tela de Sucesso ───────────────────────────────────────────────────────── */

.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100%;
  padding: 40px 24px;
  gap: 20px;
  flex: 1;
}

.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-headline {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.25;
}

.success-text {
  font-size: 16px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 380px;
}
