#feedbackForm {
  display: flex;
  flex-direction: column;
}

#feedbackForm label,
.question-label {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-ink);
  margin-top: var(--space-4);
  margin-bottom: 2px;
}

#feedbackForm > label:first-of-type {
  margin-top: 0;
}

.field-hint {
  font-weight: 400;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--color-muted);
}

#feedbackForm textarea {
  resize: vertical;
  min-height: 90px;
}

/* Busca de cartório (CNS/nome) com autocomplete */
.cartorio-search {
  position: relative;
}

.cartorio-results {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(23, 24, 15, 0.12);
}

.cartorio-result {
  padding: 0.55rem 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.92rem;
}

.cartorio-result-name {
  color: var(--color-ink);
}

.cartorio-result-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: 1px;
}

.cartorio-result.is-active,
.cartorio-result:hover {
  background: var(--color-cream-alt);
}

.cartorio-hint {
  margin-top: 4px;
}

.question-block {
  margin-top: var(--space-4);
}

.question-block:first-of-type {
  margin-top: var(--space-4);
}

/* Toggle Sim/Não */
.yesno-toggle {
  display: flex;
  gap: var(--space-2);
}

.yesno-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.yesno-toggle label {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-cream-alt);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-muted);
  cursor: pointer;
  margin: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.yesno-toggle input:checked + label {
  background: var(--color-lime);
  border-color: var(--color-lime);
  color: var(--color-lime-ink);
}

.yesno-toggle input:focus-visible + label {
  outline: 2px solid var(--color-lime);
  outline-offset: 2px;
}

/* Escala de satisfação 0-10 */
.scale-field {
  position: relative;
  padding-top: 34px;
}

.scale-value {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  min-width: 28px;
  padding: 2px 8px;
  text-align: center;
  background: var(--color-ink);
  color: var(--color-surface);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
}

.scale-value::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--color-ink);
}

.scale-input {
  width: 100%;
  height: 6px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background: var(--color-cream-alt);
}

.scale-input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-lime);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 1px var(--color-line);
  cursor: pointer;
}

.scale-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-lime);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 1px var(--color-line);
  cursor: pointer;
}

.scale-input::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}

.scale-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--color-muted);
}

.scale-ticks span:nth-child(2) {
  flex: 1;
  text-align: center;
}

.scale-ticks span:last-child {
  text-align: right;
}

#feedbackForm > .btn-primary {
  margin-top: var(--space-5);
  width: 100%;
}

/* Tela de sucesso */
.feedback-success {
  text-align: center;
  padding: var(--space-4) 0;
}

.feedback-success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: var(--color-lime);
  color: var(--color-lime-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-success-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.feedback-success p {
  color: var(--color-muted);
  margin-bottom: var(--space-5);
}

.feedback-success .btn-primary {
  width: auto;
  padding: 0 28px;
}
