/* AntPay Assistant — bottom-corner AI button + chat panel for the AntPay
   pay surfaces (wallet, /pay, domain checkout). Bright-red AntPay brand.
   The button renders ONLY when the page's own sign-in record allows chat
   (chat-button law: never on login, sign-up, or verification views). */
.apai-btn{position:fixed; right:18px; bottom:18px; width:58px; height:58px; border-radius:50%;
  background:#e8262d; border:2px solid rgba(255,255,255,.85); padding:0; overflow:hidden;
  box-shadow:0 10px 28px rgba(232,38,45,.5); cursor:pointer; z-index:2147482000;}
.apai-btn[hidden]{display:none;}
.apai-btn img{width:100%; height:100%; object-fit:cover; display:block;}
.apai-panel{position:fixed; right:18px; bottom:88px; width:min(374px, calc(100vw - 24px));
  max-height:min(580px, calc(100vh - 118px)); background:#101623; color:#eef1f8;
  border:1px solid rgba(244,81,74,.45); border-radius:18px; box-shadow:0 24px 60px rgba(0,0,0,.5);
  display:flex; flex-direction:column; overflow:hidden; z-index:2147482000;
  font-family:inherit; font-size:14px;}
.apai-panel[hidden]{display:none;}
.apai-head{display:flex; align-items:center; gap:10px; padding:12px 14px;
  background:linear-gradient(135deg,#e8262d,#b30f16); color:#fff; flex:none;}
.apai-head img{width:32px; height:32px; border-radius:50%; object-fit:cover; flex:none;
  border:2px solid rgba(255,255,255,.7);}
.apai-head .apai-title{font-weight:800; font-size:15.5px; line-height:1.15;}
.apai-head .apai-sub{font-size:11.5px; opacity:.88; line-height:1.25;}
.apai-close{margin-left:auto; background:rgba(255,255,255,.16); border:0; color:#fff;
  width:30px; height:30px; border-radius:50%; font-size:16px; cursor:pointer; flex:none;}
.apai-msgs{flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px;}
.apai-msg{max-width:88%; padding:10px 12px; border-radius:14px; line-height:1.5; white-space:pre-wrap;}
.apai-msg.bot{background:#1b2337; align-self:flex-start; border-bottom-left-radius:4px;}
.apai-msg.user{background:#e8262d; color:#fff; align-self:flex-end; border-bottom-right-radius:4px;}
.apai-card{background:#151d31; border:1px solid rgba(244,81,74,.4); border-radius:14px;
  padding:12px 14px; align-self:stretch; line-height:1.5;}
.apai-card h4{margin:0 0 8px; font-size:14.5px; color:#ffdcd9;}
.apai-card ol{margin:6px 0 6px 18px; padding:0;}
.apai-card li{margin:5px 0;}
.apai-row{display:flex; justify-content:space-between; gap:14px; padding:4px 0;}
.apai-row span:first-child{color:#9aa4bb; flex:none;}
.apai-row span:last-child{font-weight:700; text-align:right; word-break:break-word;}
.apai-actions{display:flex; gap:8px; flex-wrap:wrap; padding:2px 14px 10px; flex:none;}
.apai-chip{background:#1b2337; border:1px solid rgba(244,81,74,.55); color:#ffdcd9;
  border-radius:999px; padding:8px 13px; font-size:13.5px; font-weight:700; cursor:pointer; font-family:inherit;}
.apai-chip.primary{background:#e8262d; border-color:#e8262d; color:#fff;}
.apai-chip[disabled]{opacity:.55; cursor:default;}
.apai-form{display:flex; gap:8px; padding:10px 12px 12px; border-top:1px solid rgba(255,255,255,.09); flex:none;}
.apai-input{flex:1; min-width:0; background:#0b0f1a; border:1px solid rgba(255,255,255,.18);
  color:#fff; border-radius:12px; padding:10px 12px; font-size:14.5px; font-family:inherit;}
.apai-input:focus{outline:none; border-color:#f4514a; box-shadow:0 0 0 3px rgba(244,81,74,.28);}
.apai-sendbtn{background:#e8262d; color:#fff; border:0; border-radius:12px; padding:10px 16px;
  font-weight:800; cursor:pointer; font-family:inherit; font-size:14px;}
