/* Erizo Chat – widget (selektory z #id, żeby motyw nie nadpisywał) */
#erizo-chat-root{--ez-accent:#1f4fd8;--ez-bg:#fff;--ez-ink:#1a1d24;--ez-muted:#6b7280;--ez-line:#e6e8ee;--ez-bot:#f2f4f8;position:fixed;bottom:0;right:0;width:0;height:0;z-index:2147483000;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;font-size:15px!important;line-height:1.5!important;color:var(--ez-ink);text-align:left}
#erizo-chat-root *,#erizo-chat-root *::before,#erizo-chat-root *::after{box-sizing:border-box!important;margin:0!important;font-family:inherit;letter-spacing:normal;text-transform:none;text-shadow:none}
#erizo-chat-root button{appearance:none;-webkit-appearance:none;font:inherit;line-height:1;text-decoration:none;box-shadow:none;min-height:0;min-width:0}

#erizo-chat-root .ez-launcher{position:fixed;right:22px;bottom:22px;width:58px!important;height:58px!important;padding:0!important;border-radius:50%!important;border:0!important;background:var(--ez-accent)!important;color:#fff!important;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.18)!important;display:grid!important;place-items:center;transition:transform .18s ease}
#erizo-chat-root .ez-launcher:hover{transform:scale(1.06);background:var(--ez-accent)!important}
#erizo-chat-root .ez-launcher:focus-visible{outline:3px solid #fff;outline-offset:2px}
#erizo-chat-root .ez-launcher svg{width:26px;height:26px;display:block;transition:opacity .15s}
#erizo-chat-root .ez-launcher .ez-ico-x{position:absolute;opacity:0}
#erizo-chat-root.ez-open .ez-launcher .ez-ico-chat{opacity:0}
#erizo-chat-root.ez-open .ez-launcher .ez-ico-x{opacity:1}

#erizo-chat-root .ez-window{position:fixed;right:22px;bottom:94px;width:380px;max-width:calc(100vw - 44px);height:600px;max-height:calc(100vh - 120px);background:var(--ez-bg)!important;border-radius:18px!important;box-shadow:0 20px 60px rgba(0,0,0,.22),0 0 0 1px rgba(0,0,0,.05)!important;display:flex!important;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(12px) scale(.98);pointer-events:none;transition:opacity .2s ease,transform .2s ease;padding:0!important;border:0!important}
#erizo-chat-root.ez-open .ez-window{opacity:1;transform:none;pointer-events:auto}

#erizo-chat-root .ez-head{padding:14px 16px!important;background:var(--ez-accent)!important;color:#fff!important;display:flex!important;align-items:center;gap:12px;flex:none}
#erizo-chat-root .ez-avatar{width:36px;height:36px;border-radius:50%!important;background:rgba(255,255,255,.22)!important;display:grid!important;place-items:center;font-weight:600;font-size:15px;flex:none;color:#fff!important}
#erizo-chat-root .ez-head-text{flex:1;min-width:0}
#erizo-chat-root .ez-head-name{font-weight:600!important;font-size:15px!important;color:#fff!important;line-height:1.3!important}
#erizo-chat-root .ez-head-sub{font-size:12.5px!important;opacity:.9;display:flex;align-items:center;gap:6px;color:#fff!important;line-height:1.3!important}
#erizo-chat-root .ez-head-sub::before{content:"";width:7px;height:7px;border-radius:50%;background:#4ade80;display:inline-block}
#erizo-chat-root .ez-close{display:none}
#erizo-chat-root .ez-reset,#erizo-chat-root .ez-close{background:transparent!important;border:0!important;color:#fff!important;opacity:.85;cursor:pointer;padding:6px!important;border-radius:8px!important;width:auto!important;height:auto!important}
#erizo-chat-root .ez-reset:hover,#erizo-chat-root .ez-close:hover{opacity:1;background:rgba(255,255,255,.16)!important}
#erizo-chat-root .ez-reset svg,#erizo-chat-root .ez-close svg{width:18px;height:18px;display:block}

