[data-chatbot] {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: min(340px, calc(100vw - 24px));
  font-size: 14px;
  box-shadow: 0 16px 38px rgba(2, 6, 23, 0.28);
  z-index: 99999;
  border-radius: 14px;
  overflow: hidden;
  font-family: "Poppins", sans-serif;
  transform: translateY(0);
  transition: box-shadow .25s ease, transform .25s ease;
}

[data-chatbot]:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.34);
}

.chat-header {
  background: linear-gradient(120deg, #0f172a, #1e3a8a);
  color: white;
  padding: 12px 14px;
  cursor: pointer;
  text-align: center;
  user-select: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.chat-body {
  display: none;
  background: #ffffff;
  max-height: 400px;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-top: 0;
}

[data-chatbot].chat-open .chat-body {
  display: flex;
  flex-direction: column;
}

.messages {
  padding: 10px;
  height: 280px;
  overflow-y: auto;
}

.message {
  margin-bottom: 10px;
  max-width: 92%;
  line-height: 1.35;
}

.message.bot {
  background-color: #eef2ff;
  color: #1e293b;
  padding: 8px;
  border-radius: 8px;
  text-align: left;
  white-space: pre-line;
  margin-right: auto;
}

.message.user {
  background-color: #0078d4;
  color: white;
  padding: 8px;
  border-radius: 8px;
  text-align: right;
  margin-left: auto;
}

.message.bot a {
  color: #1d4ed8;
  text-decoration: underline;
}

.chat-footer {
  display: flex;
  border-top: 1px solid #e2e8f0;
  padding: 10px;
  background-color: #f8fafc;
}

.chat-footer input {
  flex: 1;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.chat-footer button {
  margin-left: 10px;
  padding: 8px 12px;
  background-color: #0f172a;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.chat-footer button:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.chat-footer button:hover {
  background-color: #1e293b;
}

.chat-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 10px 10px;
  background: #f8fafc;
}

.chat-suggestion {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all .2s ease;
}

.chat-suggestion:hover {
  border-color: #1d4ed8;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.chat-typing {
  color: #64748b;
  font-size: 12px;
  padding: 0 10px 8px;
  display: none;
  background: #f8fafc;
}

[data-chatbot].is-typing .chat-typing {
  display: block;
}

@media (max-width: 992px) {
  [data-chatbot] {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 8px;
  }
}
