/* Élő chat ablak (látogatók, regisztráltak, ügyfelek) */
#pgh-chat{position:fixed;right:18px;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:150;font:400 15px/1.45 'Inter','Segoe UI',system-ui,sans-serif;color:#12304f}
#pgh-chat *{box-sizing:border-box}
.cw-launch{position:relative;display:flex;align-items:center;gap:10px;border:0;cursor:pointer;background:#e8573d;color:#fff;font:700 .95rem 'Inter',sans-serif;padding:13px 20px 13px 16px;border-radius:999px;box-shadow:0 10px 28px rgba(20,50,90,.32);transition:transform .15s,background .15s}
.cw-launch:hover{background:#cf4128;transform:translateY(-1px)}
.cw-launch svg{width:22px;height:22px;fill:#fff}
.cw-badge{position:absolute;top:-16px;right:-10px;min-width:30px;padding:5px 11px;border-radius:999px;background:#d8232f;color:#fff;font:800 .78rem 'Inter',sans-serif;white-space:nowrap;box-shadow:0 0 0 3px #fff,0 6px 16px rgba(216,35,47,.55)}
.cw-badge::before,.cw-badge::after{content:"";position:absolute;inset:-3px;border-radius:999px;border:2px solid #d8232f;opacity:0;animation:cw-ring 1.9s ease-out infinite}
.cw-badge::after{animation-delay:.95s}
@keyframes cw-ring{0%{transform:scale(1);opacity:.85}100%{transform:scale(1.55,1.9);opacity:0}}
.cw-panel{position:absolute;right:0;bottom:0;width:360px;max-width:calc(100vw - 24px);height:520px;max-height:calc(100vh - 36px);display:flex;flex-direction:column;background:#fff;border:1px solid #d3dce7;border-radius:18px;overflow:hidden;box-shadow:0 24px 70px rgba(20,50,90,.38);animation:cw-in .22s cubic-bezier(.2,.9,.3,1.2)}
@keyframes cw-in{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:none}}
.cw-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;background:#3b75a5;color:#fff}
.cw-head .cw-sup{flex:none}
.cw-head h3{margin:0;font:800 1rem 'Inter',sans-serif;color:#fff}
.cw-head small{display:block;color:#dbe9f6;font-size:.8rem;line-height:1.3}
.cw-head .cw-x{margin-left:auto;flex:none;width:34px;height:34px;border-radius:9px;border:1px solid rgba(255,255,255,.4);background:rgba(255,255,255,.12);color:#fff;font-size:1.25rem;line-height:1;cursor:pointer}
.cw-head .cw-x:hover{background:rgba(255,255,255,.26)}
.cw-body{flex:1;overflow-y:auto;padding:16px 14px;background:#eef2f7;display:flex;flex-direction:column;gap:12px}
.cw-intro{margin:auto 0;text-align:center;color:#566b88;font-size:.92rem;padding:10px 16px}
.cw-intro b{display:block;color:#1b4a80;font-size:1.05rem;margin-bottom:4px}
.cw-row{display:flex;gap:9px;align-items:flex-end;max-width:100%}
.cw-row.me{flex-direction:row-reverse}
.cw-bub{max-width:78%;padding:8px 12px 7px;border-radius:14px;background:#fff;border:1px solid #d3dce7;word-break:break-word;white-space:pre-wrap}
.cw-row.me .cw-bub{background:#e4eef8;border-color:#c5d8ea}
.cw-row.sup .cw-bub{background:#1b4a80;border-color:#1b4a80;color:#fff}
.cw-who{display:block;font:700 .72rem 'Inter',sans-serif;color:#566b88;margin-bottom:2px}
.cw-row.sup .cw-who{color:#bcd6ee}
.cw-time{display:block;text-align:right;font-size:.68rem;opacity:.6;margin-top:2px}
.cw-sys{align-self:center;font-size:.8rem;color:#566b88;background:#dfe8f1;border-radius:999px;padding:4px 12px;text-align:center}
.cw-ph,.cw-sup{position:relative;flex:none;width:34px;height:34px;border-radius:50%;overflow:hidden}
.cw-ph{background:#c4c9cf}
.cw-ph::before{content:"";position:absolute;left:50%;top:6px;width:13px;height:13px;margin-left:-6.5px;border-radius:50%;background:#8c939b}
.cw-ph::after{content:"";position:absolute;left:50%;top:21px;width:24px;height:20px;margin-left:-12px;border-radius:12px 12px 0 0;background:#8c939b}
.cw-sup{background:#3b75a5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 14v-2a8 8 0 0116 0v2'/%3E%3Crect x='3' y='13' width='4' height='6' rx='1.5' fill='white'/%3E%3Crect x='17' y='13' width='4' height='6' rx='1.5' fill='white'/%3E%3Cpath d='M19 19c0 2-2 3-5 3'/%3E%3C/svg%3E") center/70% no-repeat}
.cw-foot{border-top:1px solid #d3dce7;background:#fff;padding:10px}
.cw-foot form{display:flex;gap:8px;align-items:flex-end}
.cw-foot textarea{flex:1;resize:none;height:42px;max-height:110px;border:1px solid #d3dce7;border-radius:12px;padding:10px 12px;font:inherit;background:#fff;color:#12304f}
.cw-foot textarea:focus{outline:2px solid #3b75a566;border-color:#3b75a5}
.cw-send{flex:none;height:42px;padding:0 16px;border:0;border-radius:12px;background:#e8573d;color:#fff;font:700 .92rem 'Inter',sans-serif;cursor:pointer}
.cw-send:hover{background:#cf4128}.cw-send:disabled{opacity:.55;cursor:default}
.cw-err{color:#a3202f;font-size:.8rem;margin:6px 2px 0}
.cw-rate{padding:6px 4px;text-align:center}
.cw-rate b{display:block;font-size:1.05rem;color:#1b4a80;margin-bottom:2px}
.cw-stars{display:flex;justify-content:center;gap:4px;margin:10px 0}
.cw-stars button{border:0;background:none;font-size:2rem;line-height:1;cursor:pointer;color:#c9d3df;padding:2px 3px;transition:transform .12s,color .12s}
.cw-stars button.on{color:#ffb020}.cw-stars button:hover{transform:scale(1.18)}
.cw-rate textarea{width:100%;height:78px;border:1px solid #d3dce7;border-radius:12px;padding:10px 12px;font:inherit;resize:none;margin-bottom:8px}
.cw-rate .cw-send{width:100%}
.cw-skip{display:inline-block;margin-top:8px;border:0;background:none;color:#566b88;font-size:.84rem;cursor:pointer;text-decoration:underline}
@media(max-width:520px){#pgh-chat{right:10px;bottom:calc(10px + env(safe-area-inset-bottom,0px))}.cw-panel{width:calc(100vw - 20px);height:calc(100vh - 20px);height:calc(100dvh - 20px)}}
@media(prefers-reduced-motion:reduce){.cw-badge::before,.cw-badge::after,.cw-panel{animation:none}}
