/* AI Casino Chat Widget Styles */

:root {
  --chat-primary-purple: #667eea;
  --chat-primary-blue: #4299e1;
  --chat-primary-green: #48bb78;
  --chat-primary-red: #f56565;
}

.ai-chat-widget {
  position: fixed;
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ai-chat-widget.bottom-right {
  bottom: 20px;
  right: 20px;
}

.ai-chat-widget.bottom-left {
  bottom: 20px;
  left: 20px;
}

/* Toggle Button */
.ai-chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--chat-primary-purple);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: white;
  font-size: 24px;
}

.ai-chat-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.ai-chat-toggle.open {
  background: #e53e3e;
}

/* Chat Window */
.ai-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 550px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.ai-chat-widget.bottom-left .ai-chat-window {
  right: auto;
  left: 0;
}

.ai-chat-window.open {
  display: flex;
}

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

/* Chat Header */
.ai-chat-header {
  background: var(--chat-primary-purple);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-header-title {
  font-weight: 600;
  font-size: 16px;
}

.ai-chat-status {
  display: flex;
  align-items: center;
  font-size: 12px;
  opacity: 0.9;
}

.ai-chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #48bb78;
  margin-right: 6px;
  animation: pulse 2s infinite;
}

.ai-chat-status-dot.disconnected {
  background: #f56565;
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Chat Messages */
.ai-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f7fafc;
}

.ai-chat-message {
  margin-bottom: 15px;
  display: flex;
  animation: fadeIn 0.3s ease;
}

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

.ai-chat-message.user {
  justify-content: flex-end;
}

.ai-chat-message-content {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.ai-chat-message.ai .ai-chat-message-content {
  background: white;
  color: #2d3748;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-chat-message.user .ai-chat-message-content {
  background: var(--chat-primary-purple);
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-chat-message.system .ai-chat-message-content {
  background: #edf2f7;
  color: #718096;
  font-size: 12px;
  margin: 0 auto;
  max-width: 90%;
  text-align: center;
}

.ai-chat-message.error .ai-chat-message-content {
  background: #fed7d7;
  color: #c53030;
  max-width: 90%;
}

.ai-chat-typing {
  background: white;
  padding: 10px 14px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-chat-typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e0;
  animation: typing 1.4s infinite;
}

.ai-chat-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-chat-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Chat Input */
.ai-chat-input-container {
  padding: 15px 20px;
  background: white;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
}

.ai-chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.ai-chat-input:focus {
  border-color: var(--chat-primary-purple);
}

.ai-chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--chat-primary-purple);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 18px;
}

.ai-chat-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Theme variations */
.ai-chat-widget.theme-blue {
  --chat-primary-purple: var(--chat-primary-blue);
}

.ai-chat-widget.theme-green {
  --chat-primary-purple: var(--chat-primary-green);
}

.ai-chat-widget.theme-red {
  --chat-primary-purple: var(--chat-primary-red);
}

/* Mobile responsive */
@media (max-width: 480px) {
  .ai-chat-window {
    width: calc(100vw - 40px);
    height: calc(100vh - 100px);
  }
}

/* Scrollbar styling */
.ai-chat-messages::-webkit-scrollbar {
  width: 6px;
}

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

.ai-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}
