.contact-captcha {
    box-sizing: border-box;
    grid-column: 1 / -1;
    width: 100%;
    margin: 4px 0 16px;
    color: inherit;
}

.contact-captcha *,
.contact-captcha *::before,
.contact-captcha *::after {
    box-sizing: border-box;
}

.contact-captcha__controls {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 170px auto;
    gap: 12px;
    align-items: end;
    width: 100%;
}

.contact-captcha .contact-captcha__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
    color: inherit;
}

.contact-captcha .contact-captcha__label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: inherit;
}

.contact-captcha .contact-captcha__input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(127, 127, 127, .58);
    border-radius: 0;
    background: #fff;
    color: #171717;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .18em;
    line-height: 1.2;
    text-transform: uppercase;
}

.contact-captcha .contact-captcha__input:focus,
.contact-captcha .contact-captcha__refresh:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.contact-captcha__image {
    display: block;
    width: 170px;
    height: 54px;
    max-width: 100%;
    border: 1px solid rgba(127, 127, 127, .45);
    background: #f7f7f5;
    object-fit: contain;
}

.contact-captcha .contact-captcha__refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin: 0 0 5px;
    padding: 0 14px;
    border: 1px solid currentColor;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.contact-captcha .contact-captcha__refresh:disabled {
    cursor: wait;
    opacity: .58;
}

.contact-captcha__status {
    min-height: 1.4em;
    margin: 8px 0 0;
    color: inherit;
    font-size: 13px;
    line-height: 1.4;
    opacity: .78;
}

.contact-captcha__status.is-error {
    color: #b42318;
    font-weight: 700;
    opacity: 1;
}

.contact-captcha.is-loading .contact-captcha__image,
.contact-captcha.is-expired .contact-captcha__image {
    opacity: .55;
}

@media (max-width: 620px) {
    .contact-captcha__controls {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .contact-captcha .contact-captcha__field {
        grid-column: 1 / -1;
    }

    .contact-captcha .contact-captcha__refresh {
        min-height: 44px;
        margin: 0;
    }
}

@media (forced-colors: active) {
    .contact-captcha .contact-captcha__input,
    .contact-captcha__image,
    .contact-captcha .contact-captcha__refresh {
        border: 1px solid CanvasText;
    }
}
