.business-payment-popup {
  background: #ffffff;
  width: 100%;

  // 确保弹窗内容可以滚动
  .business-payment-selector {
    max-height: calc(60vh - 120px); // 减去标题栏和确认按钮的高度
    overflow-y: auto;

    // 移除内部的外边框，因为已经在弹窗中
    border: none;
    border-radius: 0;
  }
}

// 强制覆盖react-vant的Popup样式，确保底部弹出
.rv-popup {
  &.rv-popup--bottom {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 80vh !important;

    .business-payment-popup {
      border-top-left-radius: 16px !important;
      border-top-right-radius: 16px !important;
      border-bottom-left-radius: 0 !important;
      border-bottom-right-radius: 0 !important;
      width: 100% !important;
      max-width: 500px !important;
      margin: 0 auto !important;
    }
  }

  &.rv-popup--top {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;

    .business-payment-popup {
      border-bottom-left-radius: 16px !important;
      border-bottom-right-radius: 16px !important;
      border-top-left-radius: 0 !important;
      border-top-right-radius: 0 !important;
      width: 100% !important;
      max-width: 500px !important;
      margin: 0 auto !important;
    }
  }

  &.rv-popup--center {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    height: auto !important;

    .business-payment-popup {
      border-radius: 16px !important;
      max-width: 400px !important;
      min-width: 320px !important;
      margin: 0 !important;
    }
  }

  &.rv-popup--left {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: auto !important;
    height: 100% !important;
    max-width: 400px !important;
  }

  &.rv-popup--right {
    position: fixed !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: auto !important;
    height: 100% !important;
    max-width: 400px !important;
  }
}

// 移动端优化
@media (max-width: 768px) {
  .business-payment-popup {
    .business-payment-selector {
      max-height: calc(70vh - 120px);
    }
  }

  .rv-popup {
    &.rv-popup--bottom {
      .business-payment-popup {
        max-width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
      }
    }
  }
}

.mr-payment-popup-content {
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding-bottom: 16px;
}

.mr-payment-popup-title {
  font-size: 24px;
  font-weight: 400;
  text-align: left;
  padding: 20px 20px 12px 20px;
  margin-bottom: 0;
}

.mr-payment-popup-list {
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fff;
  margin: 16px;
  overflow: hidden;
}

.mr-payment-popup-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s;
  &:last-child {
    border-bottom: none;
  }
  &.selected {
    background: #eaf0fc;
    border-left: 3px solid #2c64e3;
  }
  &.disabled {
    opacity: 0.5;
    pointer-events: none;
  }
}

.mr-payment-popup-item-icon {
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.mr-payment-popup-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mr-payment-popup-item-title {
  font-size: 16px;
  font-weight: 500;
  color: #223366;
}

.mr-payment-popup-item-desc {
  font-size: 13px;
  color: #9095b5;
  margin-top: 2px;
}

.mr-payment-popup-add-card {
  color: #2c64e3;
  font-weight: 500;
  padding-left: 22px;
  .mr-payment-popup-add-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #eaf0fc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 300;
  }
}

.mr-payment-popup-footer {
  padding: 16px 20px 30px 20px;
}
