/* ==========================================================================
   滑块验证码组件样式（/captcha/captcha.css）
   被「我的授权」页与管理后台共用；设计令牌沿用各页已有的 CSS 变量。
   ========================================================================== */

.captcha-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 32, .56);
}

/* `hidden` 属性默认是 display:none，但上面把 display 改成了 flex，必须显式补回 */
.captcha-mask[hidden] { display: none; }

.captcha-panel {
  width: 100%;
  max-width: 320px;
  padding: 18px 20px 16px;
  border-radius: 14px;
  background: var(--surface-1, #fff);
  box-shadow: 0 18px 48px rgba(15, 23, 32, .28);
  text-align: left;
}

.captcha-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-1, #10202b);
}

.captcha-stage {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-3, #eef2f4);
}

.captcha-bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* 拼图块由脚本按背景实际显示宽度等比定位；不接收指针事件，拖动统一交给下方把手 */
.captcha-piece {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}

.captcha-track {
  position: relative;
  height: 44px;
  margin: 12px auto 0;
  max-width: 280px;
  border-radius: 10px;
  background: var(--surface-3, #eef2f4);
  overflow: hidden;
}

.captcha-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--brand-100, #d9ecff);
}

.captcha-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: var(--ink-3, #6b7b88);
  pointer-events: none;
  user-select: none;
}

.captcha-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand-600, #1f6feb);
  cursor: grab;
  touch-action: none;
}

.captcha-handle:active { cursor: grabbing; }

.captcha-handle:focus-visible {
  outline: 2px solid var(--brand-600, #1f6feb);
  outline-offset: 2px;
}

/* 箭头用纯 CSS 画，避免依赖字体图标 */
.captcha-handle::after {
  content: '';
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
  margin-left: -3px;
}

.captcha-error {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--danger-600, #d64545);
}

.captcha-cancel {
  margin-top: 12px;
  width: 100%;
}
