.chatbot-widget {
  font-family: system-ui, -apple-system, sans-serif;
}

/* Toggle Button (Bottom Right) */
.chatbot-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background: #00F5D4;
  color: #0F172A;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 245, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
}

/* Overlay */
.chatbot-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.chatbot-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Modal Window */
.chatbot-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 700px;
  height: 80vh;
  max-height: 600px;
  background: #0F172A; /* Dark Blue/Black */
  border: 1px solid #1E293B;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.chatbot-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

/* Header */
.chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #1E293B;
}

.chatbot-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.chatbot-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-agent-btn {
  color: #00F5D4;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.chatbot-close-btn {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  font-size: 14px;
}

.chatbot-close-btn:hover {
  color: #fff;
}

/* Body */
.chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.message.bot {
  align-self: flex-start;
  background: #1E293B;
  color: #E2E8F0;
  border-bottom-left-radius: 2px;
}

.message.user {
  align-self: flex-end;
  background: #00F5D4; /* Accent color */
  color: #0F172A;
  border-bottom-right-radius: 2px;
  font-weight: 500;
}

/* Footer / Input */
.chatbot-footer {
  padding: 20px 24px;
  border-top: 1px solid #1E293B;
}

.chatbot-input-wrapper {
  display: flex;
  background: #1E293B;
  border-radius: 8px;
  padding: 4px;
  border: 1px solid #334155;
}

.chatbot-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 12px 16px;
  font-size: 15px;
  outline: none;
}

.chatbot-input-wrapper button {
  background: #00F5D4;
  color: #0F172A;
  border: none;
  padding: 0 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.chatbot-input-wrapper button:hover {
  background: #00d4aa;
}

@media (max-width: 600px) {
  .chatbot-modal {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: 100vh;
  }
  
  .chatbot-toggle {
    bottom: 20px;
    right: 20px;
  }
}


/* Chat UI hotfix (2025-12-13) */
.chatbot-widget .chatbot-header { gap: 12px; }
.chatbot-widget .chatbot-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatbot-widget .chatbot-header-actions { display: flex !important; flex-wrap: nowrap; align-items: center; gap: 12px; flex-shrink: 0; }
.chatbot-widget .chatbot-agent-btn { display: inline-flex !important; align-items: center; white-space: nowrap; padding: 6px 10px; border: 1px solid rgba(0,245,212,0.35); border-radius: 10px; color: #00F5D4 !important; background: rgba(0,245,212,0.08); }
.chatbot-widget .chatbot-agent-btn:visited { color: #00F5D4 !important; }
.chatbot-widget .message { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.chatbot-widget .message a { color: #00F5D4; text-decoration: underline; }
