body {
  font-family: 'Onest', sans-serif;
  padding: 30px;
  color: #1c1c1e;
}

.chat-container {
  margin: 60px auto;
  background: white;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 0 15px rgba(0,0,0,0.08);
  border: 2px solid #f8d7da;
}

h2 {
  text-align: center;
  color: #d49ca4;
  font-weight: 400;
  margin-bottom: 20px;
  font-family: 'Maxima Nouva', sans-serif;
  letter-spacing: 0.5px;


}

#chat-box {
  height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 12px;
  background: #fffafc;
}

.user-msg {
  text-align: right;
  max-width: 75%;
  margin-left: auto;
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid #e0c36f;
  color: #1c1c1e98;
  padding: 10px 14px;
  border-radius: 20px 20px 0 20px;
  line-height: 1.6;
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
  font-size: 14px;

}

.bot-msg {
  text-align: left;
  max-width: 75%;
  margin-right: auto;
  margin-bottom: 12px;
  background: #f8d7da;
  color: #1c1c1e98;
  padding: 10px 14px;
  border-radius: 20px 20px 20px 0;
  line-height: 1.6;
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
  font-size: 14px;
}

.typing {
  font-style: italic;
  color: #888;
  padding: 5px;
}

input[type="text"] {
  width: 78%;
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

button {
  background-color: #b8717b;
  color: white;
  padding: 5px 20px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  animation: pulse 1.5s infinite ease-in-out;

}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(184, 113, 123, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(184, 113, 123, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 113, 123, 0); }
}

button:active {
  transform: scale(0.96);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) inset;
}

.dot-animation span {
  animation: blink 1.4s infinite;
  font-weight: bold;
  font-size: 16px;
}

.dot-animation span:nth-child(2) {
  animation-delay: 0.2s;
}
.dot-animation span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% { opacity: 0.2; }
  20% { opacity: 1; }
  100% { opacity: 0.2; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.chat-input-wrapper input[type="text"] {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  height: 20px;
}

.botao-enviar {
  background-color: #b8717b;
  border: none;
  border-radius: 10px;
  width: 48px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.botao-enviar .material-icons {
  color: white;
  font-size: 22px;
}

.botao-enviar:hover {
  background-color: #a75e67;
  transform: scale(1.05);
}

.botao-enviar:active {
  transform: scale(0.96);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.patricia-intro-container {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: #fff1f3;
  border-left: 4px solid #b8717b;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  animation: fadeIn 1s ease-in-out;
  animation: slideInLeft 0.8s ease-out;

}

.patricia-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
}

.patricia-intro {
  white-space: pre-line;
  font-family: 'Maxima Nouva', sans-serif;
  font-size: 16px;
  color: #b8717b;
}

/* =========================
   GLAM Lead Card (Form)
   ========================= */

#lead-card.lead-card{
  position: relative;
  border-radius: 18px;
  padding: 18px 16px 16px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

input#lead-insta {
  width: 91%;
}

/* brilho suave (bem Glam) */
#lead-card.lead-card::before{
  content:"";
  position:absolute;
  inset: -2px;
  background: radial-gradient(600px 260px at 18% 0%,
              rgba(255, 210, 226, .55),
              rgba(255,255,255,0) 60%);
  pointer-events:none;
}

/* contorno sofisticado */
#lead-card.lead-card::after{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.06);
  pointer-events:none;
}

.lead-title{
  position: relative;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .2px;
  color: #111;
  margin-bottom: 4px;
}

.lead-subtitle{
  position: relative;
  font-size: 12.5px;
  color: rgba(0,0,0,.62);
  margin-bottom: 14px;
  line-height: 1.35;
}

/* grid */
.lead-grid{
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  justify-items: center


}

/* inputs */
.lead-grid input{
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.9);
  padding: 0 12px;
  font-size: 13.5px;
  color: #111;
  outline: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

/* placeholder mais chic */
.lead-grid input::placeholder{
  color: rgba(0,0,0,.38);
}

/* focus glam */
.lead-grid input:focus{
  border-color: rgba(0,0,0,.20);
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
  transform: translateY(-1px);
}

/* botão */
.lead-btn{
  position: relative;
  width: 100%;
  margin-top: 12px;
  height: 46px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: .2px;
  color: #fff;
  background: linear-gradient(180deg, #ffb0b0 0%, #8f8f8f 100%);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

/* hover */
.lead-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(0,0,0,.22);
  filter: brightness(1.02);
}

/* clique */
.lead-btn:active{
  transform: translateY(0px);
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
}

/* erro */
#lead-erro.lead-erro{
  position: relative;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(176, 0, 32, .06);
  border: 1px solid rgba(176, 0, 32, .12);
  color: #8a0018;
  font-size: 12.5px;
  line-height: 1.3;
}

/* mobile */
@media (max-width: 560px){
  .lead-grid{ grid-template-columns: 1fr; }
  .lead-grid input{ height: 46px; }
}

/* opcional: micro “badge” Glam no topo */
.lead-title::after{
  content:"GLAM";
  margin-left: 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: rgba(0,0,0,.55);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.06);
  vertical-align: middle;
}



/* mobile */
@media (max-width: 560px){
  .lead-grid{ grid-template-columns: 1fr; }
}


@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =========================
   Inputs com ícones (GLAM)
   ========================= */

.field{
  position: relative;
}

.field input{
  padding-left: 40px; /* espaço pro ícone */
}

/* base do ícone */
.field::before{
  content:"";
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  width:16px;
  height:16px;
  opacity:.55;
  pointer-events:none;
  background-size:16px 16px;
  background-repeat:no-repeat;
}

