/* Support chat widget — floating launcher + popup */
body > .site-header .acw-header-chat-icon{
  width:40px !important;
  min-height:40px !important;
  flex:0 0 40px !important;
  padding:0 !important;
  border-radius:50% !important;
  background:#fff !important;
  color:var(--acw-header-ink,#10213A) !important;
  border-color:rgba(11,31,58,.13) !important;
  box-shadow:0 10px 22px rgba(11,31,58,.06) !important;
}

body > .site-header .acw-header-chat-icon svg{
  width:18px !important;
  height:18px !important;
  flex:0 0 18px !important;
  display:block !important;
}

body > .site-header .acw-header-chat-icon .news-sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}

body[data-page='support'] .acw-chat-widget{
  position:fixed;
  inset-inline-end:18px;
  bottom:18px;
  z-index:1300;
  display:grid;
  gap:12px;
  justify-items:end;
}

body[data-page='support'] .acw-chat-widget-toggle{
  display:grid;
  place-items:center;
  width:56px;
  height:56px;
  padding:0;
  border:1px solid rgba(212,166,74,.55);
  border-radius:50%;
  background:linear-gradient(145deg,#0B1F3A,#16345F);
  color:#fff;
  cursor:pointer;
  box-shadow:0 16px 34px rgba(8,27,52,.32);
  transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease;
}

body[data-page='support'] .acw-chat-widget-toggle:hover{
  transform:translateY(-3px);
  border-color:var(--news-gold,#D8AD3E);
  box-shadow:0 20px 40px rgba(8,27,52,.4);
}

body[data-page='support'] .acw-chat-widget-toggle:focus-visible{
  outline:3px solid rgba(212,166,74,.5);
  outline-offset:2px;
}

body[data-page='support'] .acw-chat-widget-toggle svg{
  width:26px !important;
  height:26px !important;
  flex:0 0 26px !important;
  display:block !important;
}

body[data-page='support'] .acw-chat-widget-toggle .acw-chat-close-ic{
  display:none;
}

body[data-page='support'] .acw-chat-widget.is-open .acw-chat-widget-toggle .acw-chat-open-ic{
  display:none;
}

body[data-page='support'] .acw-chat-widget.is-open .acw-chat-widget-toggle .acw-chat-close-ic{
  display:block;
}

/* The panel header already owns the close action while the chat is open. */
body[data-page='support'] .acw-chat-widget.is-open .acw-chat-widget-toggle{
  display:none !important;
}

body[data-page='support'] .acw-chat-widget-panel{
  width:min(380px,calc(100vw - 36px));
  height:min(560px,calc(100dvh - 110px));
  display:grid;
  grid-template-rows:auto 1fr;
  overflow:hidden;
  border:1px solid rgba(212,166,74,.3);
  border-radius:24px;
  background:#fff;
  box-shadow:0 30px 70px rgba(8,27,52,.35);
  transform-origin:bottom right;
  animation:acwChatPop .22s cubic-bezier(.22,1,.36,1) both;
}

body[data-page='support'] .acw-chat-widget-panel[hidden]{
  display:none !important;
  animation:none !important;
}

@keyframes acwChatPop{
  from{opacity:0;transform:translateY(14px) scale(.97)}
  to{opacity:1;transform:none}
}

body[data-page='support'] .acw-chat-widget-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  background:linear-gradient(150deg,#0B1F3A,#16345F);
  color:#fff;
}

body[data-page='support'] .acw-chat-widget-head .acw-chat-widget-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  font-size:11.4px;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body[data-page='support'] .acw-chat-widget-head .acw-chat-live-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#41C28A;
  box-shadow:0 0 0 3px rgba(65,194,138,.22);
  flex:0 0 auto;
}

body[data-page='support'] .acw-chat-widget-head .acw-chat-widget-open{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin-inline-start:auto;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.1);
  color:#fff;
  font-size:9.8px;
  font-weight:800;
  text-decoration:none;
  white-space:nowrap;
  transition:background .2s ease;
}

body[data-page='support'] .acw-chat-widget-head .acw-chat-widget-open svg{
  width:14px !important;
  height:14px !important;
  flex:0 0 14px !important;
  display:block !important;
}

body[data-page='support'] .acw-chat-widget-head .acw-chat-widget-open:hover{
  background:rgba(255,255,255,.2);
}

body[data-page='support'] .acw-chat-widget-close{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  padding:0;
  border:1px solid rgba(255,255,255,.2);
  border-radius:50%;
  background:transparent;
  color:#fff;
  cursor:pointer;
  flex:0 0 auto;
}

body[data-page='support'] .acw-chat-widget-close svg{
  width:16px !important;
  height:16px !important;
  flex:0 0 16px !important;
  display:block !important;
}

body[data-page='support'] .acw-chat-widget-close:hover{
  background:rgba(255,255,255,.14);
}

body[data-page='support'] .acw-chat-widget-panel iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
  background:#f4f0e8;
}

html[data-theme='dark'] body[data-page='support'] .acw-chat-widget-panel{
  background:#101d30;
  border-color:rgba(212,166,74,.34);
  box-shadow:0 30px 70px rgba(0,0,0,.5);
}

html[data-theme='dark'] body[data-page='support'] .acw-chat-widget-panel iframe{
  background:#0b1626;
  color-scheme:dark;
}

@media (max-width:640px){
  body[data-page='support'] .acw-chat-widget{
    inset-inline-end:12px;
    bottom:12px;
  }

  body[data-page='support'] .acw-chat-widget-toggle{
    width:52px;
    height:52px;
  }

  body[data-page='support'] .acw-chat-widget-panel{
    width:calc(100vw - 24px);
    height:calc(100dvh - 96px);
  }
}
