#chatButton{ 
  position:fixed;
  bottom:25px;
  right:25px;
  width:60px;
  height:60px;
  background:#25d366;
  color:#fff;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  cursor:pointer;
  box-shadow:0 10px 25px rgba(0,0,0,0.2);
  z-index:99999;
  transition:.3s;
}

#chatButton:hover{
  transform:scale(1.08);
}

#chatPopup{
  position:fixed;
  bottom:95px;
  right:25px;
  width:360px;
  height:520px;
  background:#fff;
  border-radius:22px;
  box-shadow:0 20px 45px rgba(0,0,0,0.22);
  display:none;
  flex-direction:column;
  overflow:hidden;
  z-index:99999;
}

.chat-header{
  background:#f58220;
  color:#fff;
  padding:18px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-shrink:0;
}

.chat-header h3{
  font-size:15px;
  font-weight:700;
  margin:0;
}

#closeChat{
  cursor:pointer;
  font-size:22px;
  line-height:1;
}

.chat-body{
  flex:1;
  padding:18px 16px 10px;
  overflow-y:auto;
  background:#f7f7f7;
}

.chat-message{
  margin-bottom:14px;
  font-size:14px;
  line-height:1.5;
  padding:14px 15px;
  border-radius:16px;
  max-width:85%;
  word-wrap:break-word;
}

.chat-message.bot{
  background:#e5e7eb;
  color:#111827;
}

.chat-message.user{
  background:#f58220;
  color:#fff;
  margin-left:auto;
}

.chat-input{
  display:flex;
  border-top:1px solid #eee;
  background:#fff;
  flex-shrink:0;
}

.chat-input input{
  flex:1;
  border:none;
  padding:14px;
  font-size:14px;
  outline:none;
}

.chat-input button{
  background:#f58220;
  color:#fff;
  border:none;
  padding:0 18px;
  cursor:pointer;
  font-size:18px;
}

.typing-message{
  width:72px;
  padding:12px 14px;
}

.typing-dots{
  display:flex;
  align-items:center;
  gap:5px;
  height:12px;
}

.typing-dots span{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#9ca3af;
  display:inline-block;
  animation:chatTyping 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2){
  animation-delay:.15s;
}

.typing-dots span:nth-child(3){
  animation-delay:.3s;
}

@keyframes chatTyping{
  0%, 80%, 100%{
    transform:scale(.7);
    opacity:.5;
  }
  40%{
    transform:scale(1);
    opacity:1;
  }
}

@media(max-width:768px){
  #chatButton{
    width:56px;
    height:56px;
    bottom:20px;
    right:20px;
    font-size:24px;
  }

  #chatPopup{
    right:12px;
    left:12px;
    bottom:88px;
    width:auto;
    height:72vh;
    max-height:640px;
    border-radius:18px;
  }

  .chat-body{
    padding:16px 12px 10px;
  }
}