/* Container */
#woo-chatbot-block {
  --cb-bg: #ffffff;
  --cb-bg-2: #f7fafc;
  --cb-primary: #4f46e5; /* indigo */
  --cb-primary-2: #6366f1;
  --cb-accent: #0ea5e9; /* sky */
  --cb-text: #111827;
  --cb-muted: #6b7280;
  --cb-border: #e5e7eb;

  border: 1px solid var(--cb-border);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--cb-bg) 0%, var(--cb-bg-2) 100%);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  margin-top: 16px;
  overflow: hidden;
}

/* Header */
.woo-chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #ffffff80;
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--cb-border);
}
.woo-chatbot-header-left { display:flex; align-items:center; gap:10px; }
.woo-chatbot-avatar {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 18px; line-height: 1;
}
.woo-chatbot-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.woo-chatbot-title { display:flex; flex-direction:column; line-height: 1.1; }
.woo-chatbot-title strong { color: var(--cb-text); font-weight: 700; font-size: 14px; }
.woo-chatbot-subtitle { color: #10b981; font-size: 12px; font-weight: 600; }

/* Messages */
.woo-chatbot-messages {
  height: 320px;
  overflow-y: auto;
  background: #fff;
  padding: 12px;
}

.woo-msg { display: flex; align-items: flex-end; gap: 8px; margin: 10px 0; }
.woo-msg.bot { justify-content: flex-start; }
.woo-msg.user { justify-content: flex-end; }

.woo-msg-avatar { flex: 0 0 28px; }
.woo-avatar-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px; font-size: 13px;
  background: #eef2ff; color: var(--cb-primary);
}
.woo-avatar-img { width: 28px; height: 28px; border-radius: 999px; object-fit: cover; display: inline-block; }
.woo-msg.user .woo-avatar-circle { background: #e0f2fe; color: var(--cb-accent); }

.woo-msg-bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px; line-height: 1.35;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.woo-msg.bot .woo-msg-bubble {
  background: #f3f4f6;
  border-bottom-left-radius: 4px;
}
.woo-msg.user .woo-msg-bubble {
  background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-primary-2) 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.woo-msg-text { white-space: pre-wrap; word-wrap: break-word; }

/* Input bar */
.woo-chatbot-inputbar {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid var(--cb-border);
}
.woo-chatbot-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--cb-border);
  border-radius: 999px;
  font-size: 14px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.woo-chatbot-input:focus {
  border-color: #ff5a07;
  box-shadow: 0 0 0 3px rgba(255, 90, 7, 0.25);
}
.woo-chatbot-send {
  padding: 10px 14px;
  border: 0; border-radius: 999px; cursor: pointer;
background: linear-gradient(135deg, #ffb347, #ff5a07);
  color: #fff; font-weight: 600; font-size: 14px;
  transition: transform .05s ease, filter .2s ease;
}
.woo-chatbot-send:hover { filter: brightness(1.05); }
.woo-chatbot-send:active { transform: translateY(1px); }

/* Inline actions (buttons sent by bot) */
.woo-inline-actions { margin-top: 8px; display:flex; flex-wrap: wrap; gap:8px; }
.woo-inline-btn {
  display:inline-block; padding:6px 10px; border:1px solid var(--cb-border);
  background:#fff; color:#111827; border-radius:999px; font-size:12px;
  text-decoration:none;
}
.woo-inline-btn:hover { background:#f3f4f6; }

/* Quick replies removed */

/* Typing indicator */
.woo-typing { display:flex; align-items:center; gap:8px; margin: 10px 0; }
.woo-typing .dots { display:inline-flex; gap:4px; padding: 8px 10px; background:#f3f4f6; border-radius:12px; }
.woo-typing .dot { width:6px; height:6px; border-radius:50%; background:#9ca3af; opacity:.6; animation: woo-bounce 1s infinite; }
.woo-typing .dot:nth-child(2){ animation-delay: .15s; }
.woo-typing .dot:nth-child(3){ animation-delay: .3s; }
@keyframes woo-bounce { 0%,80%,100%{ transform: translateY(0); opacity:.6 } 40%{ transform: translateY(-3px); opacity:1 } }

/* Scrollbar (webkit) */
.woo-chatbot-messages::-webkit-scrollbar { width: 10px; }
.woo-chatbot-messages::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 8px; }
.woo-chatbot-messages::-webkit-scrollbar-thumb:hover { background: #d1d5db; }
