/* AI Chatbot Widget */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  max-width: calc(100vw - 40px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.chat-widget.closed {
  width: auto;
}

.chat-widget.closed .chat-body {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  padding: 10px 15px;
  border-radius: 50px;
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
  cursor: pointer;
  margin-bottom: 10px;
  margin-left: auto;
  transition: all 0.3s ease;
}

.chat-widget:not(.closed) .chat-header {
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
  width: 100%;
  box-sizing: border-box;
}

.chat-title {
  display: flex;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: white;
}

.chat-widget.closed .chat-title {
  display: none;
}

.chat-toggle-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-toggle-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-widget.closed .chat-header {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.chat-widget.closed .chat-toggle-btn {
  padding: 0;
}

.chat-widget.closed .chat-toggle-img {
  width: 75px;
  height: 75px;
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.6);
  background: white;
  border: 3px solid rgba(14, 165, 233, 0.8);
}

.chat-widget:hover.closed .chat-toggle-img {
  transform: scale(1.1);
  box-shadow: 0 15px 35px rgba(14, 165, 233, 0.8);
}

.chat-body {
  height: 400px;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 12px 12px;
  border-top: none;
  overflow: hidden;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  color: white;
}

.chat-message {
  display: flex;
  max-width: 85%;
}

.chat-message.bot {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
}

.message-content {
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 0.9rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message.bot .message-content {
  background: rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 0;
}

.chat-message.user .message-content {
  background: rgba(14, 165, 233, 0.2);
  border-bottom-right-radius: 0;
  border: 1px solid #0ea5e9;
}

.message-content code {
  background: rgba(0,0,0,0.5);
  padding: 2px 4px;
  border-radius: 4px;
  font-family: monospace;
}

.message-content pre {
  background: rgba(0,0,0,0.5);
  padding: 8px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}

.message-content p {
  margin-bottom: 8px;
}
.message-content p:last-child {
  margin-bottom: 0;
}

.chat-input-area {
  display: flex;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  gap: 10px;
  background: rgba(0,0,0,0.2);
}

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 5px 10px;
  font-family: 'Inter', sans-serif;
}

#chat-input:focus {
  outline: none;
}
