﻿/* Anti-Bot Protection Styles */
.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.antibot-error {
    color: #721c24 !important;
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    border-radius: 4px !important;
    padding: 10px 15px !important;
    margin: 10px 0 !important;
    font-size: 14px !important;
    display: none !important;
}

/* Visual CAPTCHA Styles */
.visual-captcha-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #28a745;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    max-width: 420px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.visual-captcha-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #28a745, transparent);
    animation: loading-line 2s infinite;
}

@keyframes loading-line {
    0% { left: -100%; }
    100% { left: 100%; }
}

.captcha-header {
    text-align: center;
    margin-bottom: 20px;
}

.captcha-header h4 {
    margin: 0 0 10px 0;
    color: #28a745;
    font-size: 20px;
    font-weight: bold;
}

.captcha-header p {
    margin: 0 0 5px 0;
    color: #495057;
    font-weight: bold;
    font-size: 16px;
}

.captcha-header small {
    display: block;
    margin-bottom: 15px;
    font-style: italic;
}

.refresh-captcha {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.refresh-captcha:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Enhanced Verify Button Styles */
.verify-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.verify-button:hover {
    background: linear-gradient(135deg, #218838 0%, #1abc9c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.verify-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
}

.captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.captcha-image {
    position: relative;
    border: 3px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    padding: 8px;
    transition: all 0.3s ease;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.captcha-image:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.25);
    transform: translateY(-2px);
}

.captcha-image svg {
    width: 100%;
    height: 100%;
    max-width: 75px;
    max-height: 65px;
    transition: transform 0.2s ease;
}

.captcha-image:hover svg {
    transform: scale(1.05);
}

.captcha-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.15);
    border-radius: 5px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.captcha-overlay.selected {
    opacity: 1;
    background: rgba(40, 167, 69, 0.25);
    backdrop-filter: blur(1px);
}

.captcha-overlay.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: #28a745;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(255,255,255,0.8);
    animation: checkmark-pop 0.3s ease forwards;
}

@keyframes checkmark-pop {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-45deg); }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(0deg); }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

.captcha-footer {
    text-align: center;
    margin-top: 20px;
}

#captcha-status {
    font-size: 14px;
    color: #6c757d;
    margin: 15px 0;
    padding: 10px;
    border-radius: 6px;
    background: rgba(108, 117, 125, 0.1);
    transition: all 0.3s ease;
}

#captcha-status.captcha-success {
    color: #28a745;
    font-weight: bold;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

#captcha-status.captcha-error {
    color: #dc3545;
    font-weight: bold;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    border: 0 !important;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .visual-captcha-container {
        padding: 20px 15px;
        margin: 15px 0;
        max-width: 100%;
    }
    
    .captcha-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .captcha-image {
        height: 75px;
    }
    
    .captcha-header h4 {
        font-size: 18px;
    }
}

/* Smooth show/hide animations */
.visual-captcha-container[style*="opacity: 0"] {
    pointer-events: none;
}

.visual-captcha-container[style*="opacity: 1"] {
    pointer-events: auto;
}