/* Simple AI Chatbot Pro UI */
:root{
  --sacp-bg:#ffffff;
  --sacp-text:#0f172a;
  --sacp-muted:#64748b;
  --sacp-border:rgba(15,23,42,.12);
  --sacp-shadow:0 16px 50px rgba(2,6,23,.18);
  --sacp-brand:#2271b1;
  --sacp-brand-2:#1d4ed8;
}

.sacp-launcher{
  position:fixed;
  right:18px;
  bottom:18px;
  width:56px;
  height:56px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--sacp-brand),var(--sacp-brand-2));
  box-shadow:0 14px 30px rgba(29,78,216,.28);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:999999;
  user-select:none;
  outline:none;
}
.sacp-launcher svg{ width:26px; height:26px; fill:white; opacity:.95; }
.sacp-launcher-dot{
  position:absolute;
  top:10px;
  right:10px;
  width:10px;
  height:10px;
  background:#22c55e;
  border:2px solid rgba(255,255,255,.95);
  border-radius:999px;
  box-shadow:0 6px 12px rgba(34,197,94,.25);
}

.sacp-backdrop{
  position:fixed;
  inset:0;
  background:rgba(2,6,23,.35);
  z-index:999998;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}
.sacp-backdrop.is-open{
  opacity:1;
  pointer-events:auto;
}

.sacp-panel{
  position:fixed;
  right:18px;
  bottom:86px;
  width:360px;
  max-width:calc(100vw - 36px);
  height:520px;
  max-height:calc(100vh - 120px);
  border-radius:18px;
  background:var(--sacp-bg);
  border:1px solid var(--sacp-border);
  box-shadow:var(--sacp-shadow);
  z-index:999999;
  transform:translateY(10px) scale(.98);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
  overflow:hidden;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--sacp-text);
}
.sacp-panel.is-open{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}

.sacp-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  background:linear-gradient(135deg,var(--sacp-brand),var(--sacp-brand-2));
  color:#fff;
}
.sacp-title{
  font-weight:700;
  letter-spacing:.2px;
  font-size:14px;
}
.sacp-close{
  appearance:none;
  border:none;
  background:rgba(255,255,255,.14);
  color:#fff;
  width:32px;
  height:32px;
  border-radius:10px;
  font-size:20px;
  line-height:28px;
  cursor:pointer;
}

.sacp-body{
  display:flex;
  flex-direction:column;
  height:calc(100% - 56px);
}
.sacp-messages{
  flex:1;
  overflow:auto;
  padding:14px;
}
.sacp-bubble{
  max-width:86%;
  padding:10px 12px;
  border-radius:14px;
  margin:8px 0;
  font-size:13px;
  line-height:1.35;
  white-space:pre-wrap;
  border:1px solid var(--sacp-border);
}
.sacp-bubble.user{
  margin-left:auto;
  background:#eff6ff;
  border-color:rgba(29,78,216,.18);
}
.sacp-bubble.bot{
  margin-right:auto;
  background:#ffffff;
}
.sacp-meta{
  font-size:11px;
  color:var(--sacp-muted);
  margin-top:4px;
}

.sacp-inputbar{
  display:flex;
  gap:8px;
  padding:12px;
  border-top:1px solid var(--sacp-border);
  background:#fff;
}
.sacp-inputbar input{
  flex:1;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--sacp-border);
  outline:none;
  font-size:13px;
}
.sacp-inputbar button{
  padding:10px 12px;
  border-radius:12px;
  border:none;
  cursor:pointer;
  background:linear-gradient(135deg,var(--sacp-brand),var(--sacp-brand-2));
  color:#fff;
  font-weight:700;
  font-size:13px;
}
.sacp-footnote{
  padding:0 12px 12px;
  font-size:11px;
  color:var(--sacp-muted);
}

@media (max-width:420px){
  .sacp-panel{ width:calc(100vw - 28px); right:14px; }
  .sacp-launcher{ right:14px; bottom:14px; }
}
