/* Renderer publico - estilos especificos do form. */

.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.section-title:not(:first-child) { margin-top: 56px; }

.field { margin: 28px 0; }

.field label {
  display: block;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.field.required > label::after {
  content: '*';
  color: var(--pink);
  margin-left: 4px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field input[type="number"],
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  background: var(--bg-color);
  color: var(--text-main);
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--purple);
  background: white;
  box-shadow: 0 0 0 3px rgba(152, 51, 237, 0.15);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
}

.field-error {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--err-ink);
  font-weight: 500;
  display: none;
}
.field.invalid .field-error { display: block; }
.field.invalid input,
.field.invalid textarea {
  border-color: var(--err-ink);
}
.field.invalid > label { color: var(--err-ink); }
.field.invalid .radio-pill span,
.field.invalid .scale-btn,
.field.invalid .consent-row {
  border-color: var(--err-ink);
}
.field.invalid .radio-pill input:not(:checked) + span {
  color: var(--err-ink);
}
@keyframes degust-field-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.field.invalid {
  animation: degust-field-shake 0.35s ease-in-out;
  scroll-margin-top: 100px;
}

/* Radio pills */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radio-pill {
  position: relative;
  display: inline-flex;
}
.radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-pill span {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg-color);
  color: var(--text-main);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}
.radio-pill input:checked + span {
  border-color: var(--text-main);
  background: var(--text-main);
  color: #fff;
}
.radio-pill input:focus-visible + span {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.4;
}
.checkbox-row input { margin-top: 2px; }

/* Scale */
.scale-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scale-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.scale-btn {
  flex: 1 1 auto;
  min-width: 36px;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-color);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.scale-btn:hover { background: var(--bg-card); }
.scale-btn.selected {
  background: var(--text-main);
  border-color: var(--text-main);
  color: #fff;
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
}

/* Consent */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--bg-color);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}
.consent-row input { margin-top: 2px; flex-shrink: 0; }

/* Honeypot - escondido visualmente mas presente no DOM */
.honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Submit row */
.submit-row {
  margin-top: 40px;
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 12px;
}
.submit-row .btn-primary {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
}
@media (min-width: 640px) {
  .submit-row {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }
  .submit-row .btn-primary { width: auto; }
}

.privacy-note {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
}

/* Loading state */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 0%, var(--line) 50%, var(--bg-card) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-input);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Sucesso pos-submit */
.success-card {
  text-align: center;
  padding: 60px 32px;
}
.success-card .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}
.success-card h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
}
.success-card p {
  font-family: 'Georgia', serif;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}
