/* ─── Assel Studio — Demo Bot Widget ──────────────────────── */
:root { --bot-accent: #C87941; }

/* FAB */
.bot-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 9998;
  display: flex; align-items: center; gap: 9px;
  padding: 0 18px 0 14px; height: 46px;
  background: var(--bot-accent); color: #fff;
  border: none; border-radius: 23px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.bot-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.36); }
.bot-fab:active { transform: translateY(0); }
.bot-fab svg { flex-shrink: 0; }

/* Panel */
.bot-panel {
  position: fixed; bottom: 82px; right: 24px; z-index: 9999;
  width: 360px; max-height: 520px;
  display: flex; flex-direction: column;
  background: #111114; border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; box-shadow: 0 16px 60px rgba(0,0,0,.5);
  overflow: hidden; transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease;
}
.bot-panel--hidden {
  opacity: 0; transform: scale(.95) translateY(8px); pointer-events: none;
}
@media (max-width: 420px) {
  .bot-panel { width: calc(100vw - 24px); right: 12px; bottom: 76px; }
  .bot-fab   { right: 12px; bottom: 12px; }
}

/* Header */
.bot-header {
  display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  background: rgba(255,255,255,.03); border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.bot-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bot-accent); color: #fff;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bot-header-name { font-size: .84rem; font-weight: 700; color: #fff; }
.bot-header-status {
  font-size: .64rem; color: rgba(255,255,255,.4);
  display: flex; align-items: center; gap: 5px; margin-top: 2px;
}
.bot-status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #4ade80;
  animation: botPulse 2s ease-in-out infinite;
}
@keyframes botPulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.bot-close {
  margin-left: auto; background: none; border: none;
  color: rgba(255,255,255,.3); font-size: 20px;
  cursor: pointer; padding: 4px; line-height: 1; transition: color .15s;
}
.bot-close:hover { color: #fff; }

/* Messages */
.bot-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent;
}
.bot-body::-webkit-scrollbar { width: 3px; }
.bot-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.bot-bubble {
  max-width: 82%; padding: 10px 13px; border-radius: 14px;
  font-size: .875rem; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.bot-bubble--a {
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.88);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.bot-bubble--u {
  background: var(--bot-accent); color: #fff;
  align-self: flex-end; border-bottom-right-radius: 4px;
}

/* Typing */
.bot-typing {
  display: flex; gap: 4px; align-items: center;
  padding: 10px 13px; background: rgba(255,255,255,.07);
  border-radius: 14px; border-bottom-left-radius: 4px;
  align-self: flex-start; width: 52px;
}
.bot-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.4);
  animation: botTyping .9s ease-in-out infinite;
}
.bot-typing span:nth-child(2) { animation-delay: .15s; }
.bot-typing span:nth-child(3) { animation-delay: .30s; }
@keyframes botTyping { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }

/* Quick replies */
.bot-starters { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 12px; flex-shrink: 0; }
.bot-starter {
  padding: 6px 12px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
  color: rgba(255,255,255,.75); font-size: .78rem; font-family: inherit;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.bot-starter:hover {
  border-color: var(--bot-accent); color: #fff; background: rgba(255,255,255,.08);
}

/* Lead-Complete Card */
.bot-complete {
  margin: 0 16px 14px; padding: 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; text-align: center; flex-shrink: 0;
}
.bot-complete-title { font-size: .84rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.bot-complete-sub   { font-size: .76rem; color: rgba(255,255,255,.5); margin-bottom: 12px; }
.bot-complete-phone {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; background: var(--bot-accent); color: #fff;
  border-radius: 8px; text-decoration: none;
  font-size: .84rem; font-weight: 600; transition: opacity .15s;
}
.bot-complete-phone:hover { opacity: .88; }

/* Input */
.bot-input-row {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 14px 12px; border-top: 1px solid rgba(255,255,255,.07); flex-shrink: 0;
}
.bot-inp {
  flex: 1; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  color: #fff; font-family: inherit; font-size: .875rem;
  padding: 9px 12px; resize: none; max-height: 100px;
  line-height: 1.5; outline: none; transition: border-color .15s;
}
.bot-inp::placeholder { color: rgba(255,255,255,.25); }
.bot-inp:focus { border-color: var(--bot-accent); }
.bot-send {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--bot-accent); border: none; border-radius: 9px;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.bot-send:disabled { opacity: .35; cursor: not-allowed; }
.bot-send:not(:disabled):hover { opacity: .85; }

/* Footer */
.bot-footer {
  padding: 6px 16px 10px; font-size: .6rem;
  color: rgba(255,255,255,.18); text-align: center;
}

/* Inline embed mode (replaces contact form) — fills its column for a symmetric two-column section */
.bot-panel--inline {
  position: static;
  width: 100%; max-width: 100%;
  height: 100%; max-height: none;
  bottom: auto; right: auto;
  box-shadow: none;
  border-radius: 16px;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* Greeting + quick-replies stay grouped at the top; composer is pinned to the bottom */
.bot-panel--inline .bot-body { flex: 0 1 auto; }
.bot-panel--inline .bot-starters { margin-bottom: auto; padding-bottom: 16px; }
/* Roomy, clearly-readable composer (textarea + send button side by side) */
.bot-panel--inline .bot-input-row {
  align-items: flex-end; gap: 10px;
  padding: 16px 20px 18px;
}
.bot-panel--inline .bot-inp {
  min-height: 56px; padding: 17px 16px;
  font-size: .9rem; line-height: 1.5; border-radius: 12px;
  background: rgba(255,255,255,.08);
}
.bot-panel--inline .bot-inp::placeholder { color: rgba(255,255,255,.42); }
.bot-panel--inline .bot-send {
  width: 48px; height: 48px; border-radius: 12px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bot-fab, .bot-panel { transition: none !important; }
  .bot-status-dot, .bot-typing span { animation: none !important; }
}
