/* Webstreet Chatbot — Messenger-style */
#webstreet-chatbot-root,
#webstreet-chatbot-root * {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wsc-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: #0084ff;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(0, 132, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.wsc-launcher:hover { transform: scale(1.05); }
.wsc-launcher svg { width: 24px; height: 24px; }

.wsc-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 999999;
  width: 92vw;
  max-width: 380px;
  height: 70vh;
  max-height: 600px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: wsc-slide-up 0.25s ease-out;
}
@keyframes wsc-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wsc-header {
  background: #0084ff;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wsc-avatar {
  width: 36px; height: 36px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.wsc-header-info { flex: 1; }
.wsc-header-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.wsc-header-status { font-size: 11px; opacity: 0.85; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.wsc-dot { width: 6px; height: 6px; border-radius: 9999px; background: #4ade80; }
.wsc-restart {
  background: none; border: none; color: #fff;
  font-size: 11px; cursor: pointer; opacity: 0.8;
  text-decoration: underline;
}
.wsc-restart:hover { opacity: 1; }

.wsc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  background: #f4f6fa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wsc-row { display: flex; }
.wsc-row.user { justify-content: flex-end; }
.wsc-row.bot  { justify-content: flex-start; }
.wsc-bubble {
  max-width: 80%;
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
  word-wrap: break-word;
}
.wsc-row.user .wsc-bubble {
  background: #0084ff;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.wsc-row.bot .wsc-bubble {
  background: #fff;
  color: #1e293b;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.wsc-typing {
  display: inline-flex;
  gap: 4px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.wsc-typing span {
  width: 7px; height: 7px;
  background: #94a3b8;
  border-radius: 9999px;
  animation: wsc-bounce 1.2s infinite ease-in-out;
}
.wsc-typing span:nth-child(1) { animation-delay: -0.3s; }
.wsc-typing span:nth-child(2) { animation-delay: -0.15s; }
@keyframes wsc-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.wsc-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}
.wsc-choice {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 9999px;
  border: 1px solid #0084ff;
  color: #0084ff;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wsc-choice:hover { background: #0084ff; color: #fff; }

.wsc-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 9999px;
  background: #0084ff;
  color: #fff !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-top: 8px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.wsc-cta:hover { filter: brightness(1.1); }
.wsc-cta svg { width: 16px; height: 16px; }

.wsc-end-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.wsc-link-btn {
  background: none; border: none; cursor: pointer;
  color: #64748b; font-size: 12px; text-decoration: underline;
  padding: 4px;
}
.wsc-link-btn:hover { color: #334155; }

.wsc-input-bar {
  border-top: 1px solid #e2e8f0;
  padding: 8px;
  background: #fff;
  display: flex;
  gap: 8px;
}
.wsc-input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: #1e293b;
}
.wsc-input:focus { border-color: #0084ff; box-shadow: 0 0 0 2px rgba(0,132,255,0.2); }
.wsc-send {
  width: 38px; height: 38px;
  border-radius: 9999px;
  background: #0084ff;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wsc-send:hover { background: #0073e0; }
.wsc-send svg { width: 16px; height: 16px; }

.wsc-fb-fallback {
  border-top: 1px solid #e2e8f0;
  padding: 10px;
  background: #fff;
  text-align: center;
}
.wsc-fb-fallback a {
  color: #64748b;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.wsc-fb-fallback a:hover { color: #0084ff; }
.wsc-fb-fallback svg { width: 14px; height: 14px; }
