/*
 * Cloudflare Turnstile CAPTCHA Styling
 * Modern, secure, and user-friendly design
 */

/* Main Turnstile Container */
.fabcrush-turnstile-container {
    margin: 20px 0;
    padding: 0;
    background: none;
    border: none;
    position: relative;
}

/* Turnstile Widget Alignment */
.fabcrush-turnstile-container .cf-turnstile {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 65px;
    position: relative;
    z-index: 2;
}

/* Loading State */
.fabcrush-turnstile-container .cf-turnstile::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: turnstile-spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fabcrush-turnstile-container .cf-turnstile[data-state="loading"]::before {
    opacity: 1;
}

@keyframes turnstile-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success State */
.fabcrush-turnstile-container .cf-turnstile[data-state="success"] {
    background: none;
    border-radius: 8px;
    padding: 10px;
}

/* Error State */
.fabcrush-turnstile-container .cf-turnstile[data-state="error"] {
    background: none;
    border-radius: 8px;
    padding: 10px;
}

/* Security Badge - Removed to keep it clean */

/* Responsive Design */
@media (max-width: 768px) {
    .fabcrush-turnstile-container {
        margin: 15px 0;
        padding: 12px;
        border-radius: 8px;
    }
    
    .fabcrush-turnstile-container .cf-turnstile {
        transform: scale(0.85);
        transform-origin: center;
    }
}

@media (max-width: 480px) {
    .fabcrush-turnstile-container {
        margin: 10px 0;
        padding: 10px;
    }
    
    .fabcrush-turnstile-container .cf-turnstile {
        transform: scale(0.75);
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .fabcrush-turnstile-container {
        background: none;
    }
    
    .fabcrush-turnstile-container:hover {
        border-color: none;
        box-shadow: none;
    }
}

/* Integration with Ettore Theme Forms */
.qodef-membership-login-modal-part .fabcrush-turnstile-container,
.qodef-membership-register-modal-part .fabcrush-turnstile-container {
    margin: 25px 0 20px 0;
    background: none;
    border: none;
}

/* WordPress Standard Forms */
#registerform .fabcrush-turnstile-container,
#loginform .fabcrush-turnstile-container {
    margin: 20px 0;
    padding: 0;
    background: none;
    border: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .fabcrush-turnstile-container {
        background: none;
        border: none;
    }
}

/* Focus Accessibility */
.fabcrush-turnstile-container .cf-turnstile:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}
