/* 
   CSS FINAL AJUSTADO - POPUP DE CUPOM (COM SPINNER CENTRALIZADO)
   Instruções: Substitua o conteúdo do seu arquivo CSS pelo código abaixo.
*/

.popupCupom {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center; 
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.popupCupom.is-open {
  opacity: 1;
  visibility: visible;
}

.popupCupom__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.popupCupom__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: none;
  border-radius: 32px; 
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popupCupom.is-open .popupCupom__dialog {
  transform: scale(1);
}

/* Cabeçalho Laranja */
.popupCupom__top {
  background: radial-gradient(circle at center, #ffffff 0%, #FFE0B2 100%);
  padding: 35px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.popupCupom__seal {
  width: 75px;
  height: 75px;
  background-color: #151e2c;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.2rem;
  box-shadow: 0 4px 15px rgba(255, 235, 59, 0.4);
}

.popupCupom__eyebrow {
  background: #ffffff;
  color: #8D6E63;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.popupCupom__body {
  padding: 15px 24px 30px;
  background: #ffffff;
}

.popupCupom__step {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.popupCupom__step.is-active {
  display: flex;
}

.popupCupom__title {
  font-size: 1.6rem;
  font-weight: 900;
  color: #1A1A1B;
  line-height: 1.2;
  margin-bottom: 5px;
}

.popupCupom__title strong {
  background: linear-gradient(to right, #E53935, #1A1A1B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}

.popupCupom__text {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.5;
  margin-bottom: 5px;
}

/* Lista de Benefícios (Etapa 1) */
.popupCupom__benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0;
  list-style: none;
}

.popupCupom__benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #F8F9FA;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333333;
  text-align: left;
}

.popupCupom__benefits li::before {
  content: '✓';
  width: 20px;
  height: 20px;
  background: #f08707;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
}

/* Formulário (Etapa 2) */
.popupCupom__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.popupCupom__label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1A1A1B;
  text-align: left;
  display: block;
}

.popupCupom__input {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid #151e2c; 
  color: #333333;
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.popupCupom__input:focus {
  box-shadow: 0 0 0 3px rgba(255, 213, 79, 0.2);
}

.popupCupom__btn {
  width: 100%;
  padding: 18px;
  border-radius: 16px;
  background: #101423;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 10px 20px rgba(16, 20, 35, 0.2);
}

.popupCupom__footer {
  font-size: 0.7rem;
  color: #999999;
  margin-top: 12px;
  line-height: 1.4;
}

/* --- CORREÇÃO DO SPINNER CENTRALIZADO --- */
.popupCupom__processing {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centraliza horizontalmente */
  justify-content: center; /* Centraliza verticalmente se necessário */
  gap: 20px;
  padding: 30px 0;
  width: 100%;
  text-align: center;
}

.popupCupom__spinner {
  width: 45px;
  height: 45px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #101423; /* Cor azul marinho */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: block;
  margin: 0 auto; /* Força a centralização horizontal */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
