/* ============================================
   MAISON DALÍ AI ARTIST WIDGET STYLES
   Surrealist design with luxury aesthetics
   ============================================ */

/* Container */
.dali-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Chat Icon Button - Image-based Dalí Avatar */
.dali-chat-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0);
  box-shadow: 
    0 4px 12px rgba(212, 175, 55, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.2);
  border: none;
  background: none;
}

.dali-chat-icon-visible {
  opacity: 1;
  transform: scale(1);
}

.dali-chat-icon:hover {
  transform: scale(1.1);
  box-shadow: 
    0 6px 16px rgba(212, 175, 55, 0.4),
    0 12px 32px rgba(0, 0, 0, 0.25);
}

@keyframes dali-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Chat Window */
.dali-chat-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 100px);
  background: linear-gradient(135deg, #3d0001 0%, #2a0001 100%);
  border-radius: 16px;
  box-shadow: 
    0 0 0 1px rgba(212, 175, 55, 0.2),
    0 8px 24px rgba(93, 0, 2, 0.4),
    0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: dali-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dali-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.dali-chat-header {
  background: linear-gradient(135deg, #5D0002 0%, #3d0001 100%);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

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

.dali-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #d4af37;
}

.dali-header-text h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #d4af37;
  letter-spacing: 0.5px;
}

.dali-status {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dali-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: dali-pulse 2s ease-in-out infinite;
}

@keyframes dali-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.dali-close-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.dali-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #d4af37;
}

.dali-close-btn svg {
  width: 20px;
  height: 20px;
}

/* Messages Container */
.dali-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, rgba(61, 0, 1, 0.8) 0%, rgba(42, 0, 1, 0.9) 100%);
}

.dali-messages::-webkit-scrollbar {
  width: 6px;
}

.dali-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.dali-messages::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}

.dali-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

/* Messages */
.dali-message {
  display: flex;
  gap: 12px;
  animation: dali-fade-in 0.3s ease-out;
}

@keyframes dali-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dali-bot-message {
  align-items: flex-start;
}

.dali-user-message {
  flex-direction: row-reverse;
  align-items: flex-end;
}

.dali-message-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #d4af37;
}

.dali-message-content {
  background: rgba(93, 0, 2, 0.3);
  padding: 12px 16px;
  border-radius: 12px;
  max-width: 75%;
  word-wrap: break-word;
}

.dali-bot-message .dali-message-content {
  background: rgba(93, 0, 2, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-top-left-radius: 4px;
}

.dali-user-message .dali-message-content {
  background: linear-gradient(135deg, #d4af37 0%, #8b6914 100%);
  border-top-right-radius: 4px;
}

.dali-message-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
}

.dali-user-message .dali-message-content p {
  color: #000;
  font-weight: 500;
}

/* Typing Indicator */
.dali-typing-indicator {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 20px;
  animation: dali-fade-in 0.3s ease-out;
}

.dali-typing-dots {
  background: rgba(93, 0, 2, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 12px 16px;
  border-radius: 12px;
  border-top-left-radius: 4px;
  display: flex;
  gap: 4px;
}

.dali-typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4af37;
  animation: dali-bounce 1.4s ease-in-out infinite;
}

.dali-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.dali-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dali-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
}

/* Input Container */
.dali-input-container {
  padding: 16px 20px 20px;
  background: linear-gradient(135deg, #5D0002 0%, #3d0001 100%);
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.dali-input {
  flex: 1;
  background: rgba(93, 0, 2, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 120px;
  transition: all 0.2s;
}

.dali-input:focus {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(93, 0, 2, 0.5);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.dali-input::placeholder {
  color: #666;
}

.dali-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4af37 0%, #8b6914 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.dali-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.dali-send-btn svg {
  width: 20px;
  height: 20px;
  color: #000;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .dali-widget-container {
    bottom: 16px;
    right: 16px;
  }
  
  .dali-chat-window {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }
  
  .dali-chat-icon {
    width: 56px;
    height: 56px;
  }
  
  .dali-chat-icon svg {
    width: 24px;
    height: 24px;
  }
}
