/* =========================================================
   CROON ASSISTANT — UI PREMIUM EDITION
   ========================================================= */

.croon-ai-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* Nút mở chat */
.croon-ai-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: #E53935;
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  cursor: pointer;
  transition: .2s ease;
}
.croon-ai-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
}

/* PANEL CHAT */
.croon-ai-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: 75px;
  width: 360px;
  max-height: 560px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(0,0,0,.22);
  animation: slideUp .25s ease;
  border: 1px solid #eee;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* HEADER */
.croon-ai-header {
  background: #111;
  color: #fff;
  padding: 14px 16px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.croon-ai-header strong {
  font-weight: 600;
  font-size: 16px;
}
.croon-ai-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* KHUNG TIN NHẮN */
.croon-ai-messages {
  padding: 20px 16px !important;
  height: 380px;
  overflow-y: auto;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* BUBBLE CHAT — PREMIUM */
.croon-ai-msg {
  padding: 12px 16px !important;
  max-width: 82%;
  border-radius: 16px;
  line-height: 1.55;
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  animation: fadeIn .25s ease;
  white-space: pre-line;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* BOT — bên trái */
.croon-ai-msg.bot {
  background: #ffffff;
  border: 1px solid #eee;
  margin-right: auto;
  border-bottom-left-radius: 6px;
}

/* USER — bên phải */
.croon-ai-msg.user {
  background: #E53935;
  color: #fff;
  font-weight: 600;
  margin-left: auto;
  border-bottom-right-radius: 6px;
  text-align: right;
}

/* INPUT BAR */
.croon-ai-input {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid #eee;
  background: #fff;
}
.croon-ai-input input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: .2s;
}
.croon-ai-input input:focus {
  border-color: #E53935;
}
.croon-ai-input button {
  height: 42px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  background: #E53935;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: .2s;
}
.croon-ai-input button:hover {
  background: #c62828;
}

/* BUTTON "Xem tất cả gợi ý" */
.croon-btn-suggest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #111;
  color: #fff !important;
  padding: 12px 18px;
  margin-top: 14px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: .25s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.croon-btn-suggest:hover {
  transform: scale(1.04);
  background: #000;
}

/* BUTTON Xem sản phẩm */
.croon-btn-view {
  display: block;
  text-align: center;
  background: #E53935;
  color: #fff !important;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 10px;
  transition: .25s;
}
.croon-btn-view:hover {
  background: #c62828;
  transform: scale(1.03);
}
