/* 商城客服抽屉宿主壳（iframe 内为 chat2 1:1 UI；入场/退场动画在此，不在 panel.html） */
#yj-market-chat-root {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
  visibility: hidden;
}
#yj-market-chat-root.is-prep,
#yj-market-chat-root.is-open,
#yj-market-chat-root.is-closing {
  visibility: visible;
}
#yj-market-chat-root.is-open {
  pointer-events: auto;
}
#yj-market-chat-root .yj-mchat-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  opacity: 0;
  transition: opacity .36s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}
#yj-market-chat-root.is-open .yj-mchat-mask {
  opacity: 1;
}
#yj-market-chat-root.is-prep .yj-mchat-mask,
#yj-market-chat-root.is-closing .yj-mchat-mask {
  opacity: 0;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: .28s;
}
#yj-market-chat-root .yj-mchat-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 450px;
  max-width: 100vw;
  border-radius: 0;
  overflow: hidden;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  transform: translate3d(100%, 0, 0);
  opacity: 1;
  transition: transform .4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  background: #fff;
  backface-visibility: hidden;
}
#yj-market-chat-root.is-prep .yj-mchat-panel {
  transform: translate3d(100%, 0, 0);
  transition: none;
}
#yj-market-chat-root.is-open .yj-mchat-panel {
  transform: translate3d(0, 0, 0);
}
#yj-market-chat-root.is-closing .yj-mchat-panel {
  transform: translate3d(100%, 0, 0);
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: .32s;
}
#yj-market-chat-root .yj-mchat-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
/* 锁滚动：不直接藏滚动条，由 JS 补 padding，避免页面抖动 */
html.yj-mchat-lock,
html.yj-mchat-lock body {
  overflow: hidden !important;
}
@media (max-width: 520px) {
  #yj-market-chat-root .yj-mchat-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #yj-market-chat-root .yj-mchat-mask,
  #yj-market-chat-root .yj-mchat-panel {
    transition-duration: .01ms !important;
  }
}
