.atc-root{--atc-c:#0f766e;position:fixed;bottom:20px;z-index:99999;font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:#1c1f23}
.atc-root.atc-right{right:20px}
.atc-root.atc-left{left:20px}
.atc-root *{box-sizing:border-box}
.atc-bubble{position:relative;width:58px;height:58px;border:0;border-radius:50%;background:var(--atc-c);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 20px rgba(0,0,0,.22);transition:transform .15s}
.atc-bubble:hover{transform:scale(1.06)}
.atc-root button:focus-visible,.atc-root a:focus-visible{outline:3px solid var(--atc-c);outline-offset:2px}
.atc-bubble:focus-visible,.atc-close:focus-visible{outline-color:#fff;outline-offset:-5px;box-shadow:0 0 0 3px var(--atc-c)}
.atc-bubble svg{width:26px;height:26px}
.atc-badge{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#d92d20;color:#fff;font-size:12px;font-weight:600;line-height:20px;text-align:center}
.atc-panel{position:absolute;bottom:72px;width:380px;max-width:calc(100vw - 24px);height:560px;max-height:calc(100vh - 110px);display:none;flex-direction:column;background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 12px 40px rgba(0,0,0,.25)}
.atc-right .atc-panel{right:0}
.atc-left .atc-panel{left:0}
.atc-root.atc-open .atc-panel{display:flex}
.atc-head{flex:none;display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:var(--atc-c);color:#fff}
.atc-head strong{font-size:16px;font-weight:600}
.atc-close{background:none;border:0;color:#fff;font-size:24px;line-height:1;cursor:pointer;padding:2px 6px;border-radius:6px}

/* ticket form */
.atc-ticket{flex:1;overflow-y:auto;padding:16px;background:#f5f6f7;display:flex;flex-direction:column;gap:12px}
.atc-ticket p.atc-intro{margin:0;color:#3c4148}
.atc-field{display:flex;flex-direction:column;gap:4px}
.atc-field label{font-size:13px;font-weight:600;color:#2b2f33}
.atc-field label span{font-weight:400;color:#646970}
.atc-field input[type=text],.atc-field input[type=email],.atc-field input[type=tel],.atc-field select,.atc-field textarea,.atc-form textarea{width:100%;font:inherit;padding:9px 11px;border:1px solid #b8bdc3;border-radius:9px;background:#fff;color:inherit}
.atc-field textarea{resize:vertical;min-height:90px}
.atc-field input:focus,.atc-field select:focus,.atc-field textarea:focus,.atc-form textarea:focus{outline:2px solid var(--atc-c);outline-offset:0;border-color:transparent}
.atc-field.atc-bad input,.atc-field.atc-bad select,.atc-field.atc-bad textarea{border-color:#b42318}
.atc-fe{font-size:12.5px;color:#b42318;min-height:0}
.atc-consent{display:flex;gap:8px;align-items:flex-start;font-size:13px;color:#3c4148}
.atc-consent input{margin-top:3px;flex:none}
.atc-submit{font:inherit;font-weight:600;padding:11px 14px;border:0;border-radius:10px;background:var(--atc-c);color:#fff;cursor:pointer}
.atc-submit:disabled{opacity:.6;cursor:default}
.atc-hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}

/* chat */
.atc-chat{flex:1;min-height:0;display:flex;flex-direction:column}
.atc-strip{flex:none;padding:8px 16px;background:#eef1f2;border-bottom:1px solid #dde0e3;font-size:13px;color:#3c4148;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.atc-strip b{color:#1c1f23}
.atc-pushbar{flex:none;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 16px;background:#fff8e1;border-bottom:1px solid #f0e2b0;font-size:13px}
.atc-pushbar span{flex:1 1 140px}
.atc-pushbar button{font:inherit;font-size:13px;border-radius:8px;cursor:pointer;padding:5px 10px}
.atc-pushbar .atc-on{border:0;background:var(--atc-c);color:#fff;font-weight:600}
.atc-pushbar .atc-no{border:0;background:none;color:#50575e;text-decoration:underline}
.atc-body{flex:1;overflow-y:auto;padding:16px;background:#f5f6f7;display:flex;flex-direction:column;gap:10px}
.atc-msg{max-width:82%;padding:9px 12px;border-radius:14px;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}
.atc-msg.atc-agent{align-self:flex-start;background:#fff;border:1px solid #e3e5e8;border-bottom-left-radius:4px}
.atc-msg.atc-visitor{align-self:flex-end;background:var(--atc-c);color:#fff;border-bottom-right-radius:4px}
.atc-msg.atc-pending{opacity:.6}
.atc-who{align-self:flex-start;margin:0 0 -6px 4px;font-size:12px;color:#646970}
.atc-err{align-self:center;font-size:13px;color:#b42318;text-align:center}
.atc-closed{flex:none;padding:12px 16px;background:#fff;border-top:1px solid #e3e5e8;text-align:center;color:#3c4148;display:flex;flex-direction:column;gap:8px;align-items:center}
.atc-form{flex:none;display:flex;gap:8px;padding:10px;border-top:1px solid #e3e5e8;background:#fff;align-items:flex-end}
.atc-form textarea{resize:none;height:42px;max-height:110px}
.atc-send{flex:none;height:42px;padding:0 16px;border:0;border-radius:10px;background:var(--atc-c);color:#fff;font:inherit;font-weight:600;cursor:pointer}
.atc-send:disabled{opacity:.5;cursor:default}
.atc-credit{flex:none;padding:6px 10px 8px;text-align:center;font-size:12px;color:#646970;background:#fff;border-top:1px solid #f0f1f2}
.atc-credit a{color:inherit;text-decoration:underline}
.atc-hide{display:none!important}
@media (max-width:480px){
  .atc-root{bottom:12px}.atc-root.atc-right{right:12px}.atc-root.atc-left{left:12px}
  .atc-root.atc-open .atc-panel{position:fixed;inset:0;width:auto;max-width:none;height:auto;max-height:none;border-radius:0}
  .atc-root.atc-open .atc-bubble{display:none}
  .atc-field input,.atc-field select,.atc-field textarea,.atc-form textarea{font-size:16px}
}
@media (prefers-reduced-motion:reduce){.atc-bubble{transition:none}}
