/* AI Chatbot Styles */
.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
[data-theme="light"] .chatbot-fab {
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.2);
}
.chatbot-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}
.chatbot-fab svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.chatbot-modal {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 360px;
  max-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.chatbot-modal.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.chatbot-header {
  padding: 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chatbot-header h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}
.chatbot-header span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.chatbot-header .icon-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.chatbot-header .icon-btn:hover {
  background-color: var(--input-bg);
  color: var(--text-primary);
}
.chatbot-header .icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.chatbot-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 250px;
  background: var(--bg-card);
}
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.bot-msg {
  align-self: flex-start;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.user-msg {
  align-self: flex-end;
  background: var(--accent-cyan);
  color: #fff;
  border-bottom-right-radius: 4px;
}
[data-theme="light"] .user-msg {
  background: var(--accent-purple);
  color: #fff;
}
.chatbot-input-area {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
#chatbot-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  transition: border-color var(--transition-fast);
}
#chatbot-input:focus {
  border-color: var(--accent-purple);
}

@media (max-width: 480px) {
  .chatbot-modal {
    right: 16px;
    left: 16px;
    bottom: 96px;
    width: auto;
    max-height: calc(100vh - 120px);
  }
  .chatbot-fab {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }
}
