/* AI Assistant Styles */
:root {
  --primary-color: #019444; /* Green from the site's theme */
  --secondary-color: #f36523; /* Orange from the site's theme */
  --background-color: #ffffff;
  --text-color: #333333;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --orb-inactive: linear-gradient(45deg, #95a5a6, #7f8c8d);
  --orb-active: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

/* AI Assistant Container */
.ai-assistant-container {
  position: fixed;
  bottom: 80px; /* Increased from 20px to avoid overlap with back-to-top button */
  right: 15px;
  z-index: 9999;
  width: 300px;
  transition: all 0.3s ease;
}

/* AI Assistant Toggle Button */
.ai-assistant-toggle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
}

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

/* Hide the card initially */
.ai-assistant-card {
  display: none;
  margin-bottom: 60px;
}

/* Show the card when container has 'active' class */
.ai-assistant-container.active .ai-assistant-card {
  display: block;
}

/* AI Assistant Card */
.ai-assistant-card {
  background-color: var(--background-color);
  border-radius: 15px;
  box-shadow: 0 5px 20px var(--shadow-color);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

/* AI Assistant Header */
.ai-assistant-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-assistant-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

/* AI Assistant Orb */
.ai-assistant-orb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--orb-inactive);
  transition: all 0.3s ease;
}

.ai-assistant-orb.active {
  background: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  animation: pulse 1.5s infinite;
}

/* AI Assistant Body */
.ai-assistant-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* AI Assistant Buttons */
.ai-assistant-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-assistant-button:hover {
  background-color: var(--secondary-color);
}

.ai-assistant-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* AI Assistant Log */
.ai-assistant-log {
  max-height: 100px;
  overflow-y: auto;
  padding: 10px;
  margin: 0;
  font-size: 12px;
  background-color: #f9f9f9;
  border-top: 1px solid var(--border-color);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: hidden;
  text-overflow: ellipsis;
  width: 100%;
  box-sizing: border-box;
  display: none; /* Always hidden by default */
}

/* Class to explicitly show logs when needed */
.ai-assistant-log.show-logs {
  display: block;
}

/* Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ai-assistant-container {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .ai-assistant-container {
    width: 200px;
  }

  .ai-assistant-title {
    font-size: 16px;
  }

  .ai-assistant-button {
    font-size: 12px;
    padding: 8px 12px;
  }
}
