/**
 * Face Detection - Styles
 */

/* Error messages */
.face-detection-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    padding: 8px 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    display: inline-block;
}

/* Invalid image styling */
img.face-detection-invalid,
.face-detection-invalid {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
}

/* Valid image styling */
img.face-detection-valid,
.face-detection-valid {
    border: 2px solid #28a745 !important;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
}

/* Loading indicator */
.face-detection-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.face-detection-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: face-detection-spin 1s linear infinite;
}

@keyframes face-detection-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Validation result messages */
.face-detection-result {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
}

.face-detection-result.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.face-detection-result.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.face-detection-result.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Canvas overlay for face detection */
.face-detection-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Face detection container */
.face-detection-container {
    position: relative;
    display: inline-block;
}

/* Validation button styling */
.face-detection-validate-btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px 0;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.face-detection-validate-btn:hover {
    background-color: #0056b3;
}

.face-detection-validate-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Face count badge */
.face-detection-count {
    display: inline-block;
    padding: 4px 10px;
    background-color: #17a2b8;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .face-detection-error,
    .face-detection-result {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .face-detection-validate-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}
