/* Sticky CTA mobile — ficha do imóvel (≤ 991px) */

.ci-mobile-cta {
    display: none;
}

@media (max-width: 991px) {
    .ci-mobile-cta {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        pointer-events: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    body.ci-mobile-cta-ativo {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .ci-mobile-cta__bar {
        pointer-events: auto;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .ci-mobile-cta__contato {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 52px;
        margin: 0;
        padding: 0.75rem 1rem;
        border: 0;
        border-radius: 10px;
        background: var(--primary, #13293d);
        color: #ffffff;
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.2;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }

    .ci-mobile-cta__contato:hover,
    .ci-mobile-cta__contato:focus {
        filter: brightness(0.95);
        outline: none;
    }

    .ci-mobile-cta__contato:focus-visible {
        outline: 2px solid #93c5fd;
        outline-offset: 2px;
    }

    .ci-mobile-cta__fabs {
        pointer-events: none;
        position: absolute;
        right: 12px;
        bottom: calc(74px + env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
        padding-bottom: 8px;
        z-index: 1041;
    }

    .ci-mobile-cta__fab {
        pointer-events: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        color: #111827;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
        text-decoration: none !important;
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        padding: 0;
        z-index: 1042;
    }

    .ci-mobile-cta__fab:hover,
    .ci-mobile-cta__fab:focus {
        color: #111827;
        text-decoration: none !important;
        filter: brightness(0.98);
        outline: none;
    }

    .ci-mobile-cta__fab:focus-visible {
        outline: 2px solid #93c5fd;
        outline-offset: 2px;
    }

    .ci-mobile-cta__fab--whatsapp {
        background: #25d366;
        border-color: #25d366;
        color: #ffffff !important;
        font-size: 1.35rem;
    }

    .ci-mobile-cta__fab--whatsapp:hover,
    .ci-mobile-cta__fab--whatsapp:focus {
        color: #ffffff !important;
    }

    /* Só esconde o WA legado se o FAB do sticky existir */
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-whatsapp #webcarePopup_8287842525,
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-whatsapp .byside_window_bannerBySideData_5a783ab067977,
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-whatsapp a.fixed.bottom-4.right-4,
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-whatsapp .fixed.bottom-4.right-4[href*="whatsapp"],
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-whatsapp .fixed.bottom-4.right-4[href*="wa.me"],
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-whatsapp .fixed.bottom-4.right-4[href*="chamawhats"],
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-whatsapp a#whatsapp.fixed,
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-whatsapp a#whatsapp.fixed.bottom-4 {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    /* Só esconde o float de financiamento se o FAB do simulador existir */
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-simulador #webcarePopup_828784252,
    body.ci-mobile-cta-ativo.ci-mobile-cta-com-simulador .byside_window_bannerBySideData_5a783ab067972 {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}
