/* Survey Public - Mobile First Responsive */
:root {
  --survey-primary: #1976d2;
  --survey-primary-dark: #1565c0;
  --survey-bg: #f5f5f5;
  --survey-card-bg: #ffffff;
  --survey-text: #333333;
  --survey-text-muted: #777777;
  --survey-border: #e0e0e0;
  --survey-error: #d32f2f;
  --survey-success: #388e3c;
  --survey-star: #ffc107;
}

* { box-sizing: border-box; }

body {
  background: var(--survey-bg);
  color: var(--survey-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px; /* Evita zoom no iOS */
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.survey-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
}

.survey-panel {
  background: var(--survey-card-bg);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.survey-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.survey-description {
  color: var(--survey-text-muted);
  margin-bottom: 16px;
}

.survey-presentation {
  margin-bottom: 16px;
  line-height: 1.6;
}

.group-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--survey-primary);
}

/* Progresso */
.survey-progress {
  margin-bottom: 16px;
}
.survey-progress .progress {
  height: 6px;
  border-radius: 3px;
  background: var(--survey-border);
}
.survey-progress .progress-bar {
  background: var(--survey-primary);
  transition: width 0.3s ease;
}

/* Campos */
.survey-field {
  margin-bottom: 20px;
}
.survey-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
}
.survey-field .field-required {
  color: var(--survey-error);
  margin-left: 2px;
}
.survey-field .field-instruction {
  font-size: 0.85rem;
  color: var(--survey-text-muted);
  margin-bottom: 6px;
}
.survey-field .field-error {
  color: var(--survey-error);
  font-size: 0.85rem;
  margin-top: 4px;
  display: none;
}

.survey-field input[type="text"],
.survey-field input[type="number"],
.survey-field input[type="email"],
.survey-field input[type="date"],
.survey-field input[type="datetime-local"],
.survey-field textarea,
.survey-field select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid var(--survey-border);
  border-radius: 8px;
  background: var(--survey-card-bg);
  transition: border-color 0.2s;
}
.survey-field input:focus,
.survey-field textarea:focus,
.survey-field select:focus {
  border-color: var(--survey-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(25,118,210,0.15);
}
.survey-field.has-error input,
.survey-field.has-error textarea,
.survey-field.has-error select {
  border-color: var(--survey-error);
}
.survey-field.has-error .field-error {
  display: block;
}

/* Radio buttons */
.survey-radio-group,
.survey-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.survey-radio-option,
.survey-checkbox-option {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--survey-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.survey-radio-option:hover,
.survey-checkbox-option:hover {
  border-color: var(--survey-primary);
  background: rgba(25,118,210,0.04);
}
.survey-radio-option.selected,
.survey-checkbox-option.selected {
  border-color: var(--survey-primary);
  background: rgba(25,118,210,0.08);
}
.survey-radio-option input,
.survey-checkbox-option input {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

/* Estrelas */
.star-rating {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.star-rating .star {
  font-size: 2rem;
  cursor: pointer;
  color: var(--survey-border);
  transition: color 0.15s;
  user-select: none;
}
.star-rating .star.active {
  color: var(--survey-star);
}
.star-rating .star:hover {
  color: var(--survey-star);
}

/* Botoes wizard */
.wizard-buttons {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.wizard-buttons .btn {
  flex: 1;
  padding: 12px;
  font-size: 1rem;
}

/* Icones de status */
.survey-error-icon,
.survey-thanks-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 16px;
}
.survey-error-icon { color: var(--survey-error); }
.survey-thanks-icon { color: var(--survey-success); }

/* Texto informativo (TEXTQUADRO) */
.field-info-text {
  padding: 12px;
  background: #f0f4f8;
  border-radius: 8px;
  border-left: 4px solid var(--survey-primary);
}

/* Textarea quadro */
.field-textarea-quadro textarea {
  border: 2px solid var(--survey-primary);
  background: #f9fbfd;
}

/* Mobile */
@media (max-width: 480px) {
  .survey-container { padding: 8px; }
  .survey-panel { padding: 16px; border-radius: 8px; }
  .survey-title { font-size: 1.25rem; }
  .wizard-buttons { flex-direction: column; }
}
