/* ============================================================
   TeePay — Joe 主题深度适配样式
   依赖 Joe 主题 CSS 变量：
     --theme      主色（绿色 #50be43 或用户自定义）
     --classC     边框色
     --background 卡片背景
     --routine    正文文字色
     --minor      辅助文字色
   ============================================================ */

/* ---- 通用容器 ---- */
.teepay.teepay--joe {
  margin: 20px 0;
  padding: 0;
  border-radius: 10px;
  border: 1.5px dashed var(--classC, #d8dbe0);
  background: var(--background, #f8f9fb);
  color: var(--routine, #303133);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

/* ---- 付费未解锁 ---- */
.teepay--locked {
  padding: 20px 20px 18px;
}

/* ---- 已解锁/已购买 ---- */
.teepay--paid {
  padding: 18px 20px;
  border-style: solid;
  border-color: var(--theme, #50be43);
  background: var(--background, #fff);
}

/* ---- 头部区域 ---- */
.teepay__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.teepay__tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--theme, #50be43);
  color: #fff;
  letter-spacing: .3px;
}

.teepay__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--routine, #303133);
}

/* ---- 作者预览徽章 ---- */
.teepay__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--theme, #50be43);
  background: color-mix(in srgb, var(--theme, #50be43) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme, #50be43) 30%, transparent);
}

/* ---- 支付方式单选 ---- */
.teepay__radio {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 16px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.teepay__radio input[type="radio"] {
  accent-color: var(--theme, #50be43);
  cursor: pointer;
}

/* ---- 价格 ---- */
.teepay__price {
  margin: 12px 0 8px;
  font-size: 15px;
  color: var(--routine, #303133);
}

.teepay__price strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--theme, #50be43);
  margin: 0 2px;
}

/* ---- 付款按钮：复用 Joe 的 joe_button 风格 ---- */
.teepay__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: var(--theme, #50be43);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
  transition: filter .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}

.teepay__btn:hover {
  filter: brightness(1.08);
}

.teepay__btn:active {
  transform: scale(.97);
}

/* ---- 提示文字 ---- */
.teepay__tip {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--minor, #909399);
  line-height: 1.7;
}

.teepay__tip a {
  color: var(--theme, #50be43);
  text-decoration: none;
}

.teepay__tip a:hover {
  text-decoration: underline;
}

/* ---- 订单号 ---- */
.teepay__meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--minor, #909399);
  opacity: .8;
}

/* ---- 已付费内容体 ---- */
.teepay__body {
  line-height: 1.8;
}

/* ---- 下载按钮 ---- */
.teepay__dl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
  padding: 7px 18px;
  border-radius: 6px;
  border: 1.5px solid var(--theme, #50be43);
  color: var(--theme, #50be43);
  background: color-mix(in srgb, var(--theme, #50be43) 8%, transparent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}

.teepay__dl:hover {
  background: color-mix(in srgb, var(--theme, #50be43) 16%, transparent);
}

/* ---- 段落付费锁：内联短代码块 ---- */
.teepay-block.teepay--joe {
  margin: 14px 0;
}

/* ---- 错误提示 ---- */
.teepay--error {
  padding: 14px 18px;
  color: #f56c6c;
  font-size: 13px;
}

/* ---- layer 弹出二维码居中 ---- */
.teepay-qr {
  text-align: center;
  padding: 8px 0 4px;
}

.teepay-qr img {
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

/* ---- 响应式：小屏适配 ---- */
@media (max-width: 480px) {
  .teepay--locked {
    padding: 16px;
  }
  .teepay__btn {
    width: 100%;
    justify-content: center;
  }
}
