/* Di.Ar.De Studios - Interactive Lead Capture Chatbot Styles */
:root {
  --drd-gold: #FFC300;
  --drd-gold-hover: #e0ac00;
  --drd-dark: #2C2C2C;
  --drd-darker: #1e1e1e;
  --drd-light-bg: #f8f9fa;
  --drd-text-dark: #222222;
  --drd-text-muted: #777777;
  --drd-border: #e8e8e8;
  --drd-whatsapp: #25D366;
  --drd-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

/* Floating Launcher Container */
#drd-chatbot-root {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 99999;
  font-family: "Quicksand", Arial, sans-serif;
}

/* Launcher Button */
.drd-chat-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--drd-dark);
  color: #fff;
  border: 2px solid var(--drd-gold);
  border-radius: 50px;
  padding: 10px 18px 10px 14px;
  cursor: pointer;
  box-shadow: var(--drd-shadow);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
  position: relative;
  overflow: hidden;
}

.drd-chat-toggle::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 195, 0, 0.25) 50%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(25deg);
  animation: drd-sheen-sweep 7s infinite ease-in-out;
  pointer-events: none;
}

@keyframes drd-sheen-sweep {
  0%, 80% { left: -75%; }
  100% { left: 135%; }
}

.drd-chat-toggle:hover {
  background: #1a1a1a;
  border-color: #ffd233;
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(255, 195, 0, 0.25);
}

.drd-chat-toggle-icon {
  width: 36px;
  height: 36px;
  background: var(--drd-gold);
  color: var(--drd-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
}

.drd-pulse-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: #4ade80;
  border: 2px solid var(--drd-dark);
  border-radius: 50%;
  animation: drd-pulse 2s infinite;
}

@keyframes drd-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.drd-chat-toggle-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.drd-chat-toggle-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.5px;
  font-family: "Quicksand", Arial, sans-serif;
}

.drd-chat-toggle-sub {
  font-size: 11px;
  color: var(--drd-gold);
}

/* Chat Window */
.drd-chat-window {
  position: fixed;
  bottom: 85px;
  right: 25px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.drd-chat-window.drd-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.drd-chat-header {
  background: var(--drd-dark);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--drd-gold);
}

.drd-chat-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drd-chat-brand-avatar {
  width: 42px;
  height: 42px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  border: 2px solid var(--drd-gold);
}

.drd-chat-brand-avatar img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.drd-chat-brand-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  font-family: "Quicksand", sans-serif;
  letter-spacing: 0.5px;
}

.drd-chat-brand-info span {
  font-size: 11px;
  color: #bbb;
  display: flex;
  align-items: center;
  gap: 5px;
}

.drd-online-dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
}

.drd-chat-header-actions {
  display: flex;
  gap: 6px;
}

.drd-chat-btn-icon {
  background: transparent;
  border: none;
  color: #bbb;
  font-size: 18px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.drd-chat-btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Chat Body / Messages Area */
.drd-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #fdfdfd;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Message Bubbles */
.drd-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  font-size: 13.5px;
  line-height: 1.5;
  animation: drd-slide-up 0.25s ease-out;
}

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

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

.drd-msg-bot .drd-msg-bubble {
  background: #ffffff;
  color: #222222;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 2px;
  border: 1px solid #eaeaea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

.drd-msg-user .drd-msg-bubble {
  background: var(--drd-dark);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 14px 14px 2px 14px;
  border: 1px solid #222;
}

.drd-msg-user .drd-msg-bubble b {
  color: var(--drd-gold);
}

.drd-msg-time {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
  padding: 0 4px;
}

.drd-msg-user .drd-msg-time {
  text-align: right;
}

/* Option Chips */
.drd-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.drd-chip {
  background: #ffffff;
  border: 1px solid #dcdcdc;
  color: var(--drd-dark);
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Quicksand", Arial, sans-serif;
}

.drd-chip:hover {
  background: #fdf6d8;
  border-color: var(--drd-gold);
  color: #000;
  transform: translateY(-1px);
}

.drd-chip.selected {
  background: var(--drd-gold);
  border-color: var(--drd-gold);
  color: #000;
  font-weight: 700;
}

/* Lead Summary Card inside Chat */
.drd-lead-card {
  background: #fbfbfb;
  border-left: 3px solid var(--drd-gold);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 6px 0;
  font-size: 12px;
  color: #333;
}

.drd-lead-card-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.drd-lead-card-row span.label {
  color: #888;
  font-weight: 400;
}

.drd-lead-card-row span.value {
  color: #111;
  font-weight: 600;
}

/* Instant Direct Actions (WhatsApp & Call) */
.drd-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.drd-btn-whatsapp {
  background: var(--drd-whatsapp);
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 9px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 400;
  font-size: 13px;
  font-family: "Quicksand", Arial, sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
}

.drd-btn-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-1px);
}

.drd-call-links {
  display: flex;
  gap: 8px;
}

.drd-btn-call {
  flex: 1;
  background: var(--drd-dark);
  color: var(--drd-gold) !important;
  text-decoration: none !important;
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 400;
  font-size: 11.5px;
  font-family: "Quicksand", Arial, sans-serif;
  border: 1px solid rgba(255, 195, 0, 0.3);
  transition: all 0.2s ease;
}

.drd-btn-call:hover {
  background: #111;
  border-color: var(--drd-gold);
  color: #fff !important;
}

/* Typing Indicator */
.drd-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #ffffff;
  border-radius: 14px 14px 14px 2px;
  border: 1px solid #eaeaea;
  width: fit-content;
}

.drd-typing-dot {
  width: 6px;
  height: 6px;
  background: #bbb;
  border-radius: 50%;
  animation: drd-bounce 1.4s infinite ease-in-out both;
}

.drd-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.drd-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes drd-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Chat Footer / Input Form */
.drd-chat-footer {
  padding: 12px 14px;
  background: #ffffff;
  border-top: 1px solid #eeeeee;
}

.drd-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drd-chat-input {
  flex: 1;
  height: 40px;
  padding: 8px 14px;
  border: 1px solid #dedede;
  border-radius: 20px;
  font-size: 13px;
  font-family: "Quicksand", sans-serif;
  outline: none;
  transition: border-color 0.2s ease;
}

.drd-chat-input:focus {
  border-color: var(--drd-gold);
  box-shadow: 0 0 0 2px rgba(255, 195, 0, 0.2);
}

.drd-chat-send {
  width: 40px;
  height: 40px;
  background: var(--drd-gold);
  color: var(--drd-dark);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.drd-chat-send:hover {
  background: var(--drd-gold-hover);
  transform: scale(1.05);
}

/* Mobile Responsiveness */
@media screen and (max-width: 480px) {
  #drd-chatbot-root {
    bottom: 15px;
    right: 15px;
  }
  
  .drd-chat-toggle-text {
    display: none;
  }
  
  .drd-chat-toggle {
    padding: 8px;
    border-radius: 50%;
  }
  
  .drd-chat-window {
    bottom: 75px;
    right: 10px;
    left: 10px;
    width: auto;
    height: calc(100vh - 100px);
    max-width: 100vw;
  }
}
