/* 滑块验证容器 */
#drag {
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7ec 100%);
    width: 100%;
    height: 44px;
    line-height: 44px;
    text-align: center;
    color: #606266;
    border-radius: 22px;
    display: block;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #dcdfe6;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 滑块禁用状态 */
#drag.drag-disabled {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border-color: #ccc;
}

#drag.drag-disabled .handler {
    cursor: not-allowed;
    opacity: 0.6;
}

#drag.drag-disabled .drag_text {
    color: #999;
}

/* 滑块 */
#drag .handler {
    position: absolute;
    border-radius: 22px;
    top: 2px;
    left: 2px;
    width: 38px;
    height: 38px;
    cursor: move;
    cursor: -webkit-grab;
    cursor: grab;
    box-sizing: border-box;
    z-index: 10;
    will-change: transform, left;
}

/* 滑块默认状态 */
.handler_bg {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 100%);
    border: 1px solid #c0c4cc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.handler_bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239095a0'%3E%3Cpath d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 滑块悬停效果 - 不使用transform避免重排 */
.handler_bg:hover {
    border-color: #909399;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 滑块点击时的效果 */
.handler_bg:active {
    cursor: -webkit-grabbing;
    cursor: grabbing;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

/* 滑块验证通过状态 */
.handler_ok_bg {
    background: linear-gradient(135deg, #67c23a 0%, #85ce61 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(103, 194, 58, 0.4);
}

.handler_ok_bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 背景进度条 - 无动画，直接响应 */
#drag .drag_bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #409eff 0%, #66b1ff 100%);
    border-radius: 22px;
    width: 0px;
    z-index: 1;
    /* 移除transition，实现零延迟跟随 */
}

/* 文字 */
#drag .drag_text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    z-index: 5;
}

/* 验证通过后的文字 */
.drag_text_validated {
    color: #fff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 错误提示 */
.validateErr {
    color: #f56c6c;
    font-size: 13px;
    margin-top: -10px;
    margin-bottom: 10px;
    padding-left: 10px;
    display: none;
    font-weight: 500;
}

/* 滑块验证通过后的整体样式 */
#drag.validated {
    border-color: #67c23a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05), 0 0 0 2px rgba(103, 194, 58, 0.2);
}
