/**
 * 2007-2026 PrestaShop
 *
 * @author    Prestaelements <info@prestaelements.com>
 * @copyright 2026 Prestaelements
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *
 * The captcha inside the forms of the shop. Neutral on purpose: it takes the
 * fonts and colours of the theme.
 */

.pe-captcha {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* A whole row in flex and grid forms (Blocks Builder uses a grid). */
    flex: 1 0 100%;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 12px 0;
    box-sizing: border-box;
}

/* One line forms (newsletter, stock alert): the captcha on its own line below. */
.pe-captcha--newsletter,
.pe-captcha--stock_alert {
    flex-basis: 100%;
}

/* reCAPTCHA Enterprise with its corner badge: nothing to show in the form. */
.pe-captcha--invisible {
    display: none;
}

.pe-captcha__label {
    font-weight: 600;
}

/* Never wider than the form: the widget must not stretch the page. */
.pe-captcha__widget {
    max-width: 100%;
    min-height: 65px;
    overflow: hidden;
}

.pe-captcha__widget iframe {
    max-width: 100%;
}

.pe-captcha__image-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pe-captcha__image {
    display: block;
    width: 150px;
    height: 46px;
    border-radius: 4px;
    background: #fff;
}

.pe-captcha__refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    opacity: 0.7;
    cursor: pointer;
}

.pe-captcha__refresh:hover,
.pe-captcha__refresh:focus {
    opacity: 1;
}

.pe-captcha__code {
    max-width: 220px;
    text-transform: lowercase;
}

.pe-captcha__error {
    color: #c0392b;
    font-size: 0.9em;
}

.pe-captcha__error[hidden] {
    display: none;
}

.pe-captcha__legal {
    margin: 0;
    font-size: 0.8em;
    opacity: 0.75;
}

.pe-captcha__legal a {
    text-decoration: underline;
}

/* Google allows hiding its badge when the notice is shown in the forms. */
.pe-captcha-no-badge .grecaptcha-badge {
    visibility: hidden;
}
