/* 简单滑块验证样式 - 新版本 */
.simple-slider-captcha {
  width: 100%;
  margin: 12px 0;
}

/* 新版滑块验证码样式 */
.new-slider-captcha {
  position: relative;
  width: 100%;
  height: 36px;
  background: #f7f9fa;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  overflow: hidden;
  user-select: none;
  margin: 8px 0;
}

.new-slider-captcha .slider-track-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, #e4e7ed 0%, #e4e7ed 100%);
}

.new-slider-captcha .slider-progress {
  position: absolute;
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #409eff 0%, #66b1ff 100%);
  transition: width 0.2s ease;
}

.new-slider-captcha .slider-text {
  position: absolute;
  width: 100%;
  height: 100%;
  line-height: 36px;
  text-align: center;
  color: #606266;
  font-size: 12px;
  pointer-events: none;
  z-index: 1;
}

.new-slider-captcha .slider-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  cursor: grab;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s ease;
}

.new-slider-captcha .slider-btn:hover {
  box-shadow: 0 0 8px rgba(0,0,0,0.15);
}

.new-slider-captcha .slider-btn:active {
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

/* 验证成功状态 */
.new-slider-captcha.verified .slider-btn {
  background: #67c23a;
  border-color: #67c23a;
  cursor: default;
}

.new-slider-captcha.verified .slider-progress {
  background: #67c23a;
}

.new-slider-captcha.verified .slider-text {
  color: #ffffff;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .new-slider-captcha {
    height: 36px;
  }
  
  .new-slider-captcha .slider-btn {
    width: 36px;
    height: 36px;
  }
  
  .new-slider-captcha .slider-text {
    line-height: 36px;
    font-size: 12px;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .new-slider-captcha .slider-btn {
    touch-action: none;
  }
  
  .new-slider-captcha .slider-btn:hover {
    box-shadow: 0 0 6px rgba(0,0,0,0.1);
  }
  
  .new-slider-captcha .slider-btn:active {
    box-shadow: 0 0 8px rgba(0,0,0,0.15);
  }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  .new-slider-captcha {
    border-width: 2px;
    border-color: #000;
  }
  
  .new-slider-captcha .slider-btn {
    border-width: 2px;
    border-color: #000;
  }
}

/* 减少动画（可访问性） */
@media (prefers-reduced-motion: reduce) {
  .new-slider-captcha .slider-btn,
  .new-slider-captcha .slider-progress {
    transition: none;
  }
}

/* 兼容旧版样式 */
.slider-track {
  position: relative;
  width: 100%;
  height: 42px;
  background: #f8f8f8;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  overflow: visible;
  cursor: pointer;
  user-select: none;
}

.slider-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #e4e4e4;
  transition: background-color 0.3s ease;
  z-index: 1;
}

.slider-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
  background: transparent;
}

.slider-button {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  background: #fff;
  border: 1px solid #ccc;
  cursor: grab;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
  transform: translateX(0px);
  will-change: transform;
}

.slider-button:hover {
  background: #f5f5f5;
  border-color: #999;
}

.slider-button.dragging {
  cursor: grabbing;
  background: #f0f0f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.slider-arrow {
  font-size: 16px;
  color: #999;
  font-weight: bold;
  transition: color 0.3s ease;
}

/* 验证成功状态（兼容） */
.simple-slider-captcha.verified .slider-track {
  border-color: #07c160;
}

.simple-slider-captcha.verified .slider-button {
  background: #07c160;
  border-color: #07c160;
}

.simple-slider-captcha.verified .slider-arrow {
  color: #fff;
}

.simple-slider-captcha.verified .slider-progress {
  background: #67c23a;
}

.simple-slider-captcha.verified .slider-text {
  color: #ffffff;
}