/* CartShield CAPTCHA Modal Styles */

.cartshield-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999998;
    backdrop-filter: blur(4px);
}

#cartshield-captcha-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Override display none to flex when jQuery show() is called */
#cartshield-captcha-modal[style*="display: block"] {
    display: flex !important;
}

#cartshield-captcha-modal .cartshield-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 999999;
    text-align: center;
    animation: cartshield-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#cartshield-captcha-modal h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

#cartshield-captcha-modal p {
    margin: 0 0 24px 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.5;
}

#cartshield-captcha-widget {
    margin: 0 auto 24px auto;
    display: flex;
    justify-content: center;
    min-height: 78px; /* Standard recaptcha height */
}

.cartshield-error {
    color: #dc2626 !important;
    background: #fef2f2;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #fecaca;
    font-size: 14px !important;
    margin-bottom: 24px !important;
}

.cartshield-actions {
    display: flex;
    justify-content: center;
}

#cartshield-captcha-cancel {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

#cartshield-captcha-cancel:hover {
    color: #475569;
    background: #f1f5f9;
}

@keyframes cartshield-pop {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Math Captcha */
.cartshield-math-captcha {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.cartshield-math-question {
    font-size: 16px;
    color: #334155;
}
.cartshield-math-question strong {
    font-size: 18px;
    color: #0f172a;
}
.cartshield-math-row {
    display: flex;
    gap: 8px;
}
#cartshield-math-answer {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    text-align: center;
}
#cartshield-math-answer:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
#cartshield-math-submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
#cartshield-math-submit:hover {
    background: #2563eb;
}
