/* ===== Reset e base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-page: #0d3a4b;
  --bg-speckle: rgba(255, 255, 255, 0.03);
  --surface: #143d4f;
  --surface-card: #164556;
  --border: rgba(0, 232, 201, 0.2);
  --text: #e8f4f2;
  --text-muted: #b2c3ca;
  --disabled-bg: #1a4a5c;
  --disabled-text: #8ba3ab;
  --primary: #00a89f;
  --primary-hover: #00918a;
  --primary-glow: rgba(0, 168, 159, 0.35);
  --accent: #00e5c9;
  --tag-bg: #00a89f;
  --tag-border: rgba(255, 255, 255, 0.25);
  --scale-gradient: linear-gradient(to right, #c53030 0%, #dd6b20 25%, #d69e2e 50%, #38a169 75%, #00a89f 100%);
  --scale-selected-ring: #00e5c9;
  --error: #f56565;
  --radius: 12px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Fundo escuro com speckles */
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--bg-speckle) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

/* ===== Container e layout ===== */
.container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ===== Header (design system do banner) ===== */
.header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.header-logo {
  display: block;
  max-width: 180px;
  height: auto;
  margin: 0 auto 1.25rem;
}

.header-tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 999px;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.header h1 {
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--accent);
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 480px) {
  .header h1 {
    font-size: 1.85rem;
  }
}

/* ===== Cards ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.field {
  margin-bottom: 1.25rem;
}

.field:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.label-with-icon .label-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.nome-text {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 0.25rem;
}

.avaliando-intro {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.required {
  color: var(--error);
}

.optional {
  font-weight: 400;
  color: var(--text-muted);
}

/* ===== Pergunta ===== */
.question {
  margin: 0 0 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.4;
}

/* ===== Input texto e textarea ===== */
input[type="text"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

input[type="text"]:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-text);
  cursor: not-allowed;
  border-color: var(--border);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

textarea::placeholder {
  color: var(--text-muted);
}

.hint {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.error {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--error);
}

.error:empty {
  display: none;
}

/* ===== Radio (pergunta 1) ===== */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 400;
  font-size: 1rem;
  color: var(--text);
}

.radio-option input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.radio-label {
  flex: 1;
}

/* ===== Barra de escala 1–10 ===== */
.scale-wrap {
  margin-bottom: 0;
}

.scale-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  width: 100%;
  height: 48px;
  background: var(--scale-gradient);
  border-radius: 10px;
  padding: 0 4px;
  overflow: hidden;
}

.scale-btn {
  flex: 1;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.scale-btn:hover {
  transform: scale(1.15);
}

.scale-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.scale-btn.selected {
  background: #fff;
  color: var(--scale-selected-ring);
  box-shadow: 0 0 0 2px var(--scale-selected-ring);
}

@media (max-width: 480px) {
  .scale-bar {
    height: 44px;
    padding: 0 2px;
  }

  .scale-btn {
    font-size: 0.875rem;
  }
}

/* ===== Botão enviar (teal + animação) ===== */
.actions {
  margin-top: 0.25rem;
}

.btn {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Animação contínua suave (pulse de brilho) */
@keyframes btn-shine {
  0%, 100% {
    opacity: 0.12;
  }
  50% {
    opacity: 0.3;
  }
}

.btn-primary .btn-text {
  position: relative;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  opacity: 0.85;
  animation: btn-shine 2.5s ease-in-out infinite;
  pointer-events: none;
}

/* Shimmer ao passar o mouse */
@keyframes btn-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.btn-primary:hover::before {
  animation: btn-shimmer 0.55s ease-out forwards;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  background-size: 50% 100%;
  background-repeat: no-repeat;
  opacity: 1;
}

/* ===== Tela Obrigado ===== */
#form-header[hidden],
#form-nps[hidden] {
  display: none !important;
}

.thank-you[hidden] {
  display: none !important;
}

.thank-you {
  text-align: center;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.thank-you-logo {
  display: block;
  max-width: 180px;
  height: auto;
  margin: 0 auto 1.25rem;
}

.thank-you-message {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.btn-primary:disabled {
  opacity: 0.8;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:disabled:hover {
  transform: none;
}
