/* PWTECH Chat widget — brand: orange #E87D3A, green #6FAC4A, ink #0B1224 */
.pwchat, .pwchat *{box-sizing:border-box}
.pwchat{
  --o:#E87D3A; --o-lt:#FF9A5C; --g:#6FAC4A; --ink:#0B1224; --deep:#04060D;
  --line:rgba(255,255,255,.12); --txt:#EAF0FF; --dim:#9AA6BF;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}

/* launcher */
.pwchat__fab{
  position:fixed; right:20px; bottom:20px; z-index:99998;
  display:flex; align-items:center; gap:9px;
  padding:13px 19px; border:0; border-radius:999px; cursor:pointer;
  background:linear-gradient(135deg,var(--o),var(--g));
  color:#fff; font-size:14.5px; font-weight:600; font-family:inherit;
  box-shadow:0 6px 22px rgba(11,18,36,.28);
  transition:transform .18s ease, box-shadow .18s ease;
}
.pwchat__fab:hover{transform:translateY(-2px); box-shadow:0 10px 28px rgba(11,18,36,.34)}
.pwchat__fab:focus-visible{outline:3px solid var(--o-lt); outline-offset:3px}
.pwchat__fab svg{width:19px;height:19px;flex:0 0 auto}
.pwchat__fab[hidden]{display:none!important}

/* panel */
.pwchat__panel{
  position:fixed; right:20px; bottom:20px; z-index:99999;
  width:min(384px,calc(100vw - 32px)); height:min(580px,calc(100vh - 40px));
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--ink); color:var(--txt);
  border:1px solid var(--line); border-radius:16px;
  box-shadow:0 24px 60px rgba(4,6,13,.5);
}
.pwchat__panel[hidden]{display:none!important}

.pwchat__head{
  display:flex; align-items:center; gap:11px; padding:15px 16px;
  border-bottom:1px solid var(--line); background:rgba(255,255,255,.03); flex:0 0 auto;
}
.pwchat__dot{width:9px;height:9px;border-radius:50%;background:var(--g);flex:0 0 auto;
  box-shadow:0 0 0 3px rgba(111,172,74,.2)}
.pwchat__title{font-weight:640;font-size:14.5px;letter-spacing:-.01em}
.pwchat__sub{font-size:11.5px;color:var(--dim);margin-top:1px}
.pwchat__x{
  margin-left:auto;background:none;border:0;color:var(--dim);cursor:pointer;
  font-size:22px;line-height:1;padding:4px 6px;border-radius:6px;font-family:inherit;
}
.pwchat__x:hover{color:var(--txt);background:rgba(255,255,255,.07)}
.pwchat__x:focus-visible{outline:2px solid var(--o-lt);outline-offset:1px}

.pwchat__log{flex:1 1 auto;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}
.pwchat__log::-webkit-scrollbar{width:7px}
.pwchat__log::-webkit-scrollbar-thumb{background:rgba(255,255,255,.16);border-radius:7px}

.pwchat__msg{max-width:88%;padding:11px 14px;border-radius:13px;font-size:14.2px;line-height:1.55;
  word-wrap:break-word;animation:pwchat-in .22s ease both}
@keyframes pwchat-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
  .pwchat__msg{animation:none}
  .pwchat__fab{transition:none}
}
.pwchat__msg--bot{align-self:flex-start;background:rgba(255,255,255,.07);border:1px solid var(--line);
  border-bottom-left-radius:5px}
.pwchat__msg--me{align-self:flex-end;background:linear-gradient(135deg,var(--o),#C85A22);color:#fff;
  border-bottom-right-radius:5px}

.pwchat__src{margin-top:9px;padding-top:9px;border-top:1px solid var(--line)}
.pwchat__src a,.pwchat__more a{
  display:block;color:var(--o-lt);text-decoration:none;font-size:13.2px;font-weight:560;padding:3px 0;
}
.pwchat__src a:hover,.pwchat__more a:hover{text-decoration:underline}
.pwchat__more{margin-top:7px}
.pwchat__more b{display:block;font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--dim);font-weight:700;margin-bottom:3px}

/* suggested chips */
.pwchat__chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:2px}
.pwchat__chip{
  background:rgba(255,255,255,.06);border:1px solid var(--line);color:var(--txt);
  border-radius:999px;padding:7px 13px;font-size:12.8px;cursor:pointer;font-family:inherit;
}
.pwchat__chip:hover{background:rgba(232,125,58,.18);border-color:var(--o)}
.pwchat__chip:focus-visible{outline:2px solid var(--o-lt);outline-offset:1px}

