/* 下载区打赏按钮 · 前台样式
   按钮：实心玫红胶囊，挂在版本切换条右侧（nav 是 flex，margin-left:auto 顶到最右）
   弹窗：单张收款码 + 底部一句话 */

/* 打赏按钮：外观完全复用版本号按钮
   实现上是把它插进 .lv-versions__list 里、class 带 lv-versions__chip，
   于是 pub.css 的 .lv-versions__list a 规则（尺寸/圆角/配色/hover/深色变量）
   自动生效，主题换皮、深浅色切换都不用我们操心。
   这里只补 pub.css 没覆盖到的交互细节。 */
.lsg-dlrw-btn {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.lsg-dlrw-btn:focus-visible {
  outline: 2px solid var(--hl-primary, #2563eb);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- 弹窗 */

.lsg-dlrw-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lsg-dlrw-mask.is-open {
  opacity: 1;
  visibility: visible;
}

.lsg-dlrw-card {
  position: relative;
  width: 100%;
  max-width: 320px;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  padding: 1.75rem 1.25rem 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
  text-align: center;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lsg-dlrw-mask.is-open .lsg-dlrw-card {
  transform: none;
}

.lsg-dlrw-close {
  position: absolute;
  top: 0.4rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.lsg-dlrw-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #1e293b;
}

.lsg-dlrw-title {
  margin: 0 0 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1e293b;
}

/* 渠道切换条：只配 1 个码时前端不渲染，多个码才出现 */
.lsg-dlrw-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin: -0.35rem 0 1.1rem;
  padding: 0.2rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
}

.lsg-dlrw-tab {
  border: none;
  border-radius: 9px;
  padding: 0.3rem 0.8rem;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1.3;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.lsg-dlrw-tab:hover {
  color: #1e293b;
}

.lsg-dlrw-tab.is-active {
  background: #fff;
  color: #ec4899;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.lsg-dlrw-tab:focus-visible {
  outline: 2px solid #ec4899;
  outline-offset: 2px;
}

.lsg-dlrw-qr {
  width: 200px;
  height: 200px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.5rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

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

.lsg-dlrw-qr-fail {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.lsg-dlrw-footer {
  margin: 1.1rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #64748b;
}

.lsg-dlrw-done {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.5rem 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.lsg-dlrw-done:hover {
  background: rgba(15, 23, 42, 0.1);
}

@media (max-width: 420px) {
  .lsg-dlrw-card {
    padding: 1.5rem 1rem 1rem;
  }
  .lsg-dlrw-qr {
    width: 168px;
    height: 168px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lsg-dlrw-btn,
  .lsg-dlrw-mask,
  .lsg-dlrw-card {
    transition: none;
  }
  .lsg-dlrw-btn:hover,
  .lsg-dlrw-btn:active {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .lsg-dlrw-card {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .lsg-dlrw-mask {
    background: rgba(15, 23, 42, 0.72);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
