/* LiftCoach Floating Chat Widget */
.liftcoach-trigger {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--lc-accent, #e94560);
  color: white;
  border: none;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.liftcoach-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(233, 69, 96, 0.5);
}

.liftcoach-trigger .bi-chat-dots { animation: none; }

.liftcoach-trigger.has-unread::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 14px; height: 14px;
  background: #2dce89;
  border: 2px solid var(--lc-body-bg, #0a0a18);
  border-radius: 50%;
}

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

.liftcoach-widget {
  position: fixed;
  bottom: 0; right: 0;
  width: 100%; height: 100%;
  background: var(--lc-card-bg, #12122a);
  z-index: 9998;
  display: none;
  flex-direction: column;
}

.liftcoach-widget.open { display: flex; }

.liftcoach-widget.open ~ .liftcoach-trigger { display: none; }

.liftcoach-header {
  background: var(--lc-primary, #1a1a2e);
  color: white;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.liftcoach-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--lc-accent, #e94560);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.liftcoach-avatar img { width: 100%; height: 100%; object-fit: cover; }

.liftcoach-header-info { flex: 1; min-width: 0; }

.liftcoach-header-name { font-weight: 700; font-size: 0.95rem; }

.liftcoach-header-status {
  font-size: 0.7rem;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 4px;
}

.liftcoach-header-status .status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #2dce89;
  display: inline-block;
}

.liftcoach-close-btn {
  background: none; border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.liftcoach-close-btn:hover { opacity: 1; }

.liftcoach-messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.liftcoach-msg {
  display: flex;
  gap: 8px;
  max-width: 88%;
}

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

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

.liftcoach-msg-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--lc-accent, #e94560);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.liftcoach-msg.user .liftcoach-msg-avatar {
  background: var(--lc-gray-600, #495057);
}

.liftcoach-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.liftcoach-msg.bot .liftcoach-msg-bubble {
  background: var(--lc-primary, #1a1a2e);
  color: var(--lc-text, #e0e0ff);
  border-bottom-left-radius: 4px;
}

.liftcoach-msg.user .liftcoach-msg-bubble {
  background: var(--lc-accent, #e94560);
  color: white;
  border-bottom-right-radius: 4px;
}

.liftcoach-msg-time {
  font-size: 0.6rem;
  opacity: 0.4;
  margin-top: 4px;
  color: var(--lc-text-muted, #888);
}

.liftcoach-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--lc-primary, #1a1a2e);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.liftcoach-typing-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--lc-text-muted, #888);
  animation: liftcoach-bounce 1.4s infinite ease-in-out;
}

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

.liftcoach-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: var(--lc-card-bg, #12122a);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.liftcoach-input {
  flex: 1;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  background: var(--lc-primary, #1a1a2e);
  color: var(--lc-text, #e0e0ff);
  transition: border-color 0.2s;
}

.liftcoach-input::placeholder { color: var(--lc-text-muted, #666); }

.liftcoach-input:focus {
  border-color: var(--lc-accent, #e94560);
}

.liftcoach-send-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--lc-accent, #e94560);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
  flex-shrink: 0;
}

.liftcoach-send-btn:hover { background: #d63851; }

.liftcoach-send-btn:disabled { background: #495057; cursor: not-allowed; }

.liftcoach-welcome {
  text-align: center;
  padding: 24px 20px;
  color: var(--lc-text-muted, #888);
}

.liftcoach-welcome-icon {
  font-size: 2.5rem;
  color: var(--lc-accent, #e94560);
  margin-bottom: 12px;
}

.liftcoach-welcome h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--lc-text, #e0e0ff);
  margin-bottom: 6px;
}

.liftcoach-welcome p {
  font-size: 0.8rem;
  margin-bottom: 0;
}

@media (min-width: 480px) {
  .liftcoach-trigger { bottom: 24px; right: 24px; width: 60px; height: 60px; font-size: 1.5rem; }

  .liftcoach-widget {
    bottom: 90px; right: 24px;
    width: 380px; height: 560px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: -5px 0 40px rgba(0, 0, 0, 0.3);
  }

  .liftcoach-msg { max-width: 85%; }

  .liftcoach-widget.open ~ .liftcoach-trigger { display: flex; }
}

@media (min-width: 768px) {
  .liftcoach-widget { width: 400px; height: 600px; }
}

body.liftcoach-body-locked {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ── Suggestion Chips ── */
.liftcoach-suggestions {
  padding: 8px 16px 4px;
  flex-shrink: 0;
}
.suggestions-title {
  font-size: 0.7rem;
  color: var(--lc-text-muted, #888);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.suggestion-chip {
  background: rgba(233,69,96,0.12);
  border: 1px solid rgba(233,69,96,0.2);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 0.72rem;
  color: var(--lc-text, #e0e0ff);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.suggestion-chip:hover {
  background: rgba(233,69,96,0.25);
  border-color: var(--lc-accent, #e94560);
}

/* ── Product Cards ── */
.liftcoach-product-cards {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-card-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 10px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}
.product-card-mini:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--lc-accent, #e94560);
}
.product-card-mini-info {
  flex: 1;
  min-width: 0;
}
.product-card-mini-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lc-text, #e0e0ff);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-mini-price {
  font-size: 0.72rem;
  color: var(--lc-accent, #e94560);
  font-weight: 700;
  margin-top: 2px;
}
.product-card-mini-add {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--lc-accent, #e94560);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.2s;
}
.product-card-mini-add:hover {
  background: #d63851;
}

/* ── Toast ── */
.lc-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--lc-accent, #e94560);
  color: white;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 99999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.lc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Inline add-to-cart in bot message ── */
.liftcoach-msg.bot .liftcoach-msg-bubble + .liftcoach-product-cards {
  margin-top: 4px;
}