/* support chat widget */
.sup-toggle{
  position:fixed; bottom:24px; right:24px; z-index:9000;
  width:56px; height:56px; border-radius:50%;
  background:var(--sup-accent, #ff6b6b);
  color:#fff; border:none; cursor:pointer;
  display:grid; place-items:center;
  box-shadow:0 12px 30px -8px rgba(0,0,0,.4);
  transition:transform .15s, box-shadow .15s;
}
.sup-toggle:hover{ transform:translateY(-2px); box-shadow:0 16px 36px -8px rgba(0,0,0,.5); }
.sup-toggle:active{ transform:scale(.95); }

.sup-panel{
  position:fixed; bottom:96px; right:24px; z-index:9001;
  width:360px; max-width:calc(100vw - 32px); height:520px; max-height:calc(100vh - 120px);
  background:var(--sup-bg, #ffffff);
  color:var(--sup-text, #1a1a1a);
  border-radius:16px;
  box-shadow:0 20px 60px -10px rgba(0,0,0,.35);
  display:flex; flex-direction:column;
  overflow:hidden;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Inter',Roboto,Helvetica,Arial,sans-serif;
  font-size:14px;
  transition:opacity .18s, transform .18s;
}
.sup-panel-hidden{ opacity:0; pointer-events:none; transform:translateY(20px); }

.sup-head{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 16px;
  background:var(--sup-accent, #ff6b6b);
  color:#fff;
}
.sup-head-info{ display:flex; gap:10px; align-items:center; }
.sup-head-ava{
  width:36px; height:36px; border-radius:50%;
  background:rgba(255,255,255,.2);
  display:grid; place-items:center;
  font-weight:700; font-size:13px; letter-spacing:.5px;
}
.sup-head-title{ font-weight:600; font-size:15px; }
.sup-head-status{ font-size:12px; opacity:.85; margin-top:1px; }
.sup-head-status.is-online::before{ content:'●'; color:#7ee787; margin-right:4px; }
.sup-head-status.is-offline::before{ content:'●'; color:#cccccc; margin-right:4px; }

.sup-close{
  background:transparent; border:none; color:#fff; cursor:pointer;
  width:32px; height:32px; border-radius:50%; display:grid; place-items:center;
  transition:background .12s;
}
.sup-close:hover{ background:rgba(255,255,255,.15); }

.sup-msgs{
  flex:1; overflow-y:auto; padding:14px 14px 8px;
  background:var(--sup-bg, #ffffff);
  display:flex; flex-direction:column; gap:8px;
}
.sup-hint{
  background:var(--sup-hint-bg, #f4f4f6);
  border-left:3px solid var(--sup-accent, #ff6b6b);
  padding:10px 12px; border-radius:8px;
  color:var(--sup-muted, #6b7280); font-size:13px; line-height:1.45;
}

.sup-msg{ max-width:80%; padding:9px 13px; border-radius:14px; word-wrap:break-word; }
.sup-msg-me{
  align-self:flex-end;
  background:var(--sup-accent, #ff6b6b); color:#fff;
  border-bottom-right-radius:4px;
}
.sup-msg-op{
  align-self:flex-start;
  background:var(--sup-msg-bg, #f4f4f6); color:var(--sup-text, #1a1a1a);
  border-bottom-left-radius:4px;
}
.sup-msg-body{ font-size:14px; line-height:1.4; }
.sup-msg-time{ font-size:11px; opacity:.65; margin-top:3px; text-align:right; }
.sup-msg-op .sup-msg-time{ text-align:left; }

.sup-typing{
  align-self:flex-start;
  background:var(--sup-msg-bg, #f4f4f6);
  padding:11px 14px; border-radius:14px; border-bottom-left-radius:4px;
  display:inline-flex; gap:4px;
}
.sup-typing span{
  width:6px; height:6px; border-radius:50%;
  background:var(--sup-muted, #6b7280); opacity:.5;
  animation:sup-blink 1.2s infinite;
}
.sup-typing span:nth-child(2){ animation-delay:.2s; }
.sup-typing span:nth-child(3){ animation-delay:.4s; }
@keyframes sup-blink{ 0%,80%,100%{opacity:.3} 40%{opacity:1} }

.sup-form{
  display:flex; gap:8px; padding:12px;
  border-top:1px solid var(--sup-line, #eaeaea);
  background:var(--sup-bg, #ffffff);
}
.sup-form input{
  flex:1; height:40px; padding:0 14px;
  background:var(--sup-input-bg, #f4f4f6);
  border:1px solid var(--sup-line, #eaeaea);
  border-radius:999px;
  color:var(--sup-text, #1a1a1a);
  font:inherit; font-size:14px;
  transition:border-color .12s, background .12s;
}
.sup-form input:focus{ outline:none; border-color:var(--sup-accent, #ff6b6b); background:#fff; }
.sup-form button[type=submit]{
  width:40px; height:40px; border-radius:50%;
  background:var(--sup-accent, #ff6b6b); color:#fff; border:none; cursor:pointer;
  display:grid; place-items:center;
}
.sup-form button[type=submit]:hover{ filter:brightness(1.08); }

@media (max-width:520px){
  .sup-panel{ right:8px; bottom:80px; width:calc(100vw - 16px); height:calc(100vh - 100px); }
  .sup-toggle{ right:12px; bottom:12px; }
}
