* { box-sizing: border-box; }

.chatbot-container {
  max-width: 950px;
  margin: 30px auto;
  padding: 20px;
  animation: fadeInUp 0.5s ease forwards;
}

.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.chatbot-title  { font-size: 26px; color: #042B56; margin: 0; font-weight: 400; }
.client-name    { font-weight: 500; }
.vendor-name    { font-weight: 500; }

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 50px;
  border: 1px solid rgba(155,184,214,0.55);
  background: linear-gradient(180deg,#ffffff 0%,#f4f8ff 100%);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: #042B56;
  box-shadow: 0 4px 10px rgba(15,90,200,0.08), inset 0 0 0 1px rgba(255,255,255,0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15,90,200,0.12), inset 0 0 0 1px rgba(255,255,255,0.8);
  color: #042B56;
}

.nav-btn:active  { transform: scale(0.97); }
.nav-btn.disabled { opacity: 0.35; pointer-events: none; }

.page-info { font-size: 13px; color: #6b7b8b; padding: 0 6px; white-space: nowrap; }

.chat-window {
  background: linear-gradient(180deg,#ffffff 0%,#f4f8ff 100%);
  border: 1px solid rgba(155,184,214,0.35);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 12px 30px rgba(15,90,200,0.10), 0 2px 6px rgba(0,0,0,0.05), inset 0 0 0 1px rgba(255,255,255,0.65);
  overflow: visible;
  height: auto;
}

.chat-row { display: flex; align-items: flex-end; width: 100%; gap: 10px; }
.chat-row.bot  { justify-content: flex-start; }
.chat-row.user { justify-content: flex-end; }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  border: 1px solid rgba(155,184,214,0.35);
  box-shadow: 0 3px 8px rgba(15,90,200,0.08);
}

.bot-avatar  { background: linear-gradient(180deg,#ffffff 0%,#f4f8ff 100%); color: #042B56; }
.user-avatar { background: linear-gradient(90deg,#0B335A,#1f5e9d); color: white; }

.chat-bubble {
  max-width: 68%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.65;
  word-break: break-word;
}

.bot-bubble {
  background: #ffffff;
  border: 1px solid rgba(155,184,214,0.35);
  color: #042B56;
  box-shadow: 0 6px 16px rgba(15,90,200,0.08), inset 0 0 0 1px rgba(255,255,255,0.6);
  border-radius: 4px 18px 18px 18px;
}

.user-bubble {
  background: linear-gradient(135deg,#0B335A,#1f5e9d);
  color: #fff;
  box-shadow: 0 6px 16px rgba(11,51,90,0.2);
  border-radius: 18px 18px 4px 18px;
}

.chat-divider { border: none; border-top: 1px solid rgba(155,184,214,0.25); margin: 4px 0; }

.empty-state       { text-align: center; padding: 48px 20px; color: #6b7b8b; font-size: 15px; }
.empty-state-icon  { font-size: 36px; margin-bottom: 12px; display: block; opacity: 0.5; }

.pagination-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  background: transparent;
  color: #042B56;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.page-link:hover {
  background: #042b56;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(4,43,86,0.15);
}

.page-link.active {
  background: #042b56;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(4,43,86,0.25);
}

.page-dots { color: #042b56; font-size: 16px; padding: 0 2px; }

.page-nav-btn {
  background: none;
  border: none;
  color: #042b56;
  cursor: pointer;
  font-size: 18px;
  padding: 6px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  line-height: 1;
}

.page-nav-btn:hover    { transform: translateY(-1px); opacity: 0.7; }
.page-nav-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

.page-text-nav { font-size: 13px; color: #042b56; cursor: pointer; padding: 4px 2px; transition: opacity 0.2s; }
.page-text-nav:hover  { opacity: 0.7; }
.page-text-nav.dimmed { opacity: 0.3; cursor: default; pointer-events: none; }

.pagination-count { text-align: center; color: #6b7b8b; font-size: 13px; margin-top: 10px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .chatbot-container { padding: 16px; margin: 16px auto; }
  .chat-window       { padding: 20px 16px; gap: 14px; }
  .chat-bubble       { max-width: 80%; font-size: 14px; padding: 12px 15px; }
  .avatar            { width: 32px; height: 32px; font-size: 13px; }
  .chatbot-title     { font-size: 22px; }
}

@media (max-width: 480px) {
  .chatbot-container { padding: 12px; }
  .chat-window       { padding: 16px 12px; border-radius: 14px; }
  .chat-bubble       { max-width: 86%; font-size: 13px; padding: 10px 13px; }
  .avatar            { width: 28px; height: 28px; font-size: 12px; }
  .chatbot-title     { font-size: 19px; }
  .nav-btn           { height: 34px; font-size: 13px; padding: 0 12px; }
  .page-link         { width: 32px; height: 32px; font-size: 12px; }
}

@media (max-width: 360px) {
  .chat-bubble   { max-width: 90%; }
  .chatbot-title { font-size: 17px; }
}

/* ── scroll reveal ── */
.chat-row {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.chat-row.visible {
  opacity: 1;
  transform: translateY(0);
}
