
/* =========================================
   TAWK.TO WIDGET CUSTOMIZATION
========================================= */


/* 1. Hide Tawk.to on homepage for
   mobile and tablet */

@media screen and (max-width: 1024px),
       screen and (hover: none) and (pointer: coarse) {

body:is(.home, .woocommerce-shop) #min-widget,
body:is(.home, .woocommerce-shop) #max-widget,
body:is(.home, .woocommerce-shop) #branding-widget,
body:is(.home, .woocommerce-shop) #message-preview,
body:is(.home, .woocommerce-shop) #chat-bubble {
    display: none !important;
}

}


/* 2. Keep Tawk.to above bottom navigation
   on mobile and tablet */

@media screen and (max-width: 1023px) {

    body:has(.bottom-navigation) #min-widget > iframe,
    body:has(.bottom-navigation) #branding-widget > iframe,
    body:has(.bottom-navigation) #message-preview > iframe,
    body:has(.bottom-navigation) #chat-bubble > iframe {
        translate: 0 -80px !important;
    }

}


/* 3. Stop Tawk.to at desktop footer
   using existing JavaScript variable */

@media screen and (min-width: 1024px) {

    #min-widget > iframe,
    #branding-widget > iframe,
    #message-preview > iframe,
    #chat-bubble > iframe {
        translate: 0 calc(
            -1 * var(--tawk-footer-lift, 0px)
        ) !important;
    }

}


/* 4. Hide Tawk.to branding */

#branding-widget {
    display: none !important;
}
