/* 推广分销前台样式 2026-12-01（v3：加「换免费次数」模式的兑换区） */

.wk-promo-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
  animation: wkPromoFade 0.18s ease;
}

.wk-promo-box {
  position: relative;
  width: 100%;
  max-width: 330px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 18px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.wk-promo-x {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.wk-promo-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.wk-promo-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.wk-promo-sub b {
  color: #e5342b;
  font-size: 14px;
}

.wk-promo-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  margin: 14px auto 14px;
  overflow: hidden;
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 12px;
}

.wk-promo-qr img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wk-promo-btn {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #0066cc;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.wk-promo-btn:active {
  transform: scale(0.985);
}

.wk-promo-btn:disabled {
  background: #cbd5e1;
  color: #fff;
  cursor: default;
}

.wk-promo-tip {
  margin-top: 12px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.6;
  text-align: left;
}

.wk-promo-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 10001;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  font-size: 13px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

/* ---------- 换免费次数：额度统计 + 账号输入 + 兑换结果 ---------- */
.wk-promo-free {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
  text-align: left;
}

.wk-promo-stat {
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12.5px;
  text-align: center;
}

.wk-promo-stat b {
  color: #1d66d6;
  font-size: 15px;
}

.wk-promo-input {
  width: 100%;
  height: 42px;
  margin-bottom: 8px;
  padding: 0 12px;
  border: 1px solid #d8dee9;
  border-radius: 11px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13.5px;
  outline: none;
}

.wk-promo-input:focus {
  border-color: #1d66d6;
  background: #fff;
}

.wk-promo-btn--free {
  background: #12a05c;
}

.wk-promo-code {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f1f8f4;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.wk-promo-code b {
  color: #12a05c;
  font-size: 17px;
  letter-spacing: 1.5px;
}

.wk-promo-code__tip {
  margin-top: 6px;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.6;
}

.wk-promo-mini {
  margin-left: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #12a05c;
  border-radius: 13px;
  background: #fff;
  color: #12a05c;
  font-size: 12px;
  cursor: pointer;
}

/* 底栏从 3 项变 4 项 */
.shop-shell__mobile-nav.wk-promo-nav4 {
  grid-template-columns: repeat(4, 1fr) !important;
}

/* 详情页购买条左侧的客服按钮（跟「分享」并排，不盖正文）
   购买条本身是 grid：分享 112 + 立即购买 1fr。加一个按钮必须同时改列宽，
   否则「立即购买」会被挤到第二行。 */
.wk-buybar-cs {
  grid-template-columns: 48px 112px minmax(0, 1fr) !important;
}

.wk-cs-btn {
  display: flex;
  flex: 0 0 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 48px;
  height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.wk-cs-btn svg {
  width: 20px;
  height: 20px;
}

.wk-cs-btn:active {
  opacity: 0.6;
}

/* 只加个手型。颜色和尺寸一律交给原菜单项自己的样式，
   之前在这里写死 color 导致「推广」比旁边三项浅一档。 */
.wk-promo-nav {
  cursor: pointer;
}

@keyframes wkPromoFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
