/* ==========================================================================
   LAVE O' BAC - CHATBOT GABY (GABRIELLE) STYLES
   Développé par TonCodeur.com
   ========================================================================== */

.lob-chatbot-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: var(--font-body, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* Bouton Déclencheur Flottant */
.lob-chatbot-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #0c4a6e 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.4), 0 8px 10px -6px rgba(12, 74, 110, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
  outline: none;
}

.lob-chatbot-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 28px -5px rgba(2, 132, 199, 0.5), 0 10px 12px -6px rgba(12, 74, 110, 0.4);
}

.lob-chatbot-btn:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

.lob-chatbot-btn-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: opacity 0.2s ease;
}

/* Fenêtre de Clavardage */
.lob-chatbot-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.2), 0 1px 3px 0 rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: lobChatSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lob-chatbot-window.lob-hidden {
  display: none !important;
}

.lob-close-icon-hidden {
  display: none;
}

@keyframes lobChatSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* En-tête */
.lob-chat-header {
  background: #0c4a6e;
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.lob-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lob-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.lob-chat-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background-color: #22c55e;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.lob-chat-title {
  margin: 0;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.lob-chat-subtitle {
  margin: 0;
  font-size: 0.75rem;
  color: #bae6fd;
}

.lob-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lob-chat-action-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lob-chat-action-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.lob-chat-close-btn:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* Zone des messages */
.lob-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
  scroll-behavior: smooth;
}

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

.lob-chat-messages::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.lob-message-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 88%;
}

.lob-message-row.bot {
  align-self: flex-start;
}

.lob-message-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.lob-message-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.45;
  word-break: break-word;
}

.lob-message-row.bot .lob-message-bubble {
  background: #ffffff;
  color: #0f172a;
  border-bottom-left-radius: 4px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.lob-message-row.user .lob-message-bubble {
  background: #0284c7;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.lob-message-bubble p {
  margin: 0 0 6px 0;
}

.lob-message-bubble p:last-child {
  margin: 0;
}

.lob-message-bubble a {
  color: #0284c7;
  font-weight: 600;
  text-decoration: underline;
}

.lob-message-row.user .lob-message-bubble a {
  color: #ffffff;
}

.lob-message-bubble ul {
  margin: 6px 0;
  padding-left: 18px;
}

.lob-message-bubble li {
  margin-bottom: 3px;
}

.lob-badge-client {
  display: inline-block;
  background-color: #dcfce7;
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  margin-bottom: 6px;
  border: 1px solid #bbf7d0;
}

/* Indicateur de frappe */
.lob-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: #ffffff;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  border: 1px solid #e2e8f0;
  width: fit-content;
}

.lob-typing-dot {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: lobBlink 1.4s infinite both;
}

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

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

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

/* Réponses rapides */
.lob-chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.lob-quick-btn {
  background: #f1f5f9;
  color: #0c4a6e;
  border: 1px solid #e2e8f0;
  padding: 6px 11px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lob-quick-btn:hover {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}

/* Autocomplétion d'adresses dans le chat */
.lob-chat-autocomplete {
  background: #ffffff;
  border-top: 1px solid #cbd5e1;
  max-height: 175px;
  overflow-y: auto;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
}

.lob-chat-auto-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  padding: 9px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

.lob-chat-auto-item:last-child {
  border-bottom: none;
}

.lob-chat-auto-item:hover,
.lob-chat-auto-item:focus {
  background: #f0f9ff;
  outline: none;
}

.lob-chat-auto-main {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}

.lob-chat-auto-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 1px;
}

/* Formulaire d'envoi */
.lob-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.lob-chat-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lob-chat-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.lob-chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
}

.lob-chat-send-btn:hover {
  background: #0369a1;
}

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

.lob-chat-footer-note {
  background: #f8fafc;
  padding: 6px 14px;
  text-align: center;
  font-size: 0.74rem;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
}

.lob-chat-footer-note a {
  color: #0284c7;
  font-weight: 700;
  text-decoration: none;
}

.lob-chat-footer-note a:hover {
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .lob-chatbot-root {
    bottom: 16px;
    right: 16px;
  }
  
  .lob-chatbot-window {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 84px;
    height: 70vh;
    border-radius: 16px;
  }
}