#erizo-chat-root .ez-body{flex:1 1 auto;overflow-y:auto;padding:16px 14px 8px!important;display:flex!important;flex-direction:column;gap:10px;scroll-behavior:smooth;background:var(--ez-bg)!important;min-height:0}
#erizo-chat-root .ez-msg{max-width:85%;padding:10px 14px!important;border-radius:16px!important;word-wrap:break-word;overflow-wrap:anywhere;font-size:14.5px!important;line-height:1.5!important;border:0!important}
#erizo-chat-root .ez-msg.ez-bot{align-self:flex-start;background:var(--ez-bot)!important;color:var(--ez-ink)!important;border-bottom-left-radius:6px!important}
#erizo-chat-root .ez-msg.ez-user{align-self:flex-end;background:var(--ez-accent)!important;color:#fff!important;border-bottom-right-radius:6px!important;white-space:pre-wrap}
#erizo-chat-root .ez-msg.ez-err{align-self:center;background:#fff1f0!important;color:#9f1d1d!important;font-size:13.5px!important;border-radius:10px!important}
#erizo-chat-root .ez-msg p{margin:0 0 8px!important;padding:0!important}
#erizo-chat-root .ez-msg p:last-child{margin-bottom:0!important}
#erizo-chat-root .ez-msg ul,#erizo-chat-root .ez-msg ol{margin:0 0 8px!important;padding:0 0 0 18px!important;list-style-position:outside}
#erizo-chat-root .ez-msg ul{list-style:disc!important}
#erizo-chat-root .ez-msg ol{list-style:decimal!important}
#erizo-chat-root .ez-msg li{margin:0 0 3px!important;padding:0!important;display:list-item!important}
#erizo-chat-root .ez-msg strong{font-weight:600!important}
#erizo-chat-root .ez-msg a{color:var(--ez-accent)!important;text-decoration:underline!important}
#erizo-chat-root .ez-msg.ez-user a{color:#fff!important}
#erizo-chat-root .ez-typing{align-self:flex-start;background:var(--ez-bot)!important;border-radius:16px!important;border-bottom-left-radius:6px!important;padding:12px 16px!important;display:flex;gap:5px}
#erizo-chat-root .ez-typing i{width:7px;height:7px;border-radius:50%;background:var(--ez-muted);display:block;animation:ez-blink 1.2s infinite}
#erizo-chat-root .ez-typing i:nth-child(2){animation-delay:.2s}
#erizo-chat-root .ez-typing i:nth-child(3){animation-delay:.4s}
@keyframes ez-blink{0%,80%,100%{opacity:.3}40%{opacity:1}}

#erizo-chat-root .ez-form{display:flex!important;align-items:flex-end;gap:8px;padding:10px 12px 10px!important;border-top:1px solid var(--ez-line)!important;background:var(--ez-bg)!important;flex:none}
#erizo-chat-root .ez-input{flex:1;width:auto!important;min-width:0;resize:none;border:1px solid var(--ez-line)!important;border-radius:14px!important;padding:10px 14px!important;font:inherit!important;font-size:14.5px!important;line-height:1.45!important;color:var(--ez-ink)!important;max-height:120px;min-height:0!important;height:auto;background:#fafbfc!important;box-shadow:none!important;outline:none!important;-webkit-appearance:none;appearance:none}
#erizo-chat-root .ez-input:focus{border-color:var(--ez-accent)!important;background:#fff!important;box-shadow:none!important;outline:none!important}
#erizo-chat-root .ez-input::placeholder{color:var(--ez-muted);opacity:1}
#erizo-chat-root .ez-send{width:42px!important;height:42px!important;padding:0!important;border:0!important;border-radius:12px!important;background:var(--ez-accent)!important;color:#fff!important;cursor:pointer;display:grid!important;place-items:center;flex:none}
#erizo-chat-root .ez-send:hover{background:var(--ez-accent)!important;filter:brightness(1.08)}
#erizo-chat-root .ez-send:disabled{opacity:.45;cursor:default;filter:none}
#erizo-chat-root .ez-send svg{width:20px;height:20px;display:block}
#erizo-chat-root .ez-foot{text-align:center;font-size:11.5px!important;color:var(--ez-muted)!important;padding:0 0 9px!important;background:var(--ez-bg)!important;flex:none;line-height:1.3!important}

@media (max-width:520px){
  #erizo-chat-root .ez-window{left:0;right:0;top:0;bottom:auto;width:100vw;max-width:100vw;height:100vh;height:100dvh;max-height:none;border-radius:0!important}
  #erizo-chat-root .ez-input{font-size:16px!important}
  #erizo-chat-root .ez-body{overscroll-behavior:contain}
  #erizo-chat-root.ez-open .ez-launcher{display:none!important}
  #erizo-chat-root .ez-close{display:block!important;order:3}
  #erizo-chat-root .ez-reset{order:2}
  #erizo-chat-root .ez-form{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))!important}
}
@media (prefers-reduced-motion:reduce){
  #erizo-chat-root *{transition:none!important;animation:none!important}
}
