/* Keep mobile notices and floating controls within the viewport. */
@media (max-width: 1024px) {
    body > #widget_cookie_notice {
        position: fixed;
        left: auto;
        right: 15px;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        width: min(340px, calc(100% - 30px));
        max-height: calc(100dvh - 90px);
        overflow-y: auto;
        box-sizing: border-box;
        z-index: 9999999;
        transform: none;
    }
    body.rp-cookie-visible .b24-widget-button-wrapper,
    body.rp-cookie-visible .romanapro_fixed_right_icons { visibility: hidden; }
    /* Checkout fields must stay clear of floating chat/catalog launchers. */
    body:has(.constructor-cart) .b24-widget-button-wrapper,
    body:has(.constructor-cart) .romanapro_fixed_right_icons { visibility: hidden; }
    /* Keep project previews, equipment rows and enquiry controls unobstructed. */
    body:has(.rms, .rmp) .b24-widget-button-wrapper,
    body:has(.rms, .rmp) .romanapro_fixed_right_icons { visibility: hidden; }
    body:has(.juicy_available_page, .romanapro-spare-checkout, [data-spare-product], .catalog-table-section) .b24-widget-button-wrapper,
    body:has(.juicy_available_page, .romanapro-spare-checkout, [data-spare-product], .catalog-table-section) .romanapro_fixed_right_icons { visibility: hidden; }
    body:has(.romanapro_product_card_body) .b24-widget-button-position-bottom-right {
        right: 76px !important;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        transform: scale(.7);
        transform-origin: bottom right;
    }
    body:has(.romanapro_product_card_body) .romanapro_fixed_right_icons {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        transform: scale(.7);
        transform-origin: bottom right;
    }
}
@media (max-width: 360px) {
    body:has(.romanapro_product_card_body) #mobile-logo-block {
        width: 120px;
        flex: 0 1 120px;
        min-width: 0;
    }
    body:has(.romanapro_product_card_body) #mobile-logo-block svg,
    body:has(.romanapro_product_card_body) #mobile-logo-block img { width: 100%; height: auto; }
}
