/* Floating Support Bubble Wrapper */
#le-support-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Floating Action Button (Toggle) */
.le-support-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5e14 0%, #d84300 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 5px 25px rgba(255, 94, 20, 0.35);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 0;
  outline: none;
}

.le-support-toggle:hover {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 8px 30px rgba(255, 94, 20, 0.45);
}

.le-support-widget-closed .le-toggle-icon-close {
  display: none;
}

.le-support-widget-open .le-toggle-icon-open {
  display: none;
}

.le-support-widget-open .le-support-toggle {
  background: #111111;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Floating Menu Items (WhatsApp, Messenger, Phone, AI Bot) */
.le-support-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
}

.le-support-widget-open .le-support-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.le-menu-item {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  text-decoration: none;
}

.le-menu-item:hover {
  transform: scale(1.1);
}

.le-whatsapp {
  background: #25d366;
}

.le-messenger {
  background: #0084ff;
}

.le-phone {
  background: #0088cc;
}

.le-ai-bot {
  background: #111111;
}

/* AI Chatbot Overlay Panel */
#le-ai-chatbox {
  position: fixed;
  bottom: 95px;
  right: 25px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 999998;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#le-ai-chatbox.le-ai-chatbox-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.95);
}

/* Partial/Full screen classes */
.le-chatbox-partial {
  width: 380px;
  height: 520px;
  max-height: calc(100vh - 120px);
}

.le-chatbox-fullscreen {
  width: 500px !important;
  height: 650px !important;
  max-height: calc(100vh - 120px) !important;
}

/* Chat Header */
.le-chatbox-header {
  background: #111111;
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.le-chatbox-header-avatar {
  width: 40px;
  height: 40px;
  background: #222;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.le-status-dot {
  width: 10px;
  height: 10px;
  background-color: #25d366;
  border: 2px solid #111111;
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  right: 0;
}

.le-chatbox-header-info h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.le-chatbox-header-info span {
  font-size: 11px;
  color: #aaa;
}

.le-chatbox-header-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

.le-chatbox-expand-btn,
.le-chatbox-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.le-chatbox-expand-btn:hover,
.le-chatbox-close:hover {
  opacity: 1;
}

/* Chat Message Area */
.le-chatbox-messages {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: #f7f7fa;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.le-msg-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-line;
}

.le-msg-user {
  background-color: #ff5e14;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: 0 2px 8px rgba(255, 94, 20, 0.15);
}

.le-msg-bot {
  background-color: #ffffff;
  color: #222222;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.le-msg-image {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  display: block;
}

/* Lead Collection Welcome Form */
.le-lead-form-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 20px;
  margin: 10px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.le-lead-form-card h5 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.le-lead-form-card p {
  margin: 0 0 15px 0;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.le-lead-form-group {
  margin-bottom: 12px;
}

.le-lead-form-group label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #777;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.le-lead-form-group input,
.le-lead-form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e1e1e6;
  border-radius: 6px;
  font-size: 13px;
  box-sizing: border-box;
  outline: none;
}

.le-lead-form-group input:focus,
.le-lead-form-group textarea:focus {
  border-color: #ff5e14;
}

.le-lead-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.le-lead-btn {
  flex-grow: 1;
  padding: 9px 15px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  text-align: center;
}

.le-lead-btn-submit {
  background-color: #ff5e14;
  color: #ffffff;
}

.le-lead-btn-submit:hover {
  background-color: #d84300;
}

.le-lead-btn-skip {
  background-color: #e4e6eb;
  color: #333;
}

.le-lead-btn-skip:hover {
  background-color: #d8dadf;
}

/* Typing Indicator animation */
.le-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  align-items: center;
}

.le-typing-dot {
  width: 6px;
  height: 6px;
  background-color: #999;
  border-radius: 50%;
  animation: leBounce 1.4s infinite ease-in-out both;
}

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

@keyframes leBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1.0); }
}

/* Chat Footer & Input */
.le-chatbox-footer {
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Suggestions chips */
.le-chatbox-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.le-chatbox-suggestions::-webkit-scrollbar {
  display: none;
}

.le-suggest-chip {
  background-color: #f1f1f4;
  color: #ff5e14;
  border: 1px solid rgba(255, 94, 20, 0.15);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.le-suggest-chip:hover {
  background-color: #ff5e14;
  color: #ffffff;
  border-color: #ff5e14;
}

/* Image Upload Preview bar */
#le-chatbox-image-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f7f7fa;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px dashed rgba(0, 0, 0, 0.1);
  position: relative;
}

#le-chatbox-image-preview.le-chatbox-image-preview-hidden {
  display: none;
}

#le-chatbox-image-preview img {
  height: 40px;
  width: auto;
  border-radius: 4px;
  object-fit: cover;
}

#le-remove-image-preview {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background: #111;
  color: #fff;
  border-radius: 50%;
  border: none;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.le-chatbox-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.le-image-upload-label {
  font-size: 18px;
  color: #666;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.le-image-upload-label:hover {
  color: #ff5e14;
}

#le-chatbox-input {
  flex-grow: 1;
  border: 1px solid #e1e1e6;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 13.5px;
  outline: none;
  background-color: #fafafa;
  transition: all 0.2s ease;
}

#le-chatbox-input:focus {
  border-color: #ff5e14;
  background-color: #fff;
}

#le-chatbox-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #111111;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  transition: background-color 0.2s ease;
  padding: 0;
}

#le-chatbox-send:hover {
  background-color: #ff5e14;
}

/* ──────── MOBILE RESPONSIVE STYLES ──────── */
@media (max-width: 767px) {
  #le-support-widget {
    bottom: 20px;
    right: 20px;
    gap: 10px;
  }

  .le-support-toggle {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .le-menu-item {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  /* Keep chatbot as partial by default in mobile too */
  #le-ai-chatbox {
    position: fixed;
    bottom: 80px;
    right: 15px;
    width: calc(100vw - 30px) !important;
    height: 450px !important;
    max-height: calc(100vh - 100px) !important;
    border-radius: 12px !important;
    z-index: 999999999 !important;
  }

  /* Full Screen classes on Mobile when expanded */
  #le-ai-chatbox.le-chatbox-fullscreen {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
  }

  .le-chatbox-header {
    padding: 12px 16px;
  }

  .le-chatbox-messages {
    padding: 15px;
  }

  .le-chatbox-footer {
    padding: 10px 14px;
  }

  #le-chatbox-input {
    padding: 8px 12px;
  }
}
