.online-consultation-page [data-ymj-aff-component="icon"],
.online-consultation-page [data-ymj-aff-component="hot-question"] {
  display: none !important;
}

.online-consultation-page [data-ymj-aff-component="invitation"] {
  position: fixed !important;
  top: 50% !important;
  right: 120px !important;
  left: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform: translateY(-50%) scale(var(--consultation-invite-scale, 1)) !important;
  transform-origin: right center !important;
  z-index: 10000 !important;
}

.online-contact-modal {
  display: none;
  position: fixed;
  box-sizing: border-box;
  /* 移动导航栏的层级为 999999，弹窗需要位于其上方。 */
  z-index: 1000000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: transparent;
  align-items: center;
  justify-content: flex-end;
  padding: 24px 119px 24px 24px;
}

.online-contact-window {
  position: relative;
  width: 100%;
  max-width: 660px;
  height: 100%;
  max-height: 670px;
  margin: 0;
  background: transparent;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.online-contact-close {
  position: absolute;
  top: -15px;
  right: -15px;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 2px solid #ddd;
  border-radius: 50%;
  background: #fff;
  color: #666;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.online-contact-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .online-consultation-page [data-ymj-aff-component="invitation"] {
    right: 104px !important;
  }

  .online-contact-modal {
    justify-content: center;
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* 矮屏保留完整的桌面聊天页，通过外层滚动查看底部。 */
@media (min-width: 769px) and (max-height: 717px) {
  .online-contact-modal {
    align-items: flex-start;
    overflow-y: auto;
  }

  .online-contact-window {
    height: 670px;
    min-height: 670px;
  }

  .online-contact-close {
    position: fixed;
    top: 9px;
    right: 104px;
  }
}
