/* access_control/static/access_control/css/captcha.css */
.captcha-container {
    direction: ltr;
    margin: 1rem 0;
    user-select: none;
    font-family: system-ui, -apple-system, sans-serif;
    max-width: 100%;
}

.captcha-bg {
    position: relative;
    background: #eef2ff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    width: 100%; /* کاملاً ریسپانسیو */
}

.captcha-bg-image {
    width: 100%;
    height: auto;
    background-size: 100% 100%; /* پر کردن دقیق ابعاد */
    background-repeat: no-repeat;
    display: block;
}

.captcha-piece {
    position: absolute;
    top: 0;
    left: 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border-radius: 4px;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5));
    cursor: grab;
    touch-action: none;
    z-index: 10;
}

.captcha-piece:active,
.captcha-thumb:active {
    cursor: grabbing;
}

.captcha-slider {
    margin-top: 1rem;
}

.captcha-track {
    position: relative;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    height: 46px;
}

.captcha-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 44px;
    background: #4f46e5;
    border: none;
    border-radius: 999px;
    color: white;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
    transition: background-color 0.2s;
}

.captcha-thumb:hover {
    background: #4338ca;
}

.captcha-thumb:focus-visible {
    outline: 2px solid #facc15;
    outline-offset: 2px;
}

.captcha-message {
    margin-top: 0.75rem;
    min-height: 2.2rem;
    font-size: 0.875rem;
    text-align: center;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}
.captcha-message.is-error { color: #b91c1c; background: #fee2e2; border-radius: 8px; padding: 6px 12px; }
.captcha-message.is-success { color: #15803d; background: #dcfce7; border-radius: 8px; padding: 6px 12px; }