/* lead form */
.pwchat__lead{display:flex;gap:7px;margin-top:10px}
.pwchat__lead input{
  flex:1;background:rgba(0,0,0,.28);border:1px solid var(--line);color:var(--txt);
  border-radius:9px;padding:10px 12px;font-size:13.5px;font-family:inherit;min-width:0;
}
.pwchat__lead input:focus{outline:2px solid var(--o);outline-offset:0;border-color:var(--o)}
.pwchat__lead button{
  background:var(--g);border:0;color:#fff;border-radius:9px;padding:10px 15px;
  font-size:13.5px;font-weight:620;cursor:pointer;font-family:inherit;flex:0 0 auto;
}
.pwchat__lead button:hover{filter:brightness(1.08)}
.pwchat__lead button:focus-visible{outline:2px solid var(--o-lt);outline-offset:2px}

/* composer */
.pwchat__form{display:flex;gap:9px;padding:13px;border-top:1px solid var(--line);
  background:rgba(0,0,0,.22);flex:0 0 auto}
.pwchat__form input{
  flex:1;background:rgba(255,255,255,.07);border:1px solid var(--line);color:var(--txt);
  border-radius:999px;padding:12px 16px;font-size:14.2px;font-family:inherit;min-width:0;
}
.pwchat__form input::placeholder{color:var(--dim)}
.pwchat__form input:focus{outline:2px solid var(--o);outline-offset:0}
.pwchat__form button{
  background:linear-gradient(135deg,var(--o),var(--g));border:0;color:#fff;border-radius:50%;
  width:44px;height:44px;cursor:pointer;flex:0 0 auto;display:grid;place-items:center;
}
.pwchat__form button:disabled{opacity:.45;cursor:not-allowed}
.pwchat__form button:focus-visible{outline:2px solid var(--o-lt);outline-offset:2px}
.pwchat__form button svg{width:18px;height:18px}

/* typing */
.pwchat__typing{display:flex;gap:4px;align-items:center;padding:12px 14px}
.pwchat__typing i{width:6px;height:6px;border-radius:50%;background:var(--dim);
  animation:pwchat-b 1.1s infinite ease-in-out}
.pwchat__typing i:nth-child(2){animation-delay:.16s}
.pwchat__typing i:nth-child(3){animation-delay:.32s}
@keyframes pwchat-b{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.pwchat__typing i{animation:none;opacity:.6}}

.pwchat__foot{font-size:10.5px;color:var(--dim);text-align:center;padding:0 13px 10px}

@media (max-width:480px){
  .pwchat__panel{right:0;bottom:0;width:100vw;height:100dvh;border-radius:0;border:0}
  .pwchat__fab{right:14px;bottom:14px;padding:12px 17px}
}

/* ---- chat contact gate ---------------------------------------------- */
.pwchat__gate{ display:flex; flex-direction:column; gap:.55rem; }
.pwchat__gatetext{ margin:0; font-size:.9rem; line-height:1.5; }
.pwchat__gate input{ width:100%; padding:.6rem .7rem; border-radius:9px;
  border:1px solid rgba(148,163,196,.45); background:rgba(255,255,255,.06);
  color:inherit; font:inherit; }
.pwchat__gate input:focus{ outline:2px solid var(--pw-orange,#E87D3A); outline-offset:1px; }
.pwchat__gateerr{ margin:0; min-height:1.1em; font-size:.8rem; color:#E4776A; }
.pwchat__gaterow{ display:flex; gap:.5rem; align-items:center; }
.pwchat__gatego{ flex:0 0 auto; padding:.55rem 1rem; border:0; border-radius:9px; cursor:pointer;
  font-weight:600; font-size:.88rem; color:#fff;
  background:linear-gradient(135deg,var(--pw-orange,#E87D3A),#D4652A); }
.pwchat__gatego[disabled]{ opacity:.6; cursor:default; }
.pwchat__gateskip{ background:none; border:0; cursor:pointer; font:inherit; font-size:.82rem;
  opacity:.7; text-decoration:underline; text-underline-offset:3px; color:inherit; }
.pwchat__gateskip:hover{ opacity:1; }
