/*!
 * 打赏单页 - 在线支付弹窗样式
 * 类名统一 yf-pay- 前缀，与页面既有样式完全隔离
 */

.yf-pay-mask,
.yf-pay-mask * { box-sizing: border-box; }

.yf-pay-mask {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(20, 28, 42, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: yfPayFade .18s ease-out;
}
.yf-pay-mask[hidden] { display: none; }

@keyframes yfPayFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes yfPayUp { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

.yf-pay-dialog {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(12, 22, 40, .32);
  animation: yfPayUp .22s cubic-bezier(.22, .9, .3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #2c3440;
  text-align: left;
  line-height: 1.6;
}

.yf-pay-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.yf-pay-close:hover { background: rgba(255, 255, 255, .4); }

/* ---------- 头部 ---------- */
.yf-pay-head {
  background: linear-gradient(135deg, #16aaf7 0, #c696fc 80%);
  color: #fff;
  text-align: center;
  padding: 22px 20px 20px;
  border-radius: 16px 16px 0 0;
}
.yf-pay-head-label { font-size: 12.5px; opacity: .92; letter-spacing: .5px; }
.yf-pay-amount {
  margin-top: 4px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.15;
}
.yf-pay-amount span { font-size: 19px; font-weight: 600; margin-right: 2px; vertical-align: 3px; }
.yf-pay-tier {
  margin-top: 5px;
  font-size: 12.5px;
  opacity: .93;
  min-height: 18px;
  word-break: break-all;
}

/* ---------- 主体 ---------- */
.yf-pay-body { padding: 18px 20px 20px; }

.yf-pay-field { margin-bottom: 15px; }
.yf-pay-field > label {
  display: block;
  font-size: 12.5px;
  color: #5b6675;
  font-weight: 500;
  margin-bottom: 7px;
}
.yf-pay-field > label em {
  font-style: normal;
  color: #a8b2c0;
  font-weight: 400;
  margin-left: 5px;
  font-size: 11.5px;
}

.yf-pay-field input[type="text"],
.yf-pay-field input[type="number"] {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  font-size: 14.5px;
  font-family: inherit;
  color: #2c3440;
  background: #fbfcfe;
  transition: border-color .16s, box-shadow .16s, background .16s;
  -webkit-appearance: none;
  appearance: none;
}
.yf-pay-field input:focus {
  outline: none;
  border-color: #16aaf7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(22, 170, 247, .13);
}
.yf-pay-field input::placeholder { color: #b6c0cd; }

/* ---------- 支付方式 ---------- */
.yf-pay-channels { display: flex; gap: 10px; flex-wrap: wrap; }
.yf-pay-ch {
  flex: 1 1 0;
  min-width: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 8px;
  border: 1.5px solid #e3e9f2;
  border-radius: 10px;
  background: #fbfcfe;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #5b6675;
  user-select: none;
  transition: all .16s;
  font-family: inherit;
}
.yf-pay-ch:hover { border-color: #cfdcec; background: #fff; }
.yf-pay-ch.is-active {
  border-color: var(--ch-color, #16aaf7);
  background: #fff;
  color: var(--ch-color, #16aaf7);
  box-shadow: 0 3px 12px rgba(22, 170, 247, .14);
}
.yf-pay-ch .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ch-color, #16aaf7);
  flex: 0 0 9px;
}

/* ---------- 提示 / 错误 ---------- */
.yf-pay-notice {
  font-size: 12px;
  color: #97a1b0;
  background: #f7f9fc;
  border-radius: 9px;
  padding: 9px 11px;
  margin-bottom: 14px;
  line-height: 1.6;
}
.yf-pay-notice:empty { display: none; }

.yf-pay-error {
  font-size: 13px;
  color: #b83030;
  background: #fdeaea;
  border-radius: 9px;
  padding: 9px 11px;
  margin-bottom: 14px;
}
.yf-pay-error[hidden] { display: none; }

/* ---------- 按钮 ---------- */
.yf-pay-submit {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #16aaf7 0, #7d8efc 100%);
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter .16s, transform .06s;
  box-shadow: 0 6px 18px rgba(22, 170, 247, .3);
}
.yf-pay-submit:hover { filter: brightness(1.05); }
.yf-pay-submit:active { transform: translateY(1px); }
.yf-pay-submit:disabled { opacity: .62; cursor: default; filter: none; box-shadow: none; }

.yf-pay-foot {
  margin-top: 11px;
  text-align: center;
  font-size: 11.5px;
  color: #a8b2c0;
  line-height: 1.6;
}

/* ---------- 跳转遮罩 ---------- */
.yf-pay-redirect {
  position: fixed;
  inset: 0;
  z-index: 20001;
  background: rgba(255, 255, 255, .93);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #5b6675;
  font-size: 14px;
}
.yf-pay-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #e6eef8;
  border-top-color: #16aaf7;
  border-radius: 50%;
  animation: yfPaySpin .8s linear infinite;
}
@keyframes yfPaySpin { to { transform: rotate(360deg); } }

body.yf-pay-lock { overflow: hidden; }

@media (max-width: 420px) {
  .yf-pay-dialog { max-width: 100%; border-radius: 14px; }
  .yf-pay-amount { font-size: 30px; }
  .yf-pay-body { padding: 16px 16px 18px; }
  .yf-pay-ch { min-width: 92px; font-size: 13.5px; padding: 10px 6px; }
}
