/* Custom Chat Widget Styles */

.chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  border: 2px solid rgba(255,215,0,0.8);
  box-shadow: 0 10px 30px rgba(255,215,0,0.5), 0 0 20px rgba(255,215,0,0.3);
  cursor: pointer;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: all 0.3s ease;
  animation: launcher-pulse 2.4s ease-in-out infinite;
}

.chat-launcher:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 12px 40px rgba(255,215,0,0.6), 0 0 30px rgba(255,215,0,0.4);
}

.chat-launcher.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0);
}

@keyframes launcher-pulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(255,215,0,0.5), 0 0 20px rgba(255,215,0,0.3), 0 0 0 0 rgba(255,215,0,0.6);
  }
  50% {
    box-shadow: 0 10px 30px rgba(255,215,0,0.5), 0 0 20px rgba(255,215,0,0.3), 0 0 0 20px rgba(255,215,0,0);
  }
}

.chat-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  height: 600px;
  background: #0a0a0a;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,215,0,0.3);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s ease;
  overflow: hidden;
}

.chat-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-header {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #ffd700;
}

.chat-header-content h3 {
  margin: 0;
  color: #0a0a0a;
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255,255,255,0.2);
}

.chat-header-content p {
  margin: 4px 0 0 0;
  color: rgba(10,10,10,0.8);
  font-size: 13px;
}

.chat-close {
  background: none;
  border: none;
  color: #0a0a0a;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.chat-close:hover {
  background: rgba(10,10,10,0.1);
  transform: rotate(90deg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255,215,0,0.05) 0%, #0a0a0a 20%);
  border-left: 3px solid rgba(255,215,0,0.3);
  border-right: 3px solid rgba(255,215,0,0.3);
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

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

.chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffd700, rgba(255,215,0,0.6));
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #ffd700;
}

.chat-message {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  animation: messageSlide 0.3s ease;
}

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

.message-content {
  padding: 12px 16px;
  border-radius: 8px;
  max-width: 80%;
  word-wrap: break-word;
}

.bot-message .message-content {
  background: #1a1a1a;
  color: #ffffff;
  border: 2px solid rgba(255,215,0,0.4);
  box-shadow: 0 2px 8px rgba(255,215,0,0.1), inset 0 1px 0 rgba(255,215,0,0.1);
  align-self: flex-start;
}

.user-message .message-content {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #0a0a0a;
  font-weight: 500;
  align-self: flex-end;
  box-shadow: 0 2px 8px rgba(255,215,0,0.3);
}

.typing-indicator .message-content {
  display: flex;
  gap: 6px;
  padding: 12px 20px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd700;
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.chat-input-container {
  padding: 16px;
  background: #0a0a0a;
  border-top: 2px solid rgba(255,215,0,0.3);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: #1a1a1a;
  border: 2px solid rgba(255,215,0,0.4);
  border-radius: 8px;
  padding: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  transition: all 0.2s ease;
}

.chat-input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 0 3px rgba(255,215,0,0.2);
}

.chat-input::placeholder {
  color: rgba(255,215,0,0.5);
}

.chat-send {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  border: none;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0a0a0a;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255,215,0,0.4);
}

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

@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    bottom: 16px;
    right: 16px;
  }
  
  .chat-launcher {
    bottom: 16px;
    right: 16px;
  }
}
