.chat-widget {
  position: fixed;
  bottom: 50px;
  right: 50px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

/* ข้อความต้อนรับ */
.chat-welcome {
  background: #7B191A;;
  color: #fff;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  margin-bottom: 8px;
  animation: fadeInUp .4s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ปุ่มหลัก */
.chat-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #7B191A;;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.chat-button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.28); }
.chat-button img { width: 30px; height: 30px; }

/* Popup */
.chat-popup {
  position: absolute;
  bottom: 70px;
  right: -5px;
  border-radius: 14px;
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.chat-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.chat-item:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.2); background: #f8f8f8; }

/* Tooltip */
.chat-item::after {
  content: attr(data-title);
  position: absolute;
  right: 60px;
  white-space: nowrap;
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transform: scale(.98);
  transition: opacity .15s ease, transform .15s ease;
}
.chat-item:hover::after { opacity: 1; transform: scale(1); }
.chat-item::before {
  content: "";
  position: absolute;
  right: 50px;
  border: 6px solid transparent;
  border-left-color: rgba(0,0,0,.85);
  opacity: 0;
  transition: opacity .15s ease;
}
.chat-item:hover::before { opacity: 1; }

.chat-widget.open .chat-popup { display: flex; }