:root{
  --wc-bg:#0b1220;
  --wc-card:#0f172a;
  --wc-card2:#111c33;
  --wc-text:#e2e8f0;
  --wc-muted:#94a3b8;
  --wc-accent:#22c55e;
  --wc-accent2:#38bdf8;
  --wc-shadow:0 24px 70px rgba(2,6,23,.55);
  --wc-radius:18px;
}

.wc-fab{
  position:fixed;
  right:18px;
  bottom:18px;
  width:56px;
  height:56px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:linear-gradient(135deg,#2563eb,#0ea5e9);
  box-shadow:var(--wc-shadow);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:9999;
}
.wc-fab:focus{ outline: 2px solid rgba(56,189,248,.9); outline-offset: 2px; }

.wc-panel{
  position:fixed;
  right:18px;
  bottom:88px;
  width:min(420px, calc(100vw - 36px));
  height:min(620px, calc(100vh - 120px));
  background:linear-gradient(180deg,var(--wc-card),var(--wc-bg));
  border:1px solid rgba(148,163,184,.18);
  border-radius:var(--wc-radius);
  box-shadow:var(--wc-shadow);
  overflow:hidden;
  display:none;
  z-index:9999;
}
.wc-panel[data-open="1"]{ display:flex; flex-direction:column; }

.wc-head{
  padding:14px 14px 12px;
  background:linear-gradient(135deg,rgba(56,189,248,.22),rgba(34,197,94,.12));
  border-bottom:1px solid rgba(148,163,184,.18);
  color:var(--wc-text);
}
.wc-headTop{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.wc-title{ font-weight:900; letter-spacing:.02em; }
.wc-sub{ margin-top:6px; font-size:12px; color:rgba(226,232,240,.78); line-height:1.4; }
.wc-x{
  background:transparent; border:1px solid rgba(226,232,240,.18);
  color:var(--wc-text); border-radius:12px; padding:8px 10px; cursor:pointer;
}
.wc-x:hover{ background:rgba(226,232,240,.06); }

.wc-mode{
  display:flex; gap:8px; margin-top:10px; flex-wrap:wrap;
}
.wc-pill{
  font-size:12px;
  color:rgba(226,232,240,.9);
  border:1px solid rgba(226,232,240,.18);
  background:rgba(226,232,240,.06);
  padding:6px 10px;
  border-radius:999px;
  cursor:pointer;
  user-select:none;
}
.wc-pill[data-active="1"]{
  border-color: rgba(56,189,248,.55);
  background: rgba(56,189,248,.16);
}

.wc-body{
  padding:14px;
  overflow:auto;
  flex:1;
}
.wc-msg{
  display:flex;
  gap:10px;
  margin: 0 0 12px;
}
.wc-bubble{
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(15,23,42,.55);
  color: var(--wc-text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.wc-msg[data-role="user"]{ justify-content:flex-end; }
.wc-msg[data-role="user"] .wc-bubble{
  background: linear-gradient(135deg, rgba(37,99,235,.35), rgba(14,165,233,.16));
  border-color: rgba(56,189,248,.28);
}
.wc-msg[data-role="bot"] .wc-bubble{
  background: rgba(2,6,23,.35);
}
.wc-actions{
  margin-top: 10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.wc-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(226,232,240,.16);
  background: rgba(226,232,240,.06);
  color: rgba(226,232,240,.92);
  text-decoration:none;
  font-weight: 800;
  font-size: 12px;
}
.wc-action:hover{ background: rgba(226,232,240,.10); }

.wc-foot{
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(148,163,184,.18);
  background: rgba(2,6,23,.35);
}
.wc-inputRow{
  display:flex;
  gap:10px;
  align-items:flex-end;
}
.wc-input{
  flex:1;
  min-height: 44px;
  max-height: 140px;
  resize: none;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.20);
  background: rgba(15,23,42,.55);
  color: var(--wc-text);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}
.wc-send{
  border:0;
  border-radius: 14px;
  padding: 12px 14px;
  cursor:pointer;
  color:#03121a;
  font-weight: 950;
  background: linear-gradient(135deg, var(--wc-accent), var(--wc-accent2));
}
.wc-send:disabled{
  opacity: .55;
  cursor: not-allowed;
}
.wc-mini{
  margin-top: 8px;
  font-size: 11px;
  color: rgba(148,163,184,.92);
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.wc-link{
  color: rgba(226,232,240,.82);
  text-decoration: underline;
  cursor:pointer;
}
.wc-link:hover{ color: rgba(226,232,240,1); }
