/* ============================================================
   jigsaw.css - 滑块拼图验证码弹窗样式（组件 DOM 由 js/jigsaw.js 自动创建）
   ============================================================ */
.jigsaw-mask {
  position: fixed;
  inset: 0;
  z-index: 200; /* 高于注册弹窗(100) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(15, 32, 60, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.jigsaw-mask.open {
  opacity: 1;
  visibility: visible;
}
.jigsaw-box {
  width: 342px; /* 310 图宽 + 16*2 内边距，实际宽度由 js 按图片尺寸设置 */
  max-width: 100%;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(10, 30, 60, 0.28);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s;
}
.jigsaw-mask.open .jigsaw-box {
  transform: none;
}

/* 头部：标题 + 刷新/关闭 */
.jigsaw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.jigsaw-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}
.jigsaw-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}
.jigsaw-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #999;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.jigsaw-tool:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #333;
}
.jigsaw-tool img {
  width: 16px;
  height: 16px;
  display: block;
}

/* 图片区：大图 + 拼图块 */
.jigsaw-img-wrap {
  position: relative;
  width: 310px;
  max-width: 100%;
  height: 155px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f7fa;
}
.jigsaw-img-wrap img {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
}
.jigsaw-big {
  width: 100%;
  height: auto;
}
.jigsaw-piece {
  z-index: 2;
  width: 55px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* 滑动条 */
.jigsaw-track {
  position: relative;
  height: 40px;
  margin-top: 12px;
  border-radius: 20px;
  background: #f5f7fa;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.jigsaw-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: rgba(64, 128, 255, 0.15);
}
.jigsaw-tip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #999;
  letter-spacing: 1px;
  pointer-events: none;
  transition: opacity 0.2s;
}
.jigsaw-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(30, 90, 160, 0.25);
  cursor: grab;
  touch-action: none;
}
.jigsaw-handle:active {
  cursor: grabbing;
}
.jigsaw-handle img {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}
.jigsaw-handle.loading {
  opacity: 0.7;
  cursor: wait;
}

/* 手机端 */
@media (max-width: 480px) {
  .jigsaw-box {
    width: 100%;
  }
}

/* ============================================================
   全页 Loading 遮罩（请求验证码图片期间，与 wx.html 同款转圈）
   ============================================================ */
.jigsaw-page-loading {
  position: fixed;
  inset: 0;
  z-index: 300; /* 高于滑块弹窗(200) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.jigsaw-page-loading.show {
  opacity: 1;
  visibility: visible;
}
/* 品牌蓝缺口圆环 spinner */
.pl-spinner {
  width: 48px;
  height: 48px;
  animation: pl-spin 0.9s linear infinite;
}
.pl-spinner svg {
  width: 100%;
  height: 100%;
  display: block;
}
.pl-ring-bg {
  stroke: rgba(64, 128, 255, 0.15);
}
.pl-ring-dot {
  stroke: #4080ff;
  stroke-dasharray: 90 126; /* 约 70% 弧长，形成缺口环 */
  transform-origin: 50% 50%;
}
@keyframes pl-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.pl-text {
  margin: 0;
  font-size: 14px;
  color: #666;
  letter-spacing: 1px;
}
