.promochat {
  --pc-accent: #4f46e5;
  --pc-bg: #ffffff;
  --pc-soft: #f4f5f9;
  --pc-text: #1c1f2a;
  --pc-muted: #6b7183;
  --pc-line: #e4e6ee;
  --pc-good: #16a34a;
  --pc-mid: #d97706;
  --pc-low: #dc2626;
  font-family: "Assistant", "Rubik", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--pc-text);
  line-height: 1.55;
  font-size: 15px;
  text-align: right;
  box-sizing: border-box;
}
.promochat *, .promochat *::before, .promochat *::after { box-sizing: border-box; }

/* Panel */
.pc-panel {
  background: var(--pc-bg);
  border: 1px solid var(--pc-line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(20, 24, 40, .10);
}
.promochat--inline .pc-panel { height: 640px; max-height: 85vh; max-width: 760px; margin: 0 auto; }

.pc-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--pc-accent);
  color: #fff;
}
.pc-head strong { flex: 1; font-size: 16px; }
.pc-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.pc-head button {
  background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 999px;
  padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer;
}
.pc-head .pc-close { font-size: 20px; line-height: 1; padding: 2px 10px; }

.pc-log { flex: 1; overflow-y: auto; padding: 16px; background: var(--pc-soft); display: flex; flex-direction: column; gap: 10px; }

.pc-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; word-wrap: break-word; }
.pc-bot { background: var(--pc-bg); border: 1px solid var(--pc-line); align-self: flex-start; border-top-right-radius: 4px; }
.pc-user { background: var(--pc-accent); color: #fff; align-self: flex-end; border-top-left-radius: 4px; direction: ltr; text-align: left; }
.pc-wide { max-width: 100%; width: 100%; }
.pc-err { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.pc-msg p { margin: 0 0 6px; }
.pc-msg h4 { margin: 12px 0 4px; font-size: 15px; color: var(--pc-accent); }
.pc-msg h4:first-child { margin-top: 0; }
.pc-msg ul, .pc-msg ol { margin: 0 0 6px; padding-right: 20px; padding-left: 0; }
.pc-msg li { margin-bottom: 3px; }

/* Typing */
.pc-typing { display: inline-flex; gap: 4px; vertical-align: middle; }
.pc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--pc-muted); animation: pc-b 1s infinite; }
.pc-typing i:nth-child(2) { animation-delay: .15s; }
.pc-typing i:nth-child(3) { animation-delay: .3s; }
.pc-step { color: var(--pc-muted); font-size: 14px; margin-right: 6px; }
@keyframes pc-b { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Score card */
.pc-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pc-ring {
  --c: var(--pc-mid);
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--pc-line) 0);
  display: grid; place-items: center;
}
.pc-ring span { width: 56px; height: 56px; border-radius: 50%; background: var(--pc-bg); display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.pc-ring.pc-good { --c: var(--pc-good); }
.pc-ring.pc-low { --c: var(--pc-low); }
.pc-url { font-weight: 700; direction: ltr; text-align: right; word-break: break-all; }
.pc-sub { color: var(--pc-muted); font-size: 13px; }

.pc-bar { margin-bottom: 8px; }
.pc-bar-l { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 3px; }
.pc-track { height: 7px; background: var(--pc-line); border-radius: 99px; overflow: hidden; }
.pc-fill { height: 100%; border-radius: 99px; background: var(--pc-mid); transition: width .8s ease; }
.pc-fill.pc-good { background: var(--pc-good); }
.pc-fill.pc-low { background: var(--pc-low); }

.pc-checks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pc-chip { font-size: 12px; padding: 3px 9px; border-radius: 99px; }
.pc-chip.ok { background: #dcfce7; color: #166534; }
.pc-chip.no { background: #fee2e2; color: #991b1b; }

/* Lead */
.pc-lead strong { display: block; margin-bottom: 8px; }
.pc-cta { display: inline-block; background: var(--pc-accent); color: #fff !important; text-decoration: none; padding: 8px 16px; border-radius: 10px; margin-bottom: 8px; font-weight: 600; }
.pc-lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-lead-form input, .pc-form input {
  font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--pc-line); border-radius: 10px;
  background: #fff; color: var(--pc-text); width: 100%; min-width: 0;
}
.pc-lead-form input[name="email"], .pc-lead-form button { grid-column: 1 / -1; }
.pc-lead-form button {
  font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 11px; cursor: pointer;
  background: var(--pc-accent); color: #fff;
}
.pc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.pc-thanks { color: var(--pc-good); font-weight: 600; margin: 0; }

/* Suggestions */
.pc-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-sugg button {
  font: inherit; font-size: 13px; background: var(--pc-bg); border: 1px solid var(--pc-accent); color: var(--pc-accent);
  border-radius: 99px; padding: 5px 12px; cursor: pointer;
}

/* Input */
.pc-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--pc-line); background: var(--pc-bg); }
.pc-form input:focus, .pc-lead-form input:focus { outline: 2px solid var(--pc-accent); outline-offset: -1px; }
.pc-send {
  flex: none; width: 46px; border: 0; border-radius: 12px; background: var(--pc-accent); color: #fff;
  cursor: pointer; display: grid; place-items: center;
}
.pc-send:disabled, .pc-form input:disabled { opacity: .5; cursor: not-allowed; }

/* Floating mode */
.promochat--floating { position: fixed; bottom: 20px; left: 20px; z-index: 99999; }
.promochat--floating .pc-panel {
  position: absolute; bottom: 72px; left: 0;
  width: 390px; height: 600px; max-height: calc(100vh - 110px);
  opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; transition: .2s ease;
}
.promochat--floating.pc-open .pc-panel { opacity: 1; transform: none; pointer-events: auto; }
.pc-launcher {
  width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pc-accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(20, 24, 40, .25);
}
@media (max-width: 480px) {
  .promochat--floating { bottom: 14px; left: 14px; }
  .promochat--floating .pc-panel { position: fixed; inset: 0; width: auto; height: auto; max-height: none; border-radius: 0; }
  .promochat--inline .pc-panel { height: 80vh; border-radius: 14px; }
  .pc-lead-form { grid-template-columns: 1fr; }
}
