/* Drishti Entertainers AI Chatbot Widget Stylesheet */

:root {
  --de-primary: #8b1538;
  --de-primary-gradient: linear-gradient(135deg, #8b1538 0%, #b8234d 50%, #d4af37 100%);
  --de-gold: #d4af37;
  --de-gold-hover: #b8932b;
  --de-dark: #1a1024;
  --de-light-bg: #f8f9fc;
  --de-bot-msg: #ffffff;
  --de-user-msg: #8b1538;
  --de-border: #e6e8ec;
  --de-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  --de-radius: 16px;
}

/* Floating Trigger Button (Positioned above WhatsApp button to prevent overlap) */
#de-chat-trigger {
  position: fixed;
  bottom: 95px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--de-primary-gradient);
  box-shadow: 0 6px 20px rgba(139, 21, 56, 0.45);
  cursor: pointer;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(212, 175, 55, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#de-chat-trigger:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 26px rgba(139, 21, 56, 0.6);
}

#de-chat-trigger svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

#de-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #10b981;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  animation: dePulse 2s infinite;
}

/* Chat Container */
#de-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 120px);
  background: var(--de-light-bg);
  border-radius: var(--de-radius);
  box-shadow: var(--de-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
  border: 1px solid rgba(212, 175, 55, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  animation: deSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#de-chat-window.active {
  display: flex;
}

/* Header */
.de-chat-header {
  background: var(--de-primary-gradient);
  color: #ffffff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.4);
}

.de-chat-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.de-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--de-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  border: 2px solid var(--de-gold);
}

.de-chat-title h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.de-chat-title p {
  margin: 0;
  font-size: 11px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
}

.de-status-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}

.de-chat-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.de-chat-btn-icon {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

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

/* Messages Body */
.de-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fbfbfd;
}

.de-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 84%;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}

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

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

.de-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
}

.de-chat-msg.bot .de-msg-bubble {
  background: var(--de-bot-msg);
  color: #1f2937;
  border: 1px solid var(--de-border);
  border-top-left-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.de-chat-msg.user .de-msg-bubble {
  background: var(--de-primary);
  color: #ffffff;
  border-top-right-radius: 3px;
}

.de-chat-msg a {
  color: #b8234d;
  font-weight: 600;
  text-decoration: underline;
}

.de-chat-msg.user a {
  color: #ffd89b;
}

.de-chat-time {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 3px;
  align-self: flex-start;
}

.de-chat-msg.user .de-chat-time {
  align-self: flex-end;
}

/* Quick Suggestion Chips */
.de-quick-chips {
  padding: 8px 14px 4px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #fbfbfd;
  border-top: 1px solid #f0f0f5;
}

.de-quick-chips::-webkit-scrollbar {
  display: none;
}

.de-chip {
  background: #ffffff;
  color: var(--de-dark);
  border: 1px solid #d4af37;
  border-radius: 18px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.de-chip:hover {
  background: var(--de-primary);
  color: #ffffff;
  border-color: var(--de-primary);
}

/* Input Area */
.de-chat-footer {
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid var(--de-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.de-chat-input {
  flex: 1;
  border: 1px solid var(--de-border);
  border-radius: 20px;
  padding: 10px 14px;
  font-size: 13.5px;
  outline: none;
  background: #fdfdfd;
  transition: border-color 0.2s;
}

.de-chat-input:focus {
  border-color: var(--de-primary);
  background: #ffffff;
}

.de-send-btn {
  background: var(--de-primary-gradient);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.2s;
}

.de-send-btn:hover {
  transform: scale(1.05);
}

.de-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Typing Indicator Animation */
.de-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}

.de-typing-dot {
  width: 6px;
  height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  animation: deBlink 1.4s infinite both;
}

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

@keyframes deBlink {
  0% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
  100% { opacity: 0.2; transform: translateY(0); }
}

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

@keyframes dePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Mobile full-width optimization */
@media (max-width: 480px) {
  #de-chat-trigger {
    bottom: 85px;
    right: 18px;
    width: 54px;
    height: 54px;
  }
  #de-chat-window {
    right: 10px;
    bottom: 80px;
    width: calc(100vw - 20px);
    height: calc(100vh - 100px);
    border-radius: 12px;
  }
}
