.bm-support-overlay {
  position: fixed;
  inset: 0;
  z-index: 25000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-sizing: border-box;
}

.bm-support-overlay[hidden] {
  display: none !important;
}

.bm-support-modal {
  width: 100%;
  max-width: 440px;
  max-height: min(640px, 90vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.bm-support-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #e8eaef;
  box-sizing: border-box;
}

.bm-support-modal__title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2b45;
  line-height: 1.3;
}

.bm-support-modal__close {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #8a94a6;
  cursor: pointer;
  user-select: none;
}

.bm-support-modal__body {
  flex: 1;
  min-height: 0;
  height: 560px;
  max-height: calc(90vh - 52px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.bm-support-modal__loading,
.bm-support-modal__empty,
.bm-support-modal__external {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 16px;
  text-align: center;
  font-size: 14px;
  color: #8a94a6;
  box-sizing: border-box;
}

.bm-support-modal__external-text {
  margin: 0;
  color: #5c677a;
  line-height: 1.5;
}

.bm-support-modal__external-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: 8px;
  background: #0a36c7;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.bm-support-modal__empty[hidden],
.bm-support-modal__loading[hidden],
.bm-support-modal__external[hidden],
.bm-support-modal__iframe-wrap[hidden] {
  display: none !important;
}

.bm-support-modal__iframe-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
}

.bm-support-modal__iframe {
  width: 360px;
  height: 640px;
  border: 0;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  margin: 0 auto;
  overflow: hidden;
  flex: none;
  transform-origin: top center;
  background: #fff;
}

html.bm-support-open,
body.bm-support-open {
  overflow: hidden;
}
#launcher,
iframe#webWidget,
iframe[title="Messaging window"],
iframe[title*="消息"],
iframe[title*="Message"],
iframe[src*="zdassets.com"]:not(.bm-support-modal__iframe),
iframe[src*="zendesk.com"]:not(.bm-support-modal__iframe) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* 隐藏客服旁滑动卡片 / 分享 / 旧渠道面板，仅保留客服按钮 */
.float_gold_promo,
.float_right_btns .app_brand_box,
.float_right_btns .share_btn,
.choose_box,
.telegram_box {
  display: none !important;
}

/* 手机端：恢复浮动客服按钮（Vue bundle 在 ≤768px 会隐藏） */
@media (max-width: 768px) {
  .float_right_btns {
    display: block !important;
    bottom: 20px;
    right: 16px;
    z-index: 10001;
  }

  .bm-support-overlay {
    padding: 0;
    align-items: stretch;
  }

  .bm-support-modal {
    max-width: none;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .bm-support-modal__body {
    height: auto;
    flex: 1;
    max-height: none;
  }

  .bm-support-modal__iframe-wrap {
    flex: 1;
    min-height: 0;
  }

  .bm-support-modal__iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    transform: none !important;
  }
}

@media (max-width: 480px) {
  .bm-support-modal__body {
    min-height: calc(100vh - 52px);
  }
}

