/* Estilos Gerais do Popup */
#popupBrinde {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  font-size: 16px;
  line-height: 1.5;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  padding: 20px 40px;
  overflow-y: auto;
  text-align: left;
}

#popupBrinde * {
  box-sizing: border-box;
}

#popupBrinde h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

#popupBrinde .subtitle {
  margin-top: 0;
}

/* Barra de Progresso */
#popupBrinde .progress-bar-container {
  margin: 30px 0;
  position: relative;
}
#popupBrinde .progress-bar {
  height: 10px;
  border-radius: 5px;
  position: relative;
  margin-bottom: 50px;
}
#popupBrinde .progress-fill {
  height: 10px;
  border-radius: 5px;
  width: 0%;
  transition: width 0.5s ease;
}

/* Marcos (Milestones) */
#popupBrinde .milestones {
  position: absolute;
  top: -15px;
  left: 0;
  right: 0;
  height: 36px;
  z-index: 1;
}
#popupBrinde .milestone {
  position: absolute;
  transform: translateX(-50%);
  text-align: center;
}
#popupBrinde .milestone .icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 18px;
  transition: background-color 0.5s ease;
}
#popupBrinde .milestone small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

/* Lista de Brindes */
#popupBrinde .brindes-todos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#popupBrinde .brinde-info {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 10px;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border: none;
}
#popupBrinde .brinde-info img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: contain;
  margin: 0;
}
#popupBrinde .brinde-info.desativado {
  opacity: 0.6;
}
#popupBrinde .brinde-info.desativado::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 1;
}
#popupBrinde .brinde-info.desativado .texto {
  pointer-events: none;
}
#popupBrinde .brinde-info .texto {
  position: relative;
  z-index: 2;
  font-size: 14px;
}

#popupBrinde .brinde-info button.receber-brinde {
  border: none !important;
  padding: 6px 12px !important;
  border-radius: 5px !important;
  cursor: pointer;
  margin-top: 10px;
  text-transform: none !important;
  line-height: 1.5 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  display: inline-block;
  width: auto;
}
#popupBrinde .receber-brinde:disabled {
  cursor: not-allowed;
  opacity: 1;
}

#popupBrinde .fechar {
  position: absolute;
  right: 15px;
  top: 15px;
  cursor: pointer;
  font-weight: bold;
  font-size: 20px;
  color: #888;
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
}
#popupBrinde .legenda {
  font-size: 12px;
  color: #666;
  margin-top: 15px;
}

/* Botão Flutuante e Notificações */
.btnPopup {
  position: fixed;
  z-index: 10000;
  /* left e bottom removidos -> agora vêm do PHP */
}

#btnAbrirPopup {
  background: none !important;
  border: none !important;
  cursor: pointer;
  position: relative;
  box-shadow: none;
  font-size: 42px !important;
  line-height: 1;
  /* padding e margin removidos -> agora vêm do PHP */
}
.notification-bubble {
  border-radius: 50%;
  padding: 2px 6px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  position: absolute;
  top: -10px;
  right: -2px;
}

/* --- CORREÇÃO DA MENSAGEM --- */
.notification-message {
  display: none;
  position: absolute;
  /* Posicionamento corrigido: */
  bottom: 60px; /* Acima do botão */
  left: 60px; /* À direita do botão */

  background-color: #762342; /* Você pode querer tornar isso dinâmico depois */
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 9999;
}
/* Alinha o ícone da mensagem */
.notification-message i {
  margin-left: 5px;
}

/* Media query para mobile removido -> agora vem do PHP */
