/* Chatbot widget styles - Clean white and black theme */
.chatbot-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999999;
}

.chatbot-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #000000;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.chatbot-toggle svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.chatbot-window {
  width: 420px;
  height: 600px;
  max-height: calc(100vh - 120px);
  position: absolute;
  bottom: 80px;
  right: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.9) translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.chatbot-window.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1) translateY(0);
}

/* Remove animated border for clean look */
.chatbot-border-container {
  display: none;
}

.chatbot-border-animation {
  display: none;
}

/* Inner card - clean white */
.chatbot-inner-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 1px solid #e5e5e5 !important;
  overflow: hidden;
  background: #ffffff !important;
  text-align: left !important;
}

/* Remove animated background */
.chatbot-bg-animation {
  display: none;
}

/* Hide particles */
.chatbot-particle {
  display: none;
}

/* Header - clean white */
.chatbot-header {
  position: relative;
  z-index: 10;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff !important;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #000000 !important;
}

.chatbot-close {
  background: none !important;
  border: none;
  color: #666666 !important;
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.chatbot-close:hover {
  background: #f5f5f5 !important;
  color: #000000 !important;
}

/* Messages area */
.chatbot-messages {
  position: relative;
  z-index: 10;
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
}

.chatbot-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: messageSlideIn 0.3s ease-out;
  text-align: left !important;
}

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

.chatbot-message.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.chatbot-message.assistant {
  align-self: flex-start;
}

.chatbot-avatar {
  display: none;
}

.chatbot-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 85%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-line;
  text-align: left !important;
}

.chatbot-message.assistant .chatbot-bubble {
  background: #f7f7f8 !important;
  color: #000000 !important;
  border-radius: 16px 16px 16px 4px;
}

.chatbot-message.assistant .chatbot-bubble *:not(.chatbot-action-btn):not(.chatbot-action-btn *) {
  color: #000000 !important;
}

.chatbot-message.user .chatbot-bubble {
  background: #000000 !important;
  color: #ffffff !important;
  border-radius: 16px 16px 4px 16px;
}

.chatbot-message.user .chatbot-bubble * {
  color: #ffffff !important;
}

.chatbot-bubble p {
  margin: 0 0 12px 0;
}

.chatbot-bubble p:last-child {
  margin-bottom: 0;
}

.chatbot-bubble strong {
  font-weight: 600;
}

.chatbot-bubble ul {
  margin: 8px 0;
  padding-left: 20px;
  list-style-type: disc;
}

.chatbot-bubble li {
  margin: 6px 0;
}

/* AI typing indicator */
.chatbot-loading {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.chatbot-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999999;
  animation: typingPulse 1.2s ease-in-out infinite;
}

.chatbot-loading-dot:nth-child(1) { animation-delay: 0s; }
.chatbot-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.chatbot-loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* Input area */
.chatbot-input-area {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0 !important;
  background: #ffffff !important;
}

.chatbot-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 14px;
  background: #f7f7f8 !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 24px;
  color: #000000 !important;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chatbot-input::placeholder {
  color: #999999 !important;
}

.chatbot-input:focus {
  border-color: #000000 !important;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.chatbot-send {
  padding: 10px;
  background: #000000 !important;
  color: #ffffff !important;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: relative;
}

.chatbot-send:hover:not(:disabled) {
  background: #333333 !important;
  transform: scale(1.05);
}

.chatbot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: scale(1);
}

.chatbot-send:disabled::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: sendSpinner 0.8s linear infinite;
}

.chatbot-send:disabled svg {
  opacity: 0;
}

@keyframes sendSpinner {
  to { transform: rotate(360deg); }
}

.chatbot-send svg {
  width: 18px;
  height: 18px;
  color: #ffffff !important;
  transition: opacity 0.2s;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 40px);
    height: calc(100vh - 140px);
    max-height: 500px;
    bottom: 70px;
    right: 10px;
  }
  
  .chatbot-wrapper {
    right: 10px;
    bottom: 10px;
  }
  
  .chatbot-toggle {
    width: 50px;
    height: 50px;
  }
  
  .chatbot-toggle svg {
    width: 22px;
    height: 22px;
  }
}

/* Scrollbar styling for messages area */
.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #e0e0e0;
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: #cccccc;
}

/* Action Buttons - Ripple style */
.chatbot-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9999px;
  background: #1a1a1a;
  color: #ffffff !important;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  height: auto;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.chatbot-action-btn * {
  color: inherit !important;
}

.chatbot-action-btn:hover {
  filter: brightness(1.2);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

.chatbot-action-btn .btn-label {
  position: relative;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chatbot-action-btn .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: chatbot-ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes chatbot-ripple {
  0% { opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}
