/* ==========================================================================
   FUSION ATELIER & FUSION HOME STORE — LUXURY CONCIERGE CHATBOT WIDGET
   Palette: Rich Obsidian (#0B0B0C), Haute Gold (#BDA358, #D4AF37), Cream (#FFF8E7)
   ========================================================================== */

#fusion-chat-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1A1814 0%, #0D0D0D 100%);
  border: 2px solid #BDA358;
  color: #D4AF37;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65), 0 0 16px rgba(189, 163, 88, 0.35);
  z-index: 99999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#fusion-chat-trigger:hover {
  transform: scale(1.08);
  border-color: #F3E5AB;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 24px rgba(212, 175, 55, 0.55);
}

#fusion-chat-trigger .badge-pulse {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #25D366;
  border: 2px solid #0D0D0D;
}

#fusion-chat-modal {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 120px);
  background: #0D0D0F;
  border: 1px solid rgba(189, 163, 88, 0.4);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), inset 0 0 40px rgba(189, 163, 88, 0.05);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #F0F0F0;
  animation: fusionModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#fusion-chat-modal.open {
  display: flex;
}

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

.fusion-chat-header {
  padding: 16px 18px;
  background: linear-gradient(180deg, #171512 0%, #0E0D0B 100%);
  border-bottom: 1px solid rgba(189, 163, 88, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.fusion-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #BDA358;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D4AF37;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 15px;
}

.fusion-chat-title-group h4 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: #FFF6D5;
  font-weight: 600;
}

.fusion-chat-title-group p {
  margin: 2px 0 0;
  font-size: 11px;
  color: #A09886;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fusion-chat-title-group p .live-dot {
  width: 7px;
  height: 7px;
  background: #25D366;
  border-radius: 50%;
  display: inline-block;
}

.fusion-chat-close {
  background: none;
  border: none;
  color: #A09886;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.fusion-chat-close:hover {
  color: #FFF;
}

.fusion-chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: radial-gradient(circle at top right, rgba(189, 163, 88, 0.04) 0%, transparent 60%);
}

.fusion-chat-body::-webkit-scrollbar {
  width: 5px;
}
.fusion-chat-body::-webkit-scrollbar-thumb {
  background: rgba(189, 163, 88, 0.25);
  border-radius: 4px;
}

.fusion-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}

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

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

.fusion-bubble {
  padding: 12px 15px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.fusion-msg.bot .fusion-bubble {
  background: #181716;
  border: 1px solid rgba(189, 163, 88, 0.2);
  color: #E6E4DF;
  border-top-left-radius: 3px;
}

.fusion-msg.user .fusion-bubble {
  background: linear-gradient(135deg, #A88732 0%, #8C6F24 100%);
  color: #FFFFFF;
  border-top-right-radius: 3px;
}

.fusion-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.fusion-chip {
  background: rgba(189, 163, 88, 0.1);
  border: 1px solid rgba(189, 163, 88, 0.35);
  color: #E8D69E;
  padding: 6px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.fusion-chip:hover {
  background: rgba(189, 163, 88, 0.25);
  border-color: #BDA358;
  color: #FFF;
}

.fusion-product-card {
  background: #141312;
  border: 1px solid rgba(189, 163, 88, 0.25);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 8px;
  display: flex;
  gap: 12px;
  padding: 8px;
}

.fusion-product-card img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(189, 163, 88, 0.2);
}

.fusion-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.fusion-product-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #F5F5F5;
  margin-bottom: 3px;
  line-height: 1.3;
}

.fusion-product-price {
  font-size: 12px;
  color: #D4AF37;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fusion-product-price del {
  font-size: 10.5px;
  color: #777;
  font-weight: 400;
}

.fusion-product-order-btn {
  margin-top: 6px;
  display: inline-block;
  padding: 4px 10px;
  background: #25D366;
  color: #000;
  font-weight: 600;
  font-size: 11px;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  align-self: flex-start;
}

.fusion-chat-footer {
  padding: 12px;
  border-top: 1px solid rgba(189, 163, 88, 0.2);
  background: #111010;
  display: flex;
  gap: 8px;
}

.fusion-chat-input {
  flex: 1;
  background: #1A1918;
  border: 1px solid rgba(189, 163, 88, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #FFF;
  outline: none;
  font-family: inherit;
}

.fusion-chat-input:focus {
  border-color: #BDA358;
}

.fusion-chat-send {
  background: linear-gradient(135deg, #D4AF37 0%, #AA822A 100%);
  border: none;
  border-radius: 8px;
  width: 42px;
  height: 42px;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
}

.fusion-chat-send:hover {
  filter: brightness(1.1);
}
