/* Стили для Drawing Captcha */

.captcha-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.captcha-modal.show {
    display: flex;
}

.captcha-modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(78, 79, 115, 0.3);
    border: 2px solid #4E4F73;
    position: relative;
}

.captcha-close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: rgba(78, 79, 115, 0.5);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    z-index: 10;
}

.captcha-close-btn:hover {
    color: #4E4F73;
    background: rgba(78, 79, 115, 0.08);
}

.captcha-header {
    margin-bottom: 24px;
}

.captcha-label {
    display: inline-block;
    background: #4E4F73;
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-family: 'OpenSans', sans-serif;
}

.captcha-title {
    font-size: 18px;
    font-weight: 700;
    color: #4E4F73;
    margin: 12px 0 8px 0;
    line-height: 1.4;
    font-family: 'OpenSans', sans-serif;
}

.captcha-subtitle {
    font-size: 14px;
    color: #4E4F73;
    opacity: 0.7;
    margin: 0;
    font-family: 'OpenSans', sans-serif;
}

.captcha-drawing-area {
    position: relative;
    background: #FFFFFF;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #4E4F73;
}

#captchaCanvas {
    display: block;
    cursor: crosshair;
    border-radius: 4px;
    position: relative;
    z-index: 1;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.captcha-start-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #734E2F;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 4px rgba(78, 79, 115, 0.3);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.captcha-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #4E4F73;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.captcha-clear-btn {
    background: transparent;
    border: 2px solid #FFFFFF;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'PP Neue Montreal', sans-serif;
}

.captcha-clear-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.captcha-next-btn {
    background: #FFFFFF;
    color: #4E4F73;
    border: 2px solid #FFFFFF;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: 'OpenSans', sans-serif;
}

.captcha-next-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 79, 115, 0.3);
}

.captcha-next-btn:active {
    transform: translateY(0);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .captcha-modal-content {
        padding: 20px;
        width: 95%;
        max-width: none;
    }
    
    .captcha-title {
        font-size: 16px;
    }
    
    .captcha-subtitle {
        font-size: 12px;
    }
    
    .captcha-drawing-area {
        padding: 15px;
        min-height: 250px;
    }
    
    #captchaCanvas {
        width: 100%;
        height: auto;
    }
    
    .captcha-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .captcha-clear-btn,
    .captcha-next-btn {
        width: 100%;
        justify-content: center;
    }
}
