/**
 * 滑动验证码弹窗样式
 */

/* 弹窗遮罩 */
.slider-captcha-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.slider-captcha-modal.show {
  display: flex;
  opacity: 1;
}

/* 弹窗内容 */
.slider-captcha-modal .modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.slider-captcha-modal.show .modal-content {
  transform: scale(1);
}

/* 弹窗头部 */
.slider-captcha-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.slider-captcha-modal .modal-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.slider-captcha-modal .modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
}

.slider-captcha-modal .modal-close:hover {
  background: #f5f5f5;
}

.slider-captcha-modal .modal-close i {
  font-size: 18px;
  color: #999;
}

/* 验证码主体 */
.slider-captcha {
  position: relative;
  width: 320px;
  user-select: none;
  -webkit-user-select: none;
}

.slider-captcha .captcha-bg {
  position: relative;
  width: 320px;
  height: 160px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
}

.slider-captcha .captcha-bg img {
  width: 100%;
  height: 100%;
  display: block;
}

.slider-captcha .captcha-slider {
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
  z-index: 10;
}

.slider-captcha .captcha-slider img {
  display: block;
}

.slider-captcha .captcha-refresh {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all 0.3s;
}

.slider-captcha .captcha-refresh:hover {
  background: rgba(255, 255, 255, 1);
  transform: rotate(180deg);
}

.slider-captcha .captcha-refresh i {
  font-size: 16px;
  color: #666;
}

.slider-captcha .slider-track {
  position: relative;
  width: 100%;
  height: 40px;
  margin-top: 12px;
  background: #e4e4e4;
  border-radius: 20px;
  overflow: hidden;
}

.slider-captcha .slider-track-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: #52ccba;
  border-radius: 20px;
  transition: width 0.1s;
}

.slider-captcha .slider-track-bg.success {
  background: #52ccba;
}

.slider-captcha .slider-track-bg.fail {
  background: #f35d5d;
}

.slider-captcha .slider-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #999;
  z-index: 1;
}

.slider-captcha .slider-btn {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.3s;
}

.slider-captcha .slider-btn:hover {
  background: #f5f5f5;
}

.slider-captcha .slider-btn i {
  font-size: 18px;
  color: #666;
}

.slider-captcha .slider-btn.success {
  background: #52ccba;
}

.slider-captcha .slider-btn.success i {
  color: #fff;
}

.slider-captcha .slider-btn.fail {
  background: #f35d5d;
}

.slider-captcha .slider-btn.fail i {
  color: #fff;
}

.slider-captcha .captcha-status {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  height: 20px;
  line-height: 20px;
}

.slider-captcha .captcha-status.success {
  color: #52ccba;
}

.slider-captcha .captcha-status.fail {
  color: #f35d5d;
}

.slider-captcha .loading-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  border-radius: 4px;
}

.slider-captcha .loading-mask .loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #1e9fff;
  border-radius: 50%;
  animation: slider-captcha-spin 1s linear infinite;
}

@keyframes slider-captcha-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
