/**
 * CSphereBot - Additional CSS styles
 * This file is optional and provides additional styling options
 */

/* Custom animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* Apply animations to chat elements */
.csphere-bot-window {
  animation: fadeIn 0.3s ease;
}

.csphere-bot-message.bot {
  animation: slideInLeft 0.3s ease;
}

.csphere-bot-message.user {
  animation: slideInRight 0.3s ease;
}

/* Additional theme classes that can be applied */
.csphere-bot-theme-dark {
  --csphere-header-bg: #2c3e50;
  --csphere-header-text: #ecf0f1;
  --csphere-bot-bubble: #34495e;
  --csphere-bot-text: #ecf0f1;
  --csphere-user-bubble: #3498db;
  --csphere-user-text: #ffffff;
  --csphere-bg: #1a1a1a;
  --csphere-input-bg: #2c3e50;
  --csphere-input-text: #ecf0f1;
}

.csphere-bot-theme-light {
  --csphere-header-bg: #f8f9fa;
  --csphere-header-text: #343a40;
  --csphere-bot-bubble: #e9ecef;
  --csphere-bot-text: #343a40;
  --csphere-user-bubble: #007bff;
  --csphere-user-text: #ffffff;
  --csphere-bg: #ffffff;
  --csphere-input-bg: #f8f9fa;
  --csphere-input-text: #343a40;
}

/* Responsive styles for mobile devices */
@media (max-width: 480px) {
  .csphere-bot-window {
    width: 85vw !important;
    height: 70vh !important;
  }
  
  .csphere-bot-message {
    max-width: 90%;
  }
}

/* Accessibility improvements */
.csphere-bot-input input:focus {
  box-shadow: 0 0 0 2px rgba(74, 134, 232, 0.5);
}

.csphere-bot-icon:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 134, 232, 0.5);
}

/* Optional typing indicator */
.csphere-bot-typing {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  align-self: flex-start;
}

.csphere-bot-typing-dot {
  width: 8px;
  height: 8px;
  background-color: #b0b0b0;
  border-radius: 50%;
  margin: 0 2px;
  animation: typingAnimation 1.4s infinite ease-in-out;
}

.csphere-bot-typing-dot:nth-child(1) {
  animation-delay: 0s;
}

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

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

@keyframes typingAnimation {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}
