.pxai {
  --pxai-dark: #087e13;
  --pxai-accent: #14AD23;
  --pxai-light: #f1faf2;
  bottom: 22px;
  font-family: Arial, sans-serif;
  position: fixed;
  right: 22px;
  z-index: 999999;
}

.pxai *, .pxai *::before, .pxai *::after { box-sizing: border-box; }

.pxai__launcher {
  align-items: center;
  background: var(--pxai-accent);
  border: 0;
  border-radius: 999px;
  bottom: 0;
  box-shadow: 0 10px 28px rgba(23, 21, 47, .28);
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  gap: 7px;
  height: 52px;
  justify-content: center;
  position: absolute;
  right: 0;
  padding: 0 17px;
  white-space: nowrap;
  width: auto;
}
.pxai__launcher svg { fill: currentColor; height: 22px; width: 22px; }

.pxai__panel {
  background: #fff;
  border-radius: 18px;
  bottom: 72px;
  box-shadow: 0 18px 55px rgba(23, 21, 47, .25);
  height: min(570px, calc(100vh - 120px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(370px, calc(100vw - 32px));
}

.pxai__panel[hidden] { display: none; }

.pxai__header {
  align-items: center;
  background: var(--pxai-accent);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 16px;
}

.pxai__header strong, .pxai__header small { display: block; }
.pxai__header small { color: #c9f6d3; margin-top: 3px; }
.pxai__header button { background: transparent; border: 0; color: #fff; cursor: pointer; font-size: 28px; line-height: 1; }

.pxai__messages {
  background: var(--pxai-light);
  height: calc(100% - 176px);
  overflow-y: auto;
  padding: 16px;
}

.pxai__message {
  background: #fff;
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 3px 12px rgba(23, 21, 47, .07);
  color: #27233f;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 38px 12px 0;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.pxai__message--user {
  background: var(--pxai-accent);
  border-radius: 14px 14px 4px 14px;
  color: #fff;
  margin-left: 38px;
  margin-right: 0;
}

.pxai__message--typing { align-items:center; display:flex; gap:5px; min-height:38px; width:54px; }
.pxai__typing-dot { animation:pxaiTyping 1.2s infinite ease-in-out; background:#77738b; border-radius:50%; display:block; height:7px; width:7px; }
.pxai__typing-dot:nth-child(2) { animation-delay:.15s; }
.pxai__typing-dot:nth-child(3) { animation-delay:.3s; }
@keyframes pxaiTyping { 0%, 60%, 100% { opacity:.35; transform:translateY(0); } 30% { opacity:1; transform:translateY(-4px); } }
.pxai__message a { color:inherit; font-weight:700; text-decoration:underline; word-break:break-word; }

.pxai__form { background: #fff; display: flex; gap: 8px; padding: 12px; }
.pxai__form textarea { border: 1px solid #d9d5e5; border-radius: 11px; font: inherit; min-height: 42px; padding: 10px; resize: none; width: 100%; }
.pxai__form button { background: var(--pxai-accent); border: 0; border-radius: 11px; color: #fff; cursor: pointer; font-weight: 700; padding: 0 14px; }
.pxai__form button:disabled { cursor: wait; opacity: .6; }
.pxai__form textarea:disabled { background:#f3f3f3; cursor:not-allowed; }
.pxai__notice { background: #fff; color: #77738b; display: block; font-size: 10px; padding: 0 12px 9px; text-align: center; }
.pxai__notice a { color: inherit; text-decoration: underline; }

.pxai__lead { background:#fff; border:1px solid #ded9e8; border-radius:14px; margin:0 0 12px; padding:12px; }
.pxai__lead form { display:grid; gap:8px; }
.pxai__lead-explanation { color:#5f5a70; font-size:12px; line-height:1.45; margin:0; }
.pxai__lead input[type="text"], .pxai__lead input[type="email"], .pxai__lead input[type="tel"] { border:1px solid #d9d5e5; border-radius:9px; font:inherit; padding:9px; width:100%; }
.pxai__lead button { background:var(--pxai-accent); border:0; border-radius:9px; color:#fff; cursor:pointer; font-weight:700; padding:10px; }
.pxai__lead button:disabled { opacity:.6; }
.pxai__consent { color:#5f5a70; font-size:11px; line-height:1.35; }
.pxai__consent a { color:inherit; text-decoration:underline; }
.pxai__lead--success { background:#eaf8ee; color:#246b38; }
.pxai__lead-error { color:#b32d2e; }

@media (max-width: 480px) {
  .pxai { bottom: 14px; right: 14px; }
  .pxai__panel { bottom: 68px; height: calc(100vh - 100px); }
}
