/* public/css/ai-chat-widget.css */

/* Floating Chat Widget Styles */
#aiChatWidget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ai-chat-toggle {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff69b4 0%, #f66684 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

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

.ai-chat-toggle:active {
  transform: scale(0.95);
}

.ai-chat-toggle .close-icon {
  display: none;
}

.ai-chat-toggle.active .ai-icon {
  display: none;
}

.ai-chat-toggle.active .close-icon {
  display: block;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid white;
}

.ai-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 400px;
  height: 600px;
  background: white;
  border-radius: 16px;
  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-window.active {
  display: flex;
}

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

.ai-chat-header {
  background: linear-gradient(135deg, #f66684 0%, #f66684 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-chat-header-content {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ai-chat-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.ai-chat-header p {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
}

.ai-chat-header-actions {
  display: flex;
  gap: 8px;
}

.ai-chat-btn-icon {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.ai-chat-btn-icon:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
}

.ai-chat-welcome {
  text-align: center;
  padding: 20px;
}

.ai-chat-welcome svg {
  color: #f66684;
  margin-bottom: 16px;
}

.ai-chat-welcome h4 {
  margin: 0 0 12px 0;
  font-size: 20px;
  color: #1f2937;
}

.ai-chat-welcome p {
  color: #6b7280;
  margin: 8px 0;
}

.ai-chat-welcome ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  text-align: left;
}

.ai-chat-welcome li {
  padding: 8px 0;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-chat-welcome li:before {
  content: "✓";
  color: #10b981;
  font-weight: bold;
}

.ai-chat-examples {
  margin-top: 20px;
  text-align: left;
}

.ai-chat-examples strong {
  display: block;
  margin-bottom: 8px;
  color: #4b5563;
  font-size: 13px;
}

.ai-example-btn {
  display: block;
  width: 100%;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  color: #4b5563;
  transition: all 0.2s;
}

.ai-example-btn:hover {
  border-color: #f66684;
  background: #fff5f7;
  color: #f66684;
}

.msg {
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

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

.msg.user .bubble {
  background: #f66684;
  color: white;
  margin-left: auto;
  max-width: 80%;
}

.msg.assistant .bubble {
  background: white;
  border: 1px solid #e5e7eb;
  max-width: 90%;
}

.bubble {
  padding: 12px 16px;
  border-radius: 12px;
  word-wrap: break-word;
}

.bubble strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bubble p {
  margin: 8px 0;
  line-height: 1.5;
}

.bubble p:first-of-type {
  margin-top: 0;
}

.bubble p:last-child {
  margin-bottom: 0;
}

.meta {
  margin-top: 8px;
  font-size: 11px;
  color: #6b7280;
}

.meta code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
}

.client-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin: 4px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #f66684;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.client-link:hover {
  background: #fff5f7;
  border-color: #f66684;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.client-links-container {
  margin: 12px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.client-links-header {
  font-weight: 600;
  margin-bottom: 8px;
  color: #495057;
  font-size: 13px;
}

.ai-chat-footer {
  padding: 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
}

.ai-chat-form {
  display: flex;
  gap: 8px;
}

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

.ai-chat-input:focus {
  border-color: #f66684;
}

.ai-chat-send {
  background: #f66684;
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.ai-chat-send:hover {
  background: #f66684;
}

.ai-chat-send:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.ai-spinner svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
	transform: rotate(0deg);
  }
  to {
	transform: rotate(360deg);
  }
}

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

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

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

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

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