﻿.modal-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Dark Theme for Google reCAPTCHA - برای تم‌های دارک */
[data-bs-theme="dark"] .g-recaptcha[data-theme="dark"],
[data-bs-theme="blue-theme"] .g-recaptcha[data-theme="dark"],
[data-bs-theme="purple-theme"] .g-recaptcha[data-theme="dark"] {
    filter: invert(1) hue-rotate(180deg);
}

/* Light Theme for Google reCAPTCHA - برای تم‌های لایت */
[data-bs-theme="light"] .g-recaptcha[data-theme="light"],
[data-bs-theme="semi-dark"] .g-recaptcha[data-theme="light"],
[data-bs-theme="bordered-theme"] .g-recaptcha[data-theme="light"],
[data-bs-theme="lavender-theme"] .g-recaptcha[data-theme="light"] {
    /* بدون فیلتر - تم لایت پیش‌فرض */
}

/* Ensure reCAPTCHA container has proper styling */
.captcha-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Dark theme specific captcha styling */
[data-bs-theme="dark"] .captcha-section,
[data-bs-theme="blue-theme"] .captcha-section,
[data-bs-theme="purple-theme"] .captcha-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Light themes: subtle card-style wrapper */
[data-bs-theme="light"] .captcha-section,
[data-bs-theme="semi-dark"] .captcha-section,
[data-bs-theme="bordered-theme"] .captcha-section,
[data-bs-theme="lavender-theme"] .captcha-section {
    background: var(--bs-secondary-bg, #f8f9fa);
    border: 1px solid var(--bs-border-color, #dee2e6);
}

.numeric-captcha-img {
    max-width: 220px;
    border-radius: 6px;
    border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.12));
    display: block;
}

.captcha-loading-message {
    margin: 0 0 0.75rem;
    padding: 0.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-primary, #0d6efd);
    animation: captcha-loading-pulse 1.25s ease-in-out infinite;
}

.captcha-loading-message--error {
    color: var(--bs-danger, #dc3545);
    animation: none;
}

.captcha-loading-message[hidden],
.captcha-loading-message[aria-hidden="true"] {
    display: none !important;
    animation: none;
}

@keyframes captcha-loading-pulse {
    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

@media (prefers-reduced-motion: reduce) {
    .captcha-loading-message {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

[data-bs-theme="dark"] .numeric-captcha-img,
[data-bs-theme="blue-theme"] .numeric-captcha-img,
[data-bs-theme="purple-theme"] .numeric-captcha-img {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}