/* CSS Reset para padronizar o comportamento entre navegadores */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Estilos Gerais */
body {
  font-family: Montserrat, Arial, sans-serif;
  background-color: #EDF1F4;
}

.form-container {
  width: 456px; /* Mantém o formulário centralizado e alinhado */
  margin: 0 auto; /* Centraliza o formulário */
  position: relative; /* Para alinhar corretamente elementos absolutos, como a barra */
  background-color: #FFF;
  padding: 32px;
  border: 1px solid #CEDFED;
  border-radius: 8px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

h2, h3, label, input, select, button {
  font-family: Montserrat, Arial, sans-serif;
}

.montserrat-uniquifier {
  font-family: "Montserrat", serif;
  font-optical-sizing: auto;
  font-weight: weight;
  font-style: normal;
}

header {
  height: 100px;
  background-color: #143156;
  display: flex;
  justify-content: center;
  align-items: center;
}

header img {
  max-height: 80px;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 100px);
}

/* Títulos */
h2, h3 {
  font-size: 18px;
  font-weight: 800;
  color: #143156;
  margin-bottom: 8px;
  text-align: left; /* Alinha os títulos à esquerda */
}

/* Labels */
label {
  color: #143156;
  font-weight: 600;
  font-size: 1rem; /* Ajusta o tamanho da fonte */
  display: block; /* Garante que cada label ocupe uma linha */
  margin-bottom: 0.5rem; /* Espaçamento abaixo da label */
}

small {
  font-size: 0.875rem; /* menor que o texto padrão */
  color: #617281;     
  font-family: 'Montserrat', sans-serif;
  display: block;
  margin-top: 2px;
  margin-bottom:16px;
}

/* Inputs e Select */
input, select {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #CEDFED;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

input:focus, select:focus {
  border-color: #0d69d5;
  box-shadow: 0 0 5px rgba(13, 105, 213, 0.5);
  outline: none;
}

/* Botões */
button {
  margin-top: 16px;
  padding: 12px;
  width: 100%;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: not-allowed;
  background-color: #CEDFED;
  color: #617281;
}

button:not(:disabled) {
  background-color: #FFC528;
  color: #143156;
  cursor: pointer;
}

/* Links para voltar */
.link-anterior {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: #617281;
  text-decoration: none;
}

.link-anterior:hover {
  text-decoration: underline;
  color: #143156;
}

/* Radio Buttons */

/* Alinhando label e small */
.radio-group label {
  display: flex; /* Cria um layout flexível */
  align-items: center; /* Alinha o botão de rádio ao centro verticalmente */
  gap: 10px; /* Espaçamento entre o botão de rádio e o texto */
}

.radio-group label span {
  display: flex; /* Cria uma estrutura flexível para o texto principal e o small */
  flex-direction: column; /* Coloca o texto principal e o small um abaixo do outro */
  gap: 2px; /* Espaçamento entre o texto principal e o small */
}

.radio-group label small {
  font-size: 0.875rem; /* Tamanho da fonte menor para o small */
  color: #617281; /* Cor mais neutra */
  font-weight: 400; /* Peso da fonte discreto */
}

.radio-group {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid #CEDFED;
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="radio"]:checked {
  border-color: #FFC528;
  background-color: #FFC528;
}

/* Checkboxes */
input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #FFC528;
}

/* Select Customização */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #FFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23979797' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  padding-right: 24px; /* Espaço para a seta */
}

/* Barra de Progresso */
.barra-de-progresso {
  height: 10px;
  background-color: #ddd;
  border-radius: 5px;
  margin: 20px 0;
  overflow: hidden;
}

.progresso-preenchido {
  height: 100%;
  width: 0; /* Progresso inicial */
  background-color: #FFC528;
  border-radius: 5px;
  transition: width 0.3s ease;
}

/* Produto Recomendado */
#fase10 img {
  display: block;
  margin: 16px auto;
  max-width: 100%;
  border: 1px solid #CEDFED;
  border-radius: 8px;
}

#fase10 p {
  text-align: center;
  margin: 8px 0;
}

#fase10 .radio-group {
  justify-content: center;
  gap: 16px;
}

#btnSolicitarAmostra {
  margin-top: 16px;
}

/* Layout de Campos em Linha */
.container-linha {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.container-linha > div {
  flex: 1;
}

#rua, #cidade {
  flex: 4;
}

