/**
 * Cloudflare Turnstile Filter Styles
 * Theme Color: #1f79cf (Ocean Blue)
 */

/* Modal Container */
#cf-turnstile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.cf-turnstile-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
}

.cf-turnstile-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 420px;
    margin: 100px auto;
    box-shadow: 0 25px 80px rgba(31, 121, 207, 0.25);
    overflow: hidden;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header with gradient using #1f79cf */
.cf-turnstile-modal-header {
    background: linear-gradient(135deg, #1f79cf 0%, #3a9ff0 100%);
    color: white;
    padding: 28px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect on header */
.cf-turnstile-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cf-turnstile-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.cf-turnstile-modal-body {
    padding: 35px 30px;
    text-align: center;
}

.cf-turnstile-modal-body p {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 28px;
}

/* Turnstile Widget Container */
#cf-turnstile-widget {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    min-height: 65px;
}

/* Error Message Styling */
#cf-turnstile-error {
    color: #c62828;
    background: linear-gradient(to right, #ffebee, #fff5f5);
    border: 1px solid #ef9a9a;
    border-left: 4px solid #e57373;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    text-align: left;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(229, 115, 115, 0.15);
}

/* Success Message Styling (if needed) */
#cf-turnstile-success {
    color: #2e7d32;
    background: linear-gradient(to right, #e8f5e9, #f1f8e9);
    border: 1px solid #a5d6a7;
    border-left: 4px solid #81c784;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    text-align: left;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(129, 199, 132, 0.2);
}

/* Prevent background scrolling */
body.cf-turnstile-modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cf-turnstile-modal-content {
        margin: 50px 20px;
        border-radius: 12px;
    }
    
    .cf-turnstile-modal-header {
        padding: 24px 25px;
    }
    
    .cf-turnstile-modal-header h3 {
        font-size: 20px;
    }
    
    .cf-turnstile-modal-body {
        padding: 25px 20px;
    }
    
    .cf-turnstile-modal-body p {
        font-size: 14px;
    }
}

/* Loading Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1f79cf;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Additional: Fade in animation for modal */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Error Modal Styling */
#cf-turnstile-error-modal .cf-turnstile-modal-content {
    box-shadow: 0 25px 80px rgba(229, 115, 115, 0.3);
}

#cf-turnstile-error-modal .cf-turnstile-modal-header {
    background: linear-gradient(135deg, #e57373 0%, #ef5350 100%);
}

/* Button Styling (for error modal refresh button) */
#cf-turnstile-error-modal button {
    background: linear-gradient(135deg, #1f79cf 0%, #3a9ff0 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(31, 121, 207, 0.25);
}

#cf-turnstile-error-modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31, 121, 207, 0.35);
}

#cf-turnstile-error-modal button:active {
    transform: translateY(0);
}