/* 弹窗组件样式 - 严格对照 TDesign 实现 */
.tdesign-popup-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 遮罩层 */
.tdesign-popup__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

/* 弹窗基础样式 */
.tdesign-popup {
  position: fixed;
  z-index: 11500;
  background-color: #ffffff;
  transition: all 300ms ease;
}

/* 内容区域 */
.tdesign-popup__content {
  position: relative;
  height: 100%;
  z-index: 1;
}

/* 关闭按钮 */
.tdesign-popup__close {
  position: absolute;
  top: 0;
  right: 0;
  padding: 20rpx;
  line-height: 1;
  color: rgba(0, 0, 0, 0.9);
  z-index: 2;
}

/* 位置变体 */
.tdesign-popup--top {
  top: 0;
  left: 0;
  width: 100%;
  border-bottom-left-radius: 24rpx;
  border-bottom-right-radius: 24rpx;
}

.tdesign-popup--bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  border-top-left-radius: 24rpx;
  border-top-right-radius: 24rpx;
  padding-bottom: constant(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}

.tdesign-popup--left {
  top: 0;
  left: 0;
  height: 100%;
}

.tdesign-popup--right {
  top: 0;
  right: 0;
  height: 100%;
}

.tdesign-popup--center {
  top: 50%;
  left: 50%;
  transform: scale(1) translate3d(-50%, -50%, 0);
  transform-origin: 0 0;
  border-radius: 24rpx;
}

/* 动画效果 */
.tdesign-popup.tdesign-popup--top.tdesign-popup-enter,
.tdesign-popup.tdesign-popup--top.tdesign-popup-leave-to {
  transform: translateY(-100%);
  transform-origin: 0 0;
}

.tdesign-popup.tdesign-popup--bottom.tdesign-popup-enter,
.tdesign-popup.tdesign-popup--bottom.tdesign-popup-leave-to {
  transform: translateY(100%);
}

.tdesign-popup.tdesign-popup--left.tdesign-popup-enter,
.tdesign-popup.tdesign-popup--left.tdesign-popup-leave-to {
  transform: translateX(-100%);
}

.tdesign-popup.tdesign-popup--right.tdesign-popup-enter,
.tdesign-popup.tdesign-popup--right.tdesign-popup-leave-to {
  transform: translateX(100%);
}

.tdesign-popup.tdesign-popup--center.tdesign-popup-enter,
.tdesign-popup.tdesign-popup--center.tdesign-popup-leave-to {
  transform: scale(0.6) translate3d(-50%, -50%, 0);
  opacity: 0;
}