/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: sans-serif;
}

/* Container principal */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 600px;
  margin: auto;
  border: 1px solid #ccc;
}

/* HEADER */
.chat-header {
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: #0088cc;
  color: #fff;
  height: 70px;
}
.back-btn {
  background: none;
  border: none;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
}
.back-btn svg {
  width: 24px;
  height: 24px;
}
.back-btn svg path {
  stroke: currentColor;
  fill: none;
}

.bot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 12px;
}

.chat-title {
  font-size: 1.4rem;
  font-weight: 600;
}

/* ÁREA DE MENSAGENS */
.chat-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #e5ddd5;
}

/* BOLHAS DE MENSAGEM */
.message {
  display: flex;
  margin-bottom: 10px;
}
.message.bot {
  justify-content: flex-start;
}
.message.user {
  justify-content: flex-end;
}
.bubble {
  max-width: 70%;
  padding: 10px;
  position: relative;
  line-height: 1.4;
}
.message.bot .bubble {
  background: #fff;
  border-radius: 10px 10px 10px 0;
}
.message.user .bubble {
  background: #dcf8c6;
  border-radius: 10px 10px 0 10px;
}

/* TIMESTAMP */
.timestamp {
  font-size: 0.7rem;
  color: #999;
  margin-top: 4px;
  text-align: right;
}

/* FOOTER / RODAPÉ */
.chat-input-area {
  display: flex;
  padding: 0;
  background: #f7f7f7;
  border-top: 1px solid #ccc;
}

/* BOTÃO INICIAR (full-width) */
.start-btn {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: 15px 0;
  background: #0088cc;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  /* Animação de pulso suave */
  animation: pulse 1.6s ease-in-out infinite;
}

/* Definição do keyframes para pulse */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* WRAPPER DO INPUT (oculto até o JS exibir) */
.input-wrapper {
  display: none;
  flex: 1;
  align-items: center;
  width: 100%;
}
.chat-input-area .input-wrapper input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 20px 0 0 20px;
  outline: none;
}
.chat-input-area .input-wrapper button {
  padding: 0 20px;
  border: none;
  background: #0088cc;
  color: #fff;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
}

/* ALERTA (imagem+texto) */
.message.alert {
  justify-content: center;
}
.message.alert .bubble {
  background: #fff;
  border-radius: 12px;
}

/* Scrollbar personalizado */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
}

/* Botão de seleção de plano, full-width e roxo como na imagem */
.btn-plan {
  position: relative;
  overflow: hidden;
  display: block;
  width: 75%;               /* de 70% para 80% */
  margin: 4px 0 0 5px;
  padding: 12px 0;           /* padding vertical aumentado */
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 1.1rem;         /* fonte um pouco maior */
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  animation: pulse 1.6s ease-in-out infinite;
}

/* Pseudo-elemento para o efeito de brilho */
.btn-plan::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  transform: skewX(-25deg);
  animation: shine 3s ease-in-out infinite;
}

/* Keyframes para o pulso */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Keyframes para o brilho passando */
@keyframes shine {
  0% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* Botões de opção de plano — 10% mais largos e fundo preto translúcido */
.btn-option {
  display: block;
  width: 100%;                    /* de 90% para 100% */
  margin: 4px 0 0 0;              /* remove deslocamento à esquerda para centralizar */
  padding: 14px 0;                /* aumenta padding vertical para ficar mais imponente */
  background: #0088cc; /* mesmo tom azul do cabeçalho */
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 12px;            /* levemente mais arredondado */
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

/* Hover dá um leve destaque */
.btn-option:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: scale(1.02);
}

.message.alert.qrcode {
  justify-content: flex-start !important;
}

.message.alert:not(.qrcode) {
  justify-content: center !important;
}

.message.qrcode .bubble {
  margin-left: 10px !important;
  align-self: flex-start !important;
}

.chat-input-area .input-wrapper button svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.menu-btn {
  background: none;
  border: none;
  margin-left: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-btn svg {
  fill: #fff;
}

.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.fullscreen-overlay img {
  max-width: 95%;
  max-height: 95%;
  border-radius: 10px;
}
.fullscreen-overlay .close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

/* Corrige exibição dos preços abaixo de cada botão de plano */
.bubble .btn-option:nth-of-type(1)::after {
  content: "49,90";
}
.bubble .btn-option:nth-of-type(2)::after {
  content: "38,90";
}
.bubble .btn-option:nth-of-type(3)::after {
  content: "24,90";
}
.bubble .btn-option:nth-of-type(4)::after {
  content: "69,90";
}

.bubble .btn-option::after {
  display: block;
  font-size: 1.1rem;
  color: #2ecc71;
  margin-top: 6px;
  font-weight: 700;
  text-shadow: 0 0 3px rgba(46, 204, 113, 0.5);
}

/* Efeito de brilho animado nos botões de plano */
.btn-option {
  position: relative;
  overflow: hidden;
}

.btn-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: skewX(-20deg);
  animation: brilho 2s infinite;
}

@keyframes brilho {
  0% {
    left: -75%;
  }
  50% {
    left: 125%;
  }
  100% {
    left: 125%;
  }
}

.chat-title-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: -4px; /* sobe levemente o bloco como um todo */
}

.chat-title {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.1;
}

.chat-status {
  font-size: 0.75rem;
  color: #c8f7c5;
  font-weight: 500;
  margin-top: 2px;
}

