/* https://captcha.liveidentity.com/documentation/integration/library-default-style#overriding-javascript-library-default-captcha-style-elements */

/* Masquer les erreurs du captcha Orange */
[id$="captcha-bottom-container"] {
    display: none !important;
}

/* Aligner à gauche comme les autres champs */
[id*="captcha"] {
    margin-left: 0 !important;
}

[id*="captcha-logo-container"] {
    display: none !important;
}

#captcha-error {
    display: block !important;
    margin-bottom: 0.5rem !important;
}

#recaptchaInfo {
    color: var(--error-color);
    margin-top: 0.5rem !important;
}

@media (max-width: 480px) {
    /* Forcer captcha-content à 100% de largeur en mobile */
    [id*="captcha-content"] {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        box-sizing: border-box !important;
        margin-bottom: 1rem !important;
    }

    [id*="captcha"] {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        height: auto !important;
    }

    [id*="captcha-answer-container"] {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        align-items: flex-end !important;
        justify-content: space-between !important;
    }

    [id*="captcha-answer-box"] {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    [id*="captcha-validate"] {
        flex: 0 1 auto !important;
        white-space: nowrap !important;
        margin-top: 1.2rem !important;
        padding: 1.2rem 0 1.2rem 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    #captcha-error {
        position: relative !important;
    }

    #recaptchaInfo {
        position: relative !important;
    }

    [id*="captcha-img"] {
        max-width: 236px !important;
        margin: 0.5rem auto !important;
    }

    /* Centrer le logo de success */
    [id*="captcha-success"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
    }

    [id*="captcha-success"] img {
        width: auto !important;
        max-width: 100px !important;
    }

    [id*="captcha-answer-instruction"] {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
}