/* Nome */
.icon-user::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.5 20.25a8.25 8.25 0 0115 0'/%3E%3C/svg%3E");
}

/* WhatsApp */
.icon-whatsapp::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M19.11 17.59c-.3-.15-1.77-.87-2.04-.97-.27-.1-.47-.15-.66.15-.2.3-.77.97-.94 1.17-.17.2-.35.22-.65.07-.3-.15-1.27-.47-2.42-1.5-.89-.8-1.5-1.8-1.67-2.1-.17-.3-.02-.47.13-.62.13-.13.3-.35.45-.52.15-.17.2-.3.3-.5.1-.2.05-.37-.02-.52-.07-.15-.66-1.6-.9-2.2-.24-.58-.48-.5-.66-.5-.17 0-.37-.02-.57-.02-.2 0-.52.07-.8.37-.27.3-1.05 1.02-1.05 2.5 0 1.47 1.08 2.9 1.23 3.1.15.2 2.13 3.25 5.17 4.56.72.3 1.28.48 1.72.61.72.23 1.37.2 1.88.12.57-.08 1.77-.72 2.02-1.42.25-.7.25-1.3.17-1.42-.08-.12-.27-.2-.57-.35z'/%3E%3C/svg%3E");
}

/* Cidade */
.icon-city::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23000'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='M12 21s6-5.686 6-10a6 6 0 10-12 0c0 4.314 6 10 6 10z'/%3E%3Ccircle cx='12' cy='11' r='2.5' fill='%23000'/%3E%3C/svg%3E");
}

/* Instagram */
.icon-instagram::before{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2C4.243 2 2 4.243 2 7v10c0 2.757 2.243 5 5 5h10c2.757 0 5-2.243 5-5V7c0-2.757-2.243-5-5-5H7zm10 2a3 3 0 013 3v10a3 3 0 01-3 3H7a3 3 0 01-3-3V7a3 3 0 013-3h10zm-5 3a5 5 0 100 10 5 5 0 000-10zm0 2a3 3 0 110 6 3 3 0 010-6zm4.75-.75a1.25 1.25 0 11-2.5 0 1.25 1.25 0 012.5 0z'/%3E%3C/svg%3E");
}

/* efeito focus elegante */
.field input:focus + *{}
.field:focus-within::before{
  opacity:.85;
}


/* =========================
   MOBILE UPGRADE (GLAM)
   Cole no final do arquivo
   ========================= */

:root{
  --mobile-pad: 14px;
  --mobile-radius: 18px;
}

/* iOS: evita zoom ao focar input */
input, textarea, select{
  font-size: 16px;
}

/* Melhor uso de tela no mobile */
@media (max-width: 560px){
  body{
    padding: 0;            /* remove o “margem gigante” no iframe */
    margin: 0;
    height: 100vh;
    overflow: hidden;

  }

  .chat-container{
    margin: 0;             /* remove 60px auto */
    border-radius: 0;      /* sensação de “app” */
    border: 0;
    box-shadow: none;
    padding: var(--mobile-pad);
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    justify-content: flex-end;
    align-items: center;      /* evita scroll duplo (modal + iframe) */
  }

  h2{
    font-size: 22px;
    margin: 6px 0 14px;
  }

  .patricia-intro-container{
    padding: 12px;
    gap: 12px;
    margin-bottom: 14px;
    border-radius: var(--mobile-radius);
  }

  .patricia-avatar{
    width: 42px;
    height: 42px;
  }

  .patricia-intro{
    font-size: 14.5px;
    line-height: 1.35;
  }

  /* Lead card mais compacto */
  #lead-card.lead-card{
    border-radius: var(--mobile-radius);
    padding: 14px 12px 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.10);
  }

  .lead-title{ font-size: 14px; }
  .lead-subtitle{ font-size: 12.5px; }

  .lead-grid{
    grid-template-columns: 1fr; /* já tinha, reforçando */
    gap: 10px;
  }

  .lead-grid input{
    height: 48px;           /* dedo agradece */
    border-radius: 14px;
    font-size: 15px;
  }

  .lead-btn{
    height: 50px;
    border-radius: 14px;
    font-size: 15px;
  }

  /* Chat box cresce e rola (sem cortar) */
  #chat-box{
    flex: 1;
    height: auto;           /* substitui 200px fixo */
    min-height: 160px;
    border-radius: 14px;
    margin-bottom: 12px;
  }

  .user-msg,
  .bot-msg{
    max-width: 88%;
    font-size: 14px;
    line-height: 1.45;
  }

  /* Barra de digitação fixa no final */
  .chat-input-wrapper{
    gap: 10px;
    margin-top: 10px;
    padding-bottom: env(safe-area-inset-bottom); /* iPhone */
    flex-shrink: 0;
  }

  .chat-input-wrapper input[type="text"]{
    height: 48px;
    padding: 0 14px;
    border-radius: 14px;
  }

  .botao-enviar{
    width: 52px;
    height: 48px;
    border-radius: 14px;
  }
}

/* Extra: celulares bem pequenos */
@media (max-width: 380px){
  h2{ font-size: 20px; }
  .patricia-intro{ font-size: 14px; }
  .lead-grid input{ height: 46px; }
  .lead-btn{ height: 48px; }
}
@media (max-width: 560px){
  /* enquanto o lead-card estiver visível, não faz sentido mostrar chat-box */
  #chat-box{
    display: none;
  }

  /* e deixa o container poder rolar pra ver todos os campos */
  .chat-container{
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
