/* ===== VTH Chat Bot - giao diện đồng bộ theme cyberpunk ===== */
.vth-chat-fab {
  position: fixed;
  bottom: 24px;
  left: 24px; /* tránh đè nút Ngân hàng (góc phải) */
  z-index: 9990;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(0, 245, 212, 0.5);
  background: rgba(10, 10, 15, 0.9);
  color: #00f5d4;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.35), 0 4px 20px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}
.vth-chat-fab:hover {
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.7), 0 4px 24px rgba(0, 0, 0, 0.7);
  transform: scale(1.08);
  color: #f72585;
  border-color: rgba(247, 37, 133, 0.6);
}
.vth-chat-fab .vth-chat-fab-icon { line-height: 1; }
.vth-chat-fab .vth-chat-fab-close { display: none; line-height: 1; }
.vth-chat-fab.vth-open .vth-chat-fab-icon { display: none; }
.vth-chat-fab.vth-open .vth-chat-fab-close { display: block; }

/* Panel chat */
.vth-chat-panel {
  position: fixed;
  bottom: 92px;
  left: 24px;
  z-index: 9991;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 140px);
  display: none;
  flex-direction: column;
  background: rgba(10, 10, 15, 0.96);
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.15), 0 12px 40px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  font-family: 'JetBrains Mono', monospace;
  user-select: text;
  -webkit-user-select: text;
}
.vth-chat-panel.vth-open { display: flex; animation: vthChatIn 0.25s ease; }
@keyframes vthChatIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* Header */
.vth-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(0, 245, 212, 0.12), rgba(247, 37, 133, 0.12));
  border-bottom: 1px solid rgba(0, 245, 212, 0.25);
}
.vth-chat-status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #00f5d4;
  box-shadow: 0 0 8px #00f5d4;
  animation: vthPulse 2s infinite;
}
@keyframes vthPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.vth-chat-title { color: #e0e0e0; font-size: 14px; font-weight: 600; letter-spacing: 0.5px; }
.vth-chat-subtitle { color: #888; font-size: 10px; margin-left: auto; }

/* Body */
.vth-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 245, 212, 0.4) transparent;
}
.vth-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.vth-msg a { color: #00f5d4; text-decoration: underline; }
.vth-msg code {
  background: rgba(255,255,255,0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.vth-msg pre {
  background: rgba(0,0,0,0.4);
  padding: 8px 10px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  margin: 6px 0;
}
.vth-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.22), rgba(0, 245, 212, 0.1));
  border: 1px solid rgba(0, 245, 212, 0.35);
  color: #e0e0e0;
}
.vth-msg-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e0e0e0;
}
.vth-msg-error {
  align-self: flex-start;
  background: rgba(247, 37, 133, 0.15);
  border: 1px solid rgba(247, 37, 133, 0.4);
  color: #ffb3d1;
}
.vth-typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 2px;
}
.vth-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #00f5d4;
  animation: vthBounce 1.2s infinite;
}
.vth-typing span:nth-child(2) { animation-delay: 0.15s; }
.vth-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes vthBounce { 0%,60%,100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-6px); opacity: 1; } }

/* Chips gợi ý */
.vth-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 8px;
}
.vth-chip {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: #00f5d4;
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.35);
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.vth-chip:hover { background: rgba(0, 245, 212, 0.2); box-shadow: 0 0 10px rgba(0, 245, 212, 0.3); }

/* Input */
.vth-chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 245, 212, 0.2);
  background: rgba(0, 0, 0, 0.35);
}
.vth-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 9px 14px;
  color: #e0e0e0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.vth-chat-input:focus {
  border-color: rgba(0, 245, 212, 0.6);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.2);
}
.vth-chat-input::placeholder { color: #666; }
.vth-chat-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(0, 245, 212, 0.5);
  background: rgba(0, 245, 212, 0.12);
  color: #00f5d4;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.vth-chat-send:hover:not(:disabled) {
  background: rgba(0, 245, 212, 0.25);
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
}
.vth-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* Mobile */
@media (max-width: 480px) {
  .vth-chat-panel {
    left: 8px; right: 8px;
    width: auto;
    bottom: 84px;
    height: calc(100vh - 110px);
  }
  .vth-chat-fab { left: 16px; bottom: 16px; }
}
