
/* ChatBox   */

.chatbox {
  position: fixed;
  bottom: 95px;
  right: 25px;
  width: 360px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(0,0,0,.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
  z-index: 9999;
  animation: slideUp .3s ease;
}

.chatbox.open {
  display: flex;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.chat-header {
  background: linear-gradient(135deg, #007bff, #6610f2);
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.chat-header p {
  margin: 3px 0 0;
  font-size: .8rem;
  opacity: .9;
}

.chat-banner {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #fff;
}

.chat-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.chat-user-info {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.chat-user-info input {
  width: 50%;
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 9px 10px;
  outline: none;
  font-size: .85rem;
}

.chat-body {
  padding: 15px;
  height: 320px;
  overflow-y: auto;
  background: #f9fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-message {
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 85%;
  word-wrap: break-word;
  white-space: pre-line;
  font-size: .9rem;
  line-height: 1.4;
}

.chat-message.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #d34c8b, #e878aa);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-message.bot {
  align-self: flex-start;
  background: #eaeaea;
  color: #222;
  border-bottom-left-radius: 4px;
}

.chat-footer {
  display: flex;
  border-top: 1px solid #ddd;
  padding: 10px;
  background: #fff;
}

.chat-footer input {
  flex: 1;
  border: none;
  padding: 10px;
  border-radius: 20px;
  background: #f2f2f2;
  outline: none;
  font-size: .9rem;
  margin-right: 8px;
}

.chat-footer input:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #007bff40;
}

.chat-footer button {
  background: #007bff;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  cursor: pointer;
}

.chat-floating-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,.3);
  z-index: 9999;
}

.ai-box {
  border: 2px solid #fff;
  padding: 3px 5px;
  border-radius: 5px;
  font-weight: 800;
  font-size: 18px;
}

.ai-star {
  position: absolute;
  top: 9px;
  right: 10px;
  font-size: 16px;
}