#numero, #estado {
  flex: 1;
}

/* Campos de Complemento */
#complemento {
  margin-top: 8px;
}

/* Estilização dos textos dos checkboxes */
.checkbox-consent label,
.checkbox-group label {
  font-weight: 400;
  color: #143156;
}

/* Configuração específica para os radio buttons da fase 10 */
#fase10 .radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
  justify-content: center;
  margin-top: 15px;
}

#fase10 .radio-group label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid #CEDFED;
  border-radius: 8px;
  background-color: #f9f9f9;
  transition: all 0.3s ease;
}

#fase10 .radio-group label:hover {
  background-color: #eaeaea;
}

#fase10 .radio-group input[type="radio"] {
  display: none;
}

#fase10 .radio-group input[type="radio"]:checked + label {
  background-color: #FFC528;
  border-color: #FFC528;
  color: #143156;
  font-weight: bold;
}

#fase10 .radio-group label span {
  margin-top: 4px;
  font-size: 14px;
}

/* ===== Estilos para a Fase de Recomendação de Produtos ===== */
#fase10 {
  text-align: center;
  padding: 4px;
  background-color: #f9f9f9;
  font-family: 'Montserrat', sans-serif;
}

#fase10 h3 {
  font-size: 1.5rem;
  color: #143156;
  margin-bottom: 4px;
}

#fase10 h4 {
  font-size: 1rem;
  color: #143156;
  margin-bottom: 4px;
}

#fase10 p {
  font-size: 1rem;
  color: #333333;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* ===== Estilos para os Produtos Recomendados ===== */
.produto {
  background-color: #fff;
  margin: 20px auto;
  max-width: 500px;
}

/* ===== Estilos para a Tabela de Tamanhos ===== */
.tabela-tamanhos {
  width: 90%;
  margin: 20px auto;
  border-collapse: collapse;
  font-family: 'Montserrat', sans-serif;
  border-radius: 4px;
  overflow: hidden;
}

.tabela-tamanhos th,
.tabela-tamanhos td {
  border: 1px solid #CEDFED;
  padding: 10px;
  text-align: center;
}

.tabela-tamanhos th {
  background-color: #CEDFED;
  font-weight: bold;
  color: #1e1e1e;
}

.tabela-tamanhos tr:nth-child(even) {
  background-color: #fafafa;
}

/* Estilo do Popup */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 16px;
}

.popup.hidden {
  display: none;
}

.popup-conteudo {
  background-color: #fff;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  animation: fadeIn 0.3s ease-in-out;
}

.popup-logo {
  max-width: 120px;
  margin: 0 auto 16px;
  display: block;
}

.popup-mensagem {
  font-size: 32px;
  color: #143156;
  margin-bottom: 24px;
  align-items: center;
}

.popup-botao {
  background-color: #FFC528;
  color: #143156;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.popup-botao:hover {
  background-color: #e6b81f;
}

@media (min-width: 768px) {
  .popup-conteudo {
    width: 480px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Estilos para Mobile ===== */
@media only screen and (max-width: 768px) {
  /* Container principal */
  .form-container {
    width: 95%;
    max-width: 456px;
    padding: 20px;
    margin: 0 auto;
  }

  /* Ajuste nas fases para aproveitar melhor o espaço */
  .fase {
    padding: 10px;
  }

  /* Inputs, selects e botões ocupam toda a largura do container */
  input[type="text"],
  input[type="email"],
  select,
  button {
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    margin-bottom: 10px;
  }

  /* Radio buttons e checkboxes: mantém tamanho padrão */
  input[type="radio"] {
    width: 16px;
    height: 16px;
    box-sizing: content-box;
    margin-right: 5px;
    border-radius: 50%;
  }
  
  input[type="checkbox"] {
    width: auto;
    box-sizing: content-box;
    margin-right: 5px;
  }

  /* Containers em linha: empilhar em telas pequenas */
  .container-linha {
    display: block;
  }

  .container-linha > div {
    width: 100%;
    margin-bottom: 10px;
  }

  /* Produtos recomendados: ajuste para melhor visualização */
  .produto {
    margin: 10px auto;
    width: 100%;
    padding: 10px;
  }

  /* Tabela de tamanhos: ocupa toda a largura */
  .tabela-tamanhos {
    width: 100%;
    font-size: 0.9rem;
  }
}


