/**
 * Page 05 · 会员 / 结账增量（本地预览）
 * 叠在线上 huanyuhub-member-v1.css + hy-vip-shared.css 之上。不上线直至明示。
 */

:root {
  --hy-vip-grad: linear-gradient(110deg, #e98ad3 0%, #b494f5 48%, #72b8ff 100%);
  --hy-char-ink: #111827;
  --hy-char-muted: #667085;
  --hy-char-line: #e8eaf4;
  --hy-char-dark-panel: #151b2b;
}

.hy-checkout-layout-v2 {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
  align-items: start;
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto 48px;
}

.hy-checkout-panel {
  padding: 24px;
  border: 1px solid var(--hy-char-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.hy-checkout-panel h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--hy-char-ink);
}

.hy-checkout-return {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f7fc;
  color: var(--hy-char-muted);
  font-size: 13px;
  line-height: 1.55;
}

.hy-checkout-return a {
  color: var(--hy-char-ink);
  font-weight: 650;
}

.hy-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.hy-compare-table th,
.hy-compare-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--hy-char-line);
  text-align: left;
}

.hy-compare-table th {
  color: var(--hy-char-muted);
  font-weight: 600;
}

.hy-compare-table td:nth-child(3) {
  color: #6d28d9;
  font-weight: 650;
}

.hy-usd-notice {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(247, 183, 214, 0.14);
  color: #8a4570;
  font-size: 12px;
  line-height: 1.5;
}

.hy-checkout-register {
  margin: 14px 0 0;
  color: var(--hy-char-muted);
  font-size: 13px;
}

.hy-checkout-register a {
  color: #6d28d9;
  font-weight: 650;
  text-decoration: none;
}

.hy-checkout-register a:hover {
  text-decoration: underline;
}

.hy-checkout-confirm {
  background: var(--hy-char-dark-panel);
  color: #fff;
  border-color: transparent;
}

.hy-checkout-confirm h2 {
  color: #fff;
}

.hy-plan-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}

.hy-plan-tabs--4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hy-plan-tab {
  flex: 1;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.hy-plan-tab.is-active {
  border-color: transparent;
  background: var(--hy-vip-grad);
  box-shadow: 0 8px 20px rgba(155, 107, 232, 0.28);
}

.hy-price-usd {
  margin: 0;
  font-size: 32px;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.hy-price-usd span {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.8;
}

.hy-price-cny {
  margin: 4px 0 0;
  color: rgba(248, 250, 255, 0.7);
  font-size: 13px;
}

.hy-plan-renew {
  margin: 10px 0 0;
  color: rgba(248, 250, 255, 0.78);
  font-size: 13px;
  line-height: 1.5;
}

.hy-checkout-confirm .hy-usd-notice {
  color: #f7b7d6;
  background: rgba(247, 183, 214, 0.12);
}

.hy-vip-benefits--on-dark {
  margin: 16px 0;
}

.hy-vip-benefits--on-dark li {
  color: rgba(248, 250, 255, 0.88);
}

.hy-vip-benefits--on-dark li i {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hy-pay-method {
  margin: 0 0 12px;
}

.hy-pay-method__label {
  display: block;
  margin-bottom: 8px;
  color: rgba(248, 250, 255, 0.65);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hy-pay-method__card {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 650;
}

.hy-pay-method__card.is-active {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(180, 148, 245, 0.7);
}

.hy-checkout-submit {
  width: 100%;
  margin-top: 8px;
  min-height: 48px;
  border: 0;
  cursor: pointer;
}

.hy-checkout-state {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
}

.hy-checkout-state.is-visible,
.hy-checkout-state:not([hidden]) {
  display: block;
}

.hy-checkout-state[hidden] {
  display: none !important;
}

.hy-checkout-confirm .hy-checkout-state.is-processing {
  background: rgba(244, 241, 255, 0.16);
  color: #e8e0ff;
}

.hy-checkout-confirm .hy-checkout-state.is-success {
  background: rgba(238, 250, 243, 0.16);
  color: #b7f0d0;
}

.hy-checkout-confirm .hy-checkout-state.is-error {
  background: rgba(255, 241, 242, 0.14);
  color: #ffc1cd;
}

.hy-checkout-return-play {
  display: inline-flex;
  margin-top: 10px;
  min-height: 40px;
  align-items: center;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--hy-vip-grad);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
}

.hy-checkout-retry {
  display: inline-flex;
  margin-top: 10px;
  border-color: rgba(255, 255, 255, 0.35) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

.hy-checkout-sticky {
  display: none;
}

@media (max-width: 900px) {
  .hy-checkout-layout-v2 {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    margin-bottom: 96px;
  }

  .hy-checkout-confirm {
    position: relative;
  }

  .hy-checkout-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99990;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(21, 27, 43, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .hy-checkout-sticky .hy-price-usd {
    font-size: 20px;
  }

  .hy-checkout-sticky .hy-vip-btn-primary {
    flex: 0 0 auto;
    min-width: 140px;
  }

  /* 有吸底条时，面板内主按钮可隐藏，避免双 CTA */
  .hy-checkout-confirm .hy-checkout-submit {
    display: none;
  }
}

@media (max-width: 420px) {
  .hy-checkout-layout-v2 {
    width: calc(100% - 16px);
  }

  .hy-checkout-panel {
    padding: 18px 14px;
  }

  .hy-plan-tabs--4 {
    grid-template-columns: 1fr 1fr;
  }

  .hy-plan-tab {
    font-size: 12px;
    min-height: 40px;
  }
}
