/* Scope these overrides to the support panel; legacy QR and back-to-top controls keep their styles. */
/* Keep the existing Baidu human entry and its window on the opposite side. */
#aff-im-root .embed-icon { left: 12px !important; right: auto !important; bottom: 16px !important; }
#aff-im-root .embed-chat-container { left: 12px !important; right: auto !important; bottom: 16px !important; max-width: calc(100vw - 24px); }
#cmsFloatPanel .servicePanel { width: 480px; height: calc(100vh - 32px); height: min(720px,calc(100dvh - 32px)); max-width: calc(100% - 84px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); top: 16px !important; background: #fff; border: 1px solid #d8dde3; border-radius: 10px; box-shadow: 0 8px 28px rgba(25,35,48,.14); overflow: hidden; }
#cmsFloatPanel .servicePanel .servicePanel-inner,
#cmsFloatPanel .servicePanel .servicePanel-inner .serviceMsgPanel { width: 100%; height: 100%; min-height: 0; left: 0; top: 0; position: relative; }
#cmsFloatPanel .servicePanel .servicePanel-inner .serviceMsgPanel { display: flex; flex-direction: column; }
#cmsFloatPanel .servicePanel .servicePanel-inner .serviceMsgPanel .serviceMsgPanel-hd { position: relative; display: flex; align-items: center; flex: 0 0 44px; top: 0; right: 0; width: 100%; height: 44px; min-height: 44px; border-bottom: 1px solid #edf0f2; background: #fff; text-align: left; font-family: system-ui,sans-serif; }
#cmsFloatPanel .servicePanel .support-title { flex: 1; padding-left: 16px; font-size: 14px; color: #4b5663; }
#cmsFloatPanel .servicePanel .support-open { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; color: #687583; text-decoration: none; padding: 0 6px; }
#cmsFloatPanel .servicePanel .servicePanel-inner .serviceMsgPanel .serviceMsgPanel-hd a.close { flex: none; width: 44px; height: 44px; margin: 0; float: none; background: transparent; opacity: 1; }
#cmsFloatPanel .servicePanel .servicePanel-inner .serviceMsgPanel .serviceMsgPanel-hd a.close::before,
#cmsFloatPanel .servicePanel .servicePanel-inner .serviceMsgPanel .serviceMsgPanel-hd a.close::after { top: 14px; left: 21px; height: 16px; background: #687583; }
#cmsFloatPanel .servicePanel iframe { display: block; flex: 1 1 0; min-height: 0; width: 100%; height: 100%; max-height: none; border: 0; background: #fff; }
@media (max-width: 600px) {
  #aff-im-root .embed-icon { bottom: 64px !important; }
  #aff-im-root .embed-chat-container { left: 12px !important; right: 12px !important; bottom: 64px !important; width: auto !important; max-width: none; }
  /* The legacy mobile theme hides the whole float panel. Keep the support entry available. */
  #cmsFloatPanel { display: block !important; }
  #cmsFloatPanel .ctrolPanel { top: auto !important; bottom: 116px; right: 12px; width: 56px; height: 56px; background: #fff; border: 1px solid #c4d0dc; border-radius: 10px; box-shadow: 0 4px 14px rgba(21,45,75,.18); }
  #cmsFloatPanel .ctrolPanel a.qrcode, #cmsFloatPanel .ctrolPanel a.arrow { display: none; }
  #cmsFloatPanel .servicePanel { left: 8px; right: 8px; width: auto !important; max-width: none; }
}
