/* RESET GERAL */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variáveis CSS para consistência de cores e fontes */
:root {
  --primary-mounjaro: #4d31a5; /* Roxa/Azul profunda do site */
  --secondary-mounjaro: #85eb6a; /* Verde vibrante/limão do site */
  --text-dark: #333;
  --text-light: #666;
  --bg-light: #f4f7fb;
  --border-color: #e0e0e0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  padding: 15px;
  overflow-y: scroll; /* Garante que a barra de rolagem esteja sempre lá */
}

/* ESTILO DA TELA DE CARREGAMENTO */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-mounjaro); /* Fundo com a cor primária do site */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Garante que fique acima de tudo */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out; /* Transição para sumir */
    overflow: hidden; /* Garante que a tela de loading não role enquanto visível */
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner-container {
    text-align: center;
    color: #fff; /* Cor branca para o spinner e texto */
}

.loading-spinner {
    font-size: 3.5rem; /* Tamanho grande para o spinner */
    margin-bottom: 15px;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}
/* FIM DO ESTILO DA TELA DE CARREGAMENTO */


.container {
  max-width: 480px;
  margin: 25px auto;
  padding: 35px;
  background: #fff;
  border-radius: 20px; /* Cantos mais arredondados */
  box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* Sombra suave e proeminente */
  animation: fadeIn 0.6s ease-in-out;
}

/* ESTILO PARA O NOVO BANNER */
.banner-topo {
    max-width: 480px;
    margin: 0 auto 25px auto;
    background: linear-gradient(135deg, #4d31a5, #6a4ec4); /* Gradiente roxo/azul similar ao site */
    color: #fff;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.banner-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 25px;
    opacity: 0.9;
}

.banner-offer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--primary-mounjaro);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 0 auto;
    max-width: 250px;
    font-weight: 600;
}

.offer-text {
    font-size: 14px;
    text-transform: uppercase;
    opacity: 0.8;
}

.offer-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-mounjaro); /* CORRIGIDO: Agora usa a cor roxa/azul profunda para melhor contraste*/
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    animation: pulse 2s infinite; /* ADICIONADO: Efeito pulsante para o preço*/
}

/* ESTILO PARA A LOGO PRINCIPAL */
.logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.main-logo {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}

h2 {
  font-size: 24px;
  color: var(--primary-mounjaro);
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
}

/* ESTILO DO INDICADOR DE ETAPA (MAIS MINIMALISTA) */
.steps {
  display: flex;
  justify-content: center;
  margin-bottom: 35px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  color: var(--text-dark);
  padding: 0;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: none;
}

.step span {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  background: var(--primary-mounjaro); /* Cor do número: Roxa principal */
  color: #fff;
  font-size: 15px;
  border-radius: 50%;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(var(--primary-mounjaro), 0.3);
}
/* FIM DO ESTILO DO INDICADOR DE ETAPA */


/* INPUTS */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.input-group i {
  position: absolute;
  left: 18px;
  color: #a0a0a0;
  font-size: 18px;
}

.input-group input {
  width: 100%;
  padding: 16px 16px 16px 50px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fdfdfd;
  font-size: 16px;
  color: var(--text-dark);
  transition: 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.input-group input:focus {
  border-color: var(--primary-mounjaro);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(var(--primary-mounjaro), 0.2);
}

/* BOTOES PADRÃO */
.btn-finalizar {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 15px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s ease;
  background: var(--primary-mounjaro); /* Botão principal na cor roxa */
  color: #fff;
  animation: pulse 2s infinite;
  box-shadow: 0 8px 20px rgba(var(--primary-mounjaro), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-finalizar:hover {
  opacity: 0.9;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(var(--primary-mounjaro), 0.4);
}

.btn-finalizar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
    box-shadow: none;
    transform: translateY(0);
}


/* BLOCO PIX GERADO */
#pixGerado {
  background: #ffffff;
  padding: 35px;
  border-radius: 20px;
  margin-top: 35px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.6s ease-in-out;
  color: var(--text-dark);
}

#pixGerado h2 {
  font-size: 26px;
  color: var(--primary-mounjaro); /* Título do Pix na cor roxa */
  margin-bottom: 30px;
  font-weight: 700;
  text-align: center;
}

.pix-qrcode img {
  width: 250px;
  height: 250px;
  margin: 0 auto 30px auto;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#copyPix {
  width: 100%;
  background: #eff3f7;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  padding: 20px;
  font-size: 17px;
  font-weight: 500;
  text-align: center;
  color: var(--text-dark);
  cursor: pointer;
  font-family: 'Poppins', monospace;
  user-select: all;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-sizing: border-box;
  margin-bottom: 25px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}

