/* ==========================================================================
   LEP INDIA COSMETICS - LIVE CHATBOT WIDGET (DESKTOP EXCLUSIVE)
   ========================================================================== */

/* 1. Main Widget Container */
.lep-chat-widget-container {
  position: fixed;
  bottom: 5.75rem; /* Stationed above the 48px scroll-to-top button (bottom: 2.25rem) */
  right: 2.25rem;
  z-index: 880;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

/* 2. Chat Launcher Trigger Button */
.lep-chat-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #0b1528 0%, #111e38 100%);
  color: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 9999px;
  padding: 0.65rem 1.15rem 0.65rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.4), 
              0 0 15px rgba(212, 175, 55, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  outline: none;
}

.lep-chat-trigger-btn:hover {
  background: linear-gradient(135deg, #101e38 0%, #1a2c4e 100%);
  border-color: var(--accent-gold, #d4af37);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.5), 
              0 0 20px rgba(212, 175, 55, 0.3);
}

.lep-chat-trigger-btn:active {
  transform: translateY(-1px) scale(0.99);
}

/* Launcher Icon & Badges */
.lep-chat-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold, #d4af37);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.lep-chat-icon-wrapper svg {
  width: 18px;
  height: 18px;
}

.lep-chat-trigger-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.lep-chat-trigger-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
}

.lep-chat-trigger-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.2;
}

/* Status Indicator Dot */
.lep-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.lep-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: lep-pulse-green 2s infinite ease-in-out;
}

.lep-status-dot.offline {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

@keyframes lep-pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* 3. Floating Live Chat Window */
.lep-chat-window {
  position: fixed;
  bottom: 5.75rem;
  right: 2.25rem;
  width: 375px;
  max-width: calc(100vw - 3rem);
  height: 530px;
  max-height: calc(100vh - 7.5rem);
  background: #090e1c;
  background-image: radial-gradient(circle at 100% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
                    radial-gradient(circle at 0% 100%, rgba(14, 165, 233, 0.06) 0%, transparent 60%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 18px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.65),
              0 0 25px rgba(212, 175, 55, 0.15),
              0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s;
  z-index: 890;
}

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

/* Chat Header */
.lep-chat-header {
  padding: 0.9rem 1.1rem;
  background: #0d1629;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.lep-chat-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #d4af37, #f3e8c8, #d4af37);
}

.lep-chat-header-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lep-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1.5px solid var(--accent-gold, #d4af37);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold, #d4af37);
  position: relative;
  flex-shrink: 0;
}

.lep-chat-avatar-status {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #0d1629;
}

.lep-chat-header-text h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.15rem 0;
  line-height: 1.2;
}

.lep-chat-header-text p {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lep-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lep-chat-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.lep-chat-tool-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.lep-chat-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Chat Messages Scroll Area */
.lep-chat-body {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.lep-chat-body::-webkit-scrollbar {
  width: 5px;
}
.lep-chat-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.lep-chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Message Bubbles */
.lep-msg {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  max-width: 90%;
  animation: lep-msg-fade 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lep-msg-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.lep-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.lep-msg-bubble {
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
}

.lep-msg.bot .lep-msg-bubble {
  background: #131c30;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lep-msg.user .lep-msg-bubble {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  font-weight: 500;
}

.lep-msg-time {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 0.25rem;
  display: block;
}

.lep-msg.user .lep-msg-time {
  text-align: right;
  color: rgba(255, 255, 255, 0.7);
}

/* Typing Indicator Animation */
.lep-typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.65rem 0.9rem;
  background: #131c30;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.lep-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold, #d4af37);
  opacity: 0.4;
  animation: lep-typing-blink 1.4s infinite both;
}

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

@keyframes lep-typing-blink {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* 4. Chat Step Input Section (Bottom Area) */
.lep-chat-footer {
  padding: 0.85rem 1rem;
  background: #0d1527;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lep-chat-step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  color: #94a3b8;
}

.lep-chat-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.lep-chat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #10b981);
  transition: width 0.35s ease;
}

.lep-chat-input-form {
  display: flex;
  gap: 0.45rem;
  position: relative;
}

.lep-chat-input-field {
  flex: 1;
  min-width: 0;
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.85rem;
  padding: 0 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.lep-chat-input-field:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent-gold, #d4af37);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.lep-chat-textarea-field {
  flex: 1;
  min-width: 0;
  height: 52px;
  resize: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.85rem;
  padding: 0.5rem 0.85rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.lep-chat-textarea-field:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent-gold, #d4af37);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.lep-chat-send-btn {
  height: 42px;
  padding: 0 1rem;
  background: var(--accent-gold, #d4af37);
  color: #090e1c;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.lep-chat-send-btn:hover {
  background: #e5be42;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

.lep-chat-send-btn:active {
  transform: translateY(0);
}

/* 5. Summary / Final WhatsApp Action Card */
.lep-summary-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 0.85rem;
  margin-top: 0.35rem;
}

.lep-summary-row {
  display: flex;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.lep-summary-row:last-child {
  margin-bottom: 0;
}

.lep-summary-label {
  color: #94a3b8;
  width: 72px;
  flex-shrink: 0;
  font-weight: 600;
}

.lep-summary-val {
  color: #ffffff;
  font-weight: 500;
  word-break: break-word;
}

/* Start WhatsApp Big Button */
.lep-whatsapp-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.85rem 1.1rem;
  margin-top: 0.75rem;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lep-whatsapp-start-btn:hover {
  background: linear-gradient(135deg, #2ae26e 0%, #159a8b 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
}

.lep-whatsapp-start-btn:active {
  transform: translateY(0);
}

.lep-whatsapp-start-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.lep-chat-restart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.45rem;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.lep-chat-restart-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   STRICT REQUIREMENT: DESKTOP-ONLY VISIBILITY
   Hidden on mobile & tablet devices (< 1024px)
   ========================================================================== */
@media (max-width: 1023px) {
  .lep-chat-widget-container,
  #lep-live-chat-widget,
  .lep-chat-trigger-btn,
  .lep-chat-window {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }
}
