/* ai-lite-chatbot style.css */

/* Floating root */
.ai-chat-floating {
  position: fixed;
  bottom: 24px;
  z-index: 10000;
  pointer-events: none;
}
.ai-chat-align-right { right: 24px; }
.ai-chat-align-left { left: 24px; }

/* Round chat button */
.ai-chat-button {
  pointer-events: auto;
  width: 200px;
  height: 30px;
  background: linear-gradient(135deg,#4a6cf7 0%,#6b8cff 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(49,58,130,0.20);
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease;
  color: #fff;
}
@media (max-width: 480px) {
  .ai-chat-button {
    width: 160px !important;
    height: 30px !important;
    border-radius: 6px !important;
  }
}


/* hide when chat open */
.ai-chat-button.hidden {
  transform: scale(.86);
  opacity: 0;
  pointer-events: none;
}

/* Chat panel */
.ai-chat-wrapper {
  pointer-events: auto;
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 520px;
  max-height: 86vh;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(16,24,64,0.16);
  display: none;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 12px;
}

/* Header */
.ai-chat-header {
  background: linear-gradient(90deg,#4a6cf7 0%,#6b8cff 100%);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
}
.ai-chat-title { margin-right: 12px; }
.ai-chat-close {
  background: rgba(255,255,255,0.12);
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Body */
.ai-chat-body {
  padding: 14px;
  overflow-y: auto;
  background: #f7f8fb;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

/* Messages */
.ai-msg {
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 78%;
  line-height: 1.4;
  font-size: 14px;
}
.ai-user { background: #e7edff; align-self: flex-end; color: #0b2c8a; }
.ai-bot  { background: #ffffff; align-self: flex-start; color: #2b2b2b; box-shadow: 0 1px 0 rgba(0,0,0,0.03); }

/* Footer */
.ai-chat-footer {
  padding: 10px;
  border-top: 1px solid rgba(0,0,0,0.05);
  display: flex;
  gap: 8px;
  align-items: center;
}
.ai-chat-input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e6e9f2;
  outline: none;
  font-size: 14px;
}
.ai-chat-send {
  background: linear-gradient(90deg,#4a6cf7,#6b8cff);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

/* Responsive */
@media (max-width:480px){
  .ai-chat-wrapper { width: 92vw; height: 72vh; right: 4vw; left: 4vw; bottom: 20px; }
  .ai-chat-button { width: 56px; height: 56px; }
}

/* small animation for pop-in */
.ai-chat-wrapper.animate-open {
  animation: popIn .18s ease both;
}
@keyframes popIn {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
