/* 购买弹窗支付抽屉。默认隐藏，避免出现在 PC 端。视觉规则都在 768px 媒体查询里。 */
.qp-pay-sheet {
  display: none;
}

@media (max-width: 768px) {
  .qp-overlay--premium .qp-checkout--premium {
    max-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .qp-overlay--premium .qp-checkout--premium .qp-checkout__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .qp-overlay--premium .qp-checkout--premium .qp-checkout__bill--pay {
    display: none !important;
  }

  .qp-overlay--premium .qp-checkout--premium .qp-cycle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .qp-overlay--premium .qp-checkout--premium .qp-cycle {
    min-height: 0 !important;
    padding: 8px 12px !important;
    gap: 2px !important;
    align-items: flex-start !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .qp-overlay--premium .qp-checkout--premium .qp-cycle__label {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  .qp-overlay--premium .qp-checkout--premium .qp-cycle__price {
    font-size: 15px !important;
    line-height: 1.2 !important;
  }

  .qp-overlay--premium .qp-checkout--premium .qp-cycle--active {
    border-color: rgba(45, 212, 191, 0.9) !important;
    background: rgba(45, 212, 191, 0.12) !important;
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.45), 0 0 16px rgba(45, 212, 191, 0.28) !important;
    transform: none !important;
  }

  .qp-overlay--premium .qp-checkout--premium .qp-checkout__mobile-methods {
    display: none !important;
  }

  .qp-overlay--premium .qp-checkout--premium .qp-checkout__mobile-bar {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 6 !important;
    gap: 0 !important;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(12, 16, 28, 0.94) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .qp-pay-sheet {
    position: fixed;
    inset: 0;
    z-index: 100003;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.62);
  }

  .qp-pay-sheet__panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(168deg, #1e2842 0%, #141a2c 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    color: #f8fafc;
    box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.45);
  }

  .qp-pay-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    gap: 12px;
    padding: 16px 16px 8px;
  }

  .qp-pay-sheet__head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
  }

  .qp-pay-sheet__close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .qp-pay-sheet__due {
    flex: 0 0 auto;
    margin: 0;
    padding: 0 16px 12px;
    color: #5eead4;
    font-size: 14px;
    font-weight: 700;
  }

  .qp-pay-sheet__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 16px 12px;
  }

  .qp-pay-sheet__methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .qp-pay-sheet__method {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    width: 100% !important;
    min-height: 56px !important;
    height: auto !important;
    padding: 8px 12px !important;
    box-sizing: border-box !important;
    text-align: left !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
  }

  .qp-pay-sheet__method.qp-pay-method--active {
    border-color: rgba(45, 212, 191, 0.9) !important;
    box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.4) !important;
    background: rgba(45, 212, 191, 0.1) !important;
  }

  .qp-pay-sheet__meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
  }

  .qp-pay-sheet__fee {
    font-size: 12px;
    line-height: 1.2;
    color: rgba(226, 232, 240, 0.72);
  }

  .qp-pay-sheet__foot {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    gap: 12px;
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: #10182a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

}

/* 只作用于支付抽屉底部这一对按钮 */
.qp-pay-sheet .qp-sheet-btn {
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 52px !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: 14px !important;
  font-family: inherit !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  -webkit-tap-highlight-color: transparent;
}

.qp-pay-sheet .qp-sheet-btn--cancel {
  flex: 0 0 112px !important;
  width: 112px !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  background-color: #1a2336 !important;
  background-image: none !important;
  color: #f8fafc !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.qp-pay-sheet .qp-sheet-btn--ok {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  border: none !important;
  background-color: #0f766e !important;
  background-image: linear-gradient(135deg, #5eead4 0%, #2dd4bf 46%, #0f766e 100%) !important;
  color: #042f2e !important;
  box-shadow: 0 10px 24px rgba(45, 212, 191, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
}

.qp-pay-sheet .qp-sheet-btn--ok:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}
