/* === Bong bóng Chatbot STV === */
#stv-chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  font-family: 'Segoe UI', sans-serif;
}

/* Bong bóng nhỏ */
#stv-bubble {
  width: 60px;
  height: 60px;
  background: #4608AB;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  animation: stvPulse 2s infinite;
  transition: all 0.3s;
}
#stv-bubble:hover { transform: scale(1.08); }
#stv-bubble img {
  width: 34px;
  height: 34px;
}

/* Hiệu ứng vầng sáng */
@keyframes stvPulse {
  0% { box-shadow: 0 0 0 0 rgba(70,8,171, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(70,8,171, 0); }
  100% { box-shadow: 0 0 0 0 rgba(70,8,171, 0); }
}

/* Khung chat nổi */
#stv-chatbox {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 340px;
  height: 420px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: stvFadeIn 0.3s ease;
}

.stv-hidden {
  display: none;
}

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

/* Header */
#stv-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stv-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #ddd;
}
.stv-name {
  font-weight: 600;
  color: #222;
  font-size: 14px;
}
.stv-status {
  font-size: 12px;
  color: #666;
}
.stv-dot {
  width: 8px;
  height: 8px;
  background: #00c853;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
#stv-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #555;
  cursor: pointer;
}

/* Body */
#stv-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background: #f8f8f8;
}
.stv-message {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  display: inline-block;
  max-width: 80%;
  line-height: 1.4;
  font-size: 14px;
}
.stv-message.bot {
  background: #eee;
  color: #333;
}
.stv-message.user {
  background: #4608AB;
  color: #fff;
  float: right;
  border-bottom-right-radius: 3px;
}

/* Input */
#stv-input-box {
  display: flex;
  border-top: 1px solid #eee;
  background: #fff;
}
#stv-input {
  flex: 1;
  border: none;
  padding: 10px;
  resize: none;
  font-size: 14px;
  outline: none;
}
#stv-send {
  background: #4608AB;
  color: #fff;
  border: none;
  width: 40px;
  cursor: pointer;
  font-size: 18px;
  transition: 0.2s;
}
#stv-send:hover {
  opacity: 0.85;
}

/* Responsive */
@media(max-width:600px){
  #stv-chatbox {
    width: 90vw;
    height: 70vh;
    right: -10px;
  }
}
