/* AI Chat Widget Premium Styles */
#ai-chat-bubble {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a84c, #b0913b);
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#ai-chat-bubble:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 12px 40px rgba(201, 168, 76, 0.45);
}

#ai-chat-window {
  position: fixed;
  bottom: 100px;
  left: 24px;
  width: 380px;
  height: 520px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
}

#ai-chat-window.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.ai-chat-header {
  padding: 20px;
  background: linear-gradient(135deg, #1c1a16, #2d2a23);
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #c9a84c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.ai-chat-header-info {
  flex-grow: 1;
}

.ai-chat-title {
  font-family: 'Lora', serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.ai-chat-subtitle {
  font-size: 11px;
  color: #c9a84c;
  margin: 2px 0 0 0;
}

.ai-chat-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s;
  padding: 4px;
}

.ai-chat-close:hover {
  color: white;
}

.ai-chat-messages {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.5;
}

.ai-message.user {
  background: #c9a84c;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-message.bot {
  background: rgba(0, 0, 0, 0.05);
  color: #1c1a16;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ai-message.loading {
  background: rgba(0, 0, 0, 0.03);
  color: #7a7166;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot-pulse {
  display: inline-flex;
  gap: 3px;
}
.dot-pulse span {
  width: 6px;
  height: 6px;
  background: #c9a84c;
  border-radius: 50%;
  animation: pulse 1.4s infinite ease-in-out both;
}
.dot-pulse span:nth-child(1) { animation-delay: -0.32s; }
.dot-pulse span:nth-child(2) { animation-delay: -0.16s; }

@keyframes pulse {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

.ai-chat-input-area {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 8px;
}

.ai-chat-input {
  flex-grow: 1;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: white;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s;
  color: #1c1a16;
}

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

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

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

/* Mobile responsive */
@media (max-width: 480px) {
  #ai-chat-window {
    width: calc(100vw - 32px);
    height: calc(100vh - 120px);
    left: 16px;
    right: auto;
    bottom: 88px;
  }
}
