/* 
 * Drawest Puzzle Captcha - Reusable Component 
 * Premium Drag-to-Verify Security
 */

.dw-captcha-box {
    width: 320px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
    user-select: none;
    position: relative;
}

.dw-captcha-canvas-wrap {
    position: relative;
    width: 290px;
    height: 155px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.dw-captcha-main {
    display: block;
}

.dw-captcha-piece {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

.dw-captcha-slider-wrap {
    height: 40px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-top: 15px;
    position: relative;
}

.dw-captcha-slider-bar {
    position: absolute;
    top: 1px;
    left: 1px;
    height: 38px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    z-index: 1;
}

.dw-captcha-slider-handle {
    position: absolute;
    top: -1px;
    left: 0;
    width: 50px;
    height: 42px;
    background: var(--drawest-accent, #6366f1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: grab;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    transition: background 0.2s;
}

.dw-captcha-slider-handle:active {
    cursor: grabbing;
    background: #4f46e5;
}

.dw-captcha-slider-text {
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    pointer-events: none;
}

.dw-captcha-refresh {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: transform 0.3s;
}

.dw-captcha-refresh:hover {
    transform: rotate(180deg);
}

.dw-captcha-status {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 5px;
    background: rgba(0,0,0,0.7);
    transform: translateY(100%);
    transition: transform 0.3s;
    z-index: 25;
}

.dw-captcha-status.show {
    transform: translateY(0);
}

.dw-captcha-status.success { background: var(--dl-success, #10b981); }
.dw-captcha-status.error { background: var(--dl-danger, #ef4444); }