#copyPix:hover {
    background: #e5e9ee;
}

.btn-copiar-pix {
  background: var(--primary-mounjaro); /* Botão de copiar na cor roxa */
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin: 15px 0 30px;
  transition: 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(var(--primary-mounjaro), 0.2);
}
.btn-copiar-pix i {
  margin-right: 10px;
  font-size: 18px;
}

.btn-copiar-pix:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--primary-mounjaro), 0.3);
}

.tempo-pix {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 20px;
    font-weight: 500;
}

.tempo-pix strong {
    color: #dc3545; /* Mantido vermelho para o tempo de expiração */
    font-weight: 700;
}

/* ANIMAÇÕES */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* STATUS PAGAMENTO */
.status-pagamento {
  background: var(--primary-mounjaro); /* Fundo roxo/azul para forte destaque */
  border: 1px solid var(--primary-mounjaro);
  color: #fff; /* Texto em branco para alto contraste */
  font-size: 18px; /* Fonte maior para melhor leitura */
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: 700; /* Texto em negrito forte */
  margin-top: 30px;
  animation: fadeIn 0.4s ease-in-out;
  box-shadow: 0 5px 15px rgba(var(--primary-mounjaro), 0.3); /* Sombra mais proeminente */
}

.status-pagamento .ponto {
  color: #fff; /* Pontos em branco para se destacarem */
  font-size: 24px;
  margin-left: 3px;
  animation: loadingdots 1.5s infinite;
}

/* Animação para os pontos de carregamento */
.status-pagamento .ponto:nth-child(1) { animation-delay: 0s; }
.status-pagamento .ponto:nth-child(2) { animation-delay: 0.2s; }
.status-pagamento .ponto:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingdots {
    0%, 80%, 100% { transform: scale(0); opacity: 0; }
    40% { transform: scale(1); opacity: 1; }
}


/* MODAL - Inclui o efeito de blur no fundo */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6); /* Fundo semi-transparente para o blur */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease; /* Transição para sumir */

  backdrop-filter: blur(5px); /* Efeito de desfoque */
  -webkit-backdrop-filter: blur(5px); /* Para compatibilidade com Safari */
}

/* Classe para quando o overlay está ativo (visível) */
.overlay.active {
  opacity: 1;
  visibility: visible;
}


.modal {
  background: #fff;
  max-width: 380px;
  padding: 35px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  /* Animação de escala para o modal surgir */
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

/* Quando o overlay estiver ativo, o modal também se anima para o tamanho normal */
.overlay.active .modal {
    transform: scale(1);
}

/* Estilo para o botão OK do modal */
.modal button {
  padding: 14px 30px;
  background: var(--primary-mounjaro); /* Usando a cor primária do site*/
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease; /* Adiciona transição de transform */
  box-shadow: 0 4px 10px rgba(var(--primary-mounjaro), 0.2);
}

.modal button:hover {
    background: #3f2b96; /* Tom mais escuro no hover*/
    transform: translateY(-1px); /* Efeito de leve levantamento no hover */
}


/* RODAPÉ */
.rodape {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 1px solid #eee;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
}

.rodape .icones {
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  justify-content: center;
}

.rodape .icones i {
  margin: 0 8px;
  color: var(--primary-mounjaro);
  font-size: 16px;
}

/* RESPONSIVO */
@media(max-width:480px){
  .container { padding: 25px; margin: 15px auto; }
  h2 { font-size: 20px; margin-bottom: 25px;}
  .btn-finalizar { font-size: 16px; padding: 16px; }
  .pix-qrcode img { width: 220px; height: 220px; margin-bottom: 25px;}
  #pixGerado h2 { font-size: 22px; margin-bottom: 25px;}
  .input-group input { font-size: 14px; padding: 12px 12px 12px 45px;}
  .input-group i { font-size: 15px; left: 15px; }

  /* Ajustes para o banner responsivo */
  .banner-title { font-size: 28px; }
  .banner-subtitle { font-size: 16px; }
  .offer-price { font-size: 24px; }
}

/* DESTACAR INPUT COM ERRO */
.input-group.erro input {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.2) !important;
}

/* REMOVER FUNDO AZUL DE INPUTS PREENCHIDOS */
input:-webkit-autofill {
  box-shadow: 0 0 0 1000px #fdfdfd inset !important;
  -webkit-text-fill-color: var(--text-dark) !important;
}