/* =========================================================
   CORREÇÃO GLOBAL DE OVERFLOW (GTM + MOBILE)
========================================================= */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* Evita que qualquer elemento estoure a largura */
* {
  box-sizing: border-box !important;
}

/* =========================================================
   BASE / LAYOUT GERAL
========================================================= */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #f8f6fb;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  animation: fadeIn 0.6s ease-in;
}

/* =========================================================
   CONTAINER PRINCIPAL
========================================================= */
.container {
  background: #fff;
  padding: 40px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  width: 95%;
  max-width: 850px;
  margin: 40px auto 60px auto;
  box-sizing: border-box;
}

/* =========================================================
   LOGO E TÍTULOS
========================================================= */
.logo {
  text-align: center;
  margin-bottom: 20px;
}

.logo img {
  width: 340px;
  max-width: 90%;
  height: auto;
}

h1 {
  color: #592c82;
  text-align: center;
  font-size: 22px;
  margin-bottom: 8px;
}

.subtitle {
  text-align: center;
  font-size: 15px;
  color: #4a4a4a;
  margin-bottom: 28px;
}

/* =========================================================
   PERGUNTAS
========================================================= */
.question {
  margin-bottom: 40px;
}

.question label {
  font-weight: 600;
  color: #592c82;
  display: block;
  margin-bottom: 14px;
  font-size: 17px;
}

/* =========================================================
   ESCALAS
========================================================= */
.scale {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.scale input {
  display: none;
}

.scale span {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 15px;
  border: 2px solid #ddd;
}

/* =========================================================
   ESCALA NPS — CORES DA LEGENDA
========================================================= */

/* 0–6: Vermelho */
.scale input[value="0"] + span,
.scale input[value="1"] + span,
.scale input[value="2"] + span,
.scale input[value="3"] + span,
.scale input[value="4"] + span,
.scale input[value="5"] + span,
.scale input[value="6"] + span {
  border-color: #E53935;
}

/* 7–8: Amarelo */
.scale input[value="7"] + span,
.scale input[value="8"] + span {
  border-color: #FDD835;
}

/* 9–10: Verde */
.scale input[value="9"] + span,
.scale input[value="10"] + span {
  border-color: #43A047;
}

/* Hover */
.scale span:hover {
  transform: scale(1.07);
  box-shadow: 0 0 10px rgba(89, 44, 130, 0.25);
}

/* =========================================================
   SELECIONADO
========================================================= */
.scale input[value="0"]:checked + span,
.scale input[value="1"]:checked + span,
.scale input[value="2"]:checked + span,
.scale input[value="3"]:checked + span,
.scale input[value="4"]:checked + span,
.scale input[value="5"]:checked + span,
.scale input[value="6"]:checked + span {
  background: #E53935;
  color: #fff;
}

.scale input[value="7"]:checked + span, 
.scale input[value="8"]:checked + span {
  background: #FDD835;
  color: #333;
}

.scale input[value="9"]:checked + span,
.scale input[value="10"]:checked + span {
  background: #43A047;
  color: #fff;
}

/* =========================================================
   LEGENDA
========================================================= */
.legend {
  list-style: none;
  padding: 0;
  margin-top: 18px;
  margin-bottom: 28px;
  font-size: 15px;
}

.legend li {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.color-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 10px;
}

/* =========================================================
   TEXTAREA
========================================================= */
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #d2c9e3;
  font-size: 15px;
  resize: vertical;
  transition: 0.3s border-color;
  margin-top: 22px;
}

textarea:focus {
  border-color: #592c82;
  outline: none;
}

/* =========================================================
   OPÇÕES PERGUNTA 2
========================================================= */
.options label {
  display: block;
  margin: 12px 0;
  cursor: pointer;
  font-size: 15px;
  color: #2e2b2e;
}

/* =========================================================
   BOTÃO
========================================================= */
button {
  background: #592c82;
  color: #fff;
  border: none;
  padding: 15px 28px;
  border-radius: 10px;
  font-size: 17px;
  cursor: pointer;
  transition: 0.25s;
  width: 100%;
  max-width: 420px;
  margin: 35px auto;
  display: block;
}

button:hover {
  background: #442066;
  transform: scale(1.03);
}

/* =========================================================
   FEEDBACK
========================================================= */
.feedback {
  text-align: center;
  margin-top: 15px;
  font-size: 15px;
  font-weight: 500;
  color: #592c82;
}

/* =========================================================
   FOOTER (Corrigido — não desloca mais nada)
========================================================= */
.footer {
  width: 100% !important;
  margin: 0 auto !important;
  background: linear-gradient(to top, #f3ecfa 90%, #f8f6fb 100%);
  border-top: 2px solid #e2d8f0;
  text-align: center;
  padding: 30px 10px;
  color: #592c82;
  font-size: 14px;
  box-sizing: border-box;
}

/* =========================================================
   ANIMAÇÃO
========================================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   MOBILE — ESCALA 0–10 QUE CABE EM QUALQUER CELULAR
========================================================= */
@media (max-width: 768px) {

  .nps-scale {
    display: grid !important;
    grid-template-columns: repeat(11, 1fr) !important;
    gap: 2px !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .nps-scale label {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .nps-scale span {
    width: 24px !important;
    height: 24px !important;
    font-size: 11px !important;
    padding: 0 !important;
  }

  /* Ajusta container para sempre ocupar tela inteira */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  body {
    padding: 0 !important;
  }
}
