/**
 * 滑动验证码样式
 */

.wseller-captcha-container {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wseller-captcha-title {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    text-align: center;
}

.wseller-captcha-wrapper {
    position: relative;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    overflow: hidden;
}

.wseller-captcha-bg {
    display: block;
    width: 100%;
    height: auto;
}

.wseller-captcha-block {
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.wseller-captcha-slider {
    position: relative;
    height: 40px;
    margin: 10px auto 0;
    background: #e8e8e8;
    border-radius: 20px;
    border: 1px solid #ccc;
}

.wseller-captcha-slider-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #d4edda;
    border-radius: 20px;
    width: 0;
    transition: width 0.1s;
}

.wseller-captcha-slider-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    user-select: none;
    white-space: nowrap;
}

.wseller-captcha-slider-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.2s;
    z-index: 5;
}

.wseller-captcha-slider-btn:hover {
    background: #f0f0f0;
}

.wseller-captcha-slider-btn:active {
    background: #e0e0e0;
}

.wseller-captcha-slider-btn i {
    color: #666;
    font-size: 16px;
}

.wseller-captcha-refresh {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background 0.2s;
}

.wseller-captcha-refresh:hover {
    background: #fff;
}

.wseller-captcha-refresh i {
    color: #666;
    font-size: 14px;
}

.wseller-captcha-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.wseller-captcha-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wseller-captcha-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wseller-captcha-loading {
    text-align: center;
    padding: 30px;
    color: #999;
}

.wseller-captcha-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 验证成功状态 */
.wseller-captcha-container.verified {
    background: #d4edda;
    border-color: #c3e6cb;
}

.wseller-captcha-container.verified .wseller-captcha-title {
    color: #155724;
}

.wseller-captcha-container.verified .wseller-captcha-slider {
    background: #c3e6cb;
    border-color: #a8d5ba;
}

.wseller-captcha-container.verified .wseller-captcha-slider-track {
    background: #28a745;
}

.wseller-captcha-container.verified .wseller-captcha-slider-btn {
    background: #28a745;
    border-color: #28a745;
}

.wseller-captcha-container.verified .wseller-captcha-slider-btn i {
    color: #fff;
}

/* 验证失败状态 */
.wseller-captcha-container.error {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.wseller-captcha-container.error .wseller-captcha-slider {
    background: #f5c6cb;
    border-color: #f1b0b7;
}

.wseller-captcha-container.error .wseller-captcha-slider-track {
    background: #dc3545;
}

.wseller-captcha-container.error .wseller-captcha-slider-btn {
    background: #dc3545;
    border-color: #dc3545;
}

.wseller-captcha-container.error .wseller-captcha-slider-btn i {
    color: #fff;
}

/* 响应式 */
@media (max-width: 480px) {
    .wseller-captcha-container {
        padding: 10px;
    }
    
    .wseller-captcha-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .wseller-captcha-wrapper img {
        max-width: 100%;
        height: auto;
    }
    
    .wseller-captcha-slider {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .wseller-captcha-slider-text {
        font-size: 12px;
    }
}
