.ra-smartcaptcha-wrap {
    width: 100%;
    margin: 14px 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ra-smartcaptcha-widget {
    min-height: 100px;
    max-width: 100%;
}

/* Invisible SmartCaptcha is triggered by the form's own full-width button.
 * Keep a tiny render surface for the SDK without reserving a blank auth row. */
.ra-smartcaptcha-wrap.ra-smartcaptcha-invisible {
    position: relative;
    width: 100%;
    height: 1px;
    min-height: 1px;
    margin: 0;
    padding: 0;
    display: block;
    overflow: visible;
    opacity: 0;
    pointer-events: none;
}

.ra-smartcaptcha-wrap.ra-smartcaptcha-invisible .ra-smartcaptcha-widget {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    min-height: 1px;
    overflow: visible;
}

.ra-smartcaptcha-wrap.ra-smartcaptcha-invisible .ra-smartcaptcha-message {
    display: none !important;
}

.ra-smartcaptcha-message {
    display: none;
    width: 100%;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.ra-smartcaptcha-message.is-visible {
    display: block;
}

.ra-smartcaptcha-message.is-error {
    color: #d9534f;
}

#pum-1161 .ra-smartcaptcha-wrap,
#pum-5379 .ra-smartcaptcha-wrap {
    margin-top: 12px;
    margin-bottom: 14px;
}

@media (max-width: 360px) {
    .ra-smartcaptcha-widget {
        transform: scale(.92);
        transform-origin: center top;
        margin-bottom: -5px;
    }
}

/*
 * Yandex's invisible-mode data-processing notice. The SDK places this
 * element in the page (not inside the widget iframe), so the site can keep
 * the shield in the same visual language as the RentArest footer policy.
 */
.SmartCaptcha-Shield {
    box-sizing: content-box !important;
    -webkit-user-select: none;
    user-select: none;
    color: #dedbb2de !important;
    background: #0f1217 !important;
    --color-typo-primary: #dedbb2de;
    --smart-captcha-background-color: #0f1217;
    width: 120px !important;
    border: 1px solid rgba(220, 180, 82, 0.28) !important;
    border-radius: 11px !important;
    align-items: center;
    padding: 6px !important;
    left: 0 !important;
    right: auto !important;
    margin-left: 0 !important;
    top: auto !important;
    bottom: clamp(6px, 1.25vw, 18px) !important;

    /* v1.0.307: keep the Yandex notice in its own foreground stacking layer.
     * v1.0.306 already proved that forcing background/background-color and even
     * an opaque inset paint layer is not sufficient when the footer is painted
     * in a competing stacking/compositing order. The custom RentArest consent
     * card does not exhibit the issue because it has an explicit top-level
     * z-index. Keep SmartCaptcha above footer decoration/toasts, but well below
     * the custom consent card (2147483647) and typical full-screen overlays. */
    z-index: 100000 !important;
    isolation: isolate !important;
    mix-blend-mode: normal !important;
}

/* Yandex adds a small internal inset to the left-positioned shield. */
.SmartCaptcha-Shield.SmartCaptcha-Shield_visible.SmartCaptcha-Shield_position_left {
    transform: translateX(-10px) !important;
}

/* Keep the shield opaque even when Yandex responsive rules switch at browser zoom.
 * The SDK currently exposes a generic _position_left class for bottom-left
 * placement, so do not key the override only to _position_bottom. The attribute
 * selector also survives future top/center/bottom position class variants. */
.SmartCaptcha-Shield.SmartCaptcha-Shield_visible,
.SmartCaptcha-Shield.SmartCaptcha-Shield_visible[class*="SmartCaptcha-Shield_position_"],
.SmartCaptcha-Shield.SmartCaptcha-Shield_visible.ra-smartcaptcha-shield-over-footer[class*="SmartCaptcha-Shield_position_"],
.SmartCaptcha-Shield.ra-smartcaptcha-shield-over-footer {
    background: #0f1217 !important;
    background-color: #0f1217 !important;
    background-image: none !important;
    opacity: 1 !important;
}

.SmartCaptcha-Shield.ra-smartcaptcha-shield-over-footer {
    /* The large inset shadow is a second paint-layer fallback. Even if a later
     * SDK rule makes the normal background transparent, the notice stays solid
     * over the footer without covering its own text/link content. */
    box-shadow:
        inset 0 0 0 1000px #0f1217,
        0 8px 24px rgba(0, 0, 0, 0.34) !important;
}

/* Yandex currently emits two Shield logo variants:
 * 1) a masked empty <a> whose mask is painted by the anchor background;
 * 2) an inline <svg> whose path uses currentColor.
 *
 * Keep one RentArest gold tone for both without producing the rectangular gold
 * block that appears when a background is forced onto the inline-SVG variant. */
.SmartCaptcha-Shield .SmartCaptcha-Shield-Anchor {
    color: rgba(220, 180, 82, 0.92) !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Mask variant (seen, for example, on the home page): the background is the
 * actual paint source for mask-image, so restore gold only when a mask exists. */
.SmartCaptcha-Shield .SmartCaptcha-Shield-Anchor[style*="mask-image"],
.SmartCaptcha-Shield .SmartCaptcha-Shield-Anchor[style*="-webkit-mask-image"] {
    background: rgba(220, 180, 82, 0.92) !important;
    background-color: rgba(220, 180, 82, 0.92) !important;
}

/* Inline-SVG variant inherits the same gold through currentColor while the
 * anchor itself remains transparent. */
.SmartCaptcha-Shield .SmartCaptcha-Shield-Anchor svg {
    color: inherit !important;
}

@media (max-width: 520px) {
    .SmartCaptcha-Shield {
        left: 0 !important;
        bottom: max(6px, env(safe-area-inset-bottom)) !important;
    }
}
