/* --------------------------------------------------------------
 * Click to Chat - Main Stylesheet
 * --------------------------------------------------------------
 * Description: Core UI styles, entry animations, greetings layout,
 * and mobile responsiveness for WhatsApp Click to Chat plugin.
 * Version: 4.26
 * Source: https://holithemes.com/plugins/click-to-chat/
 * --------------------------------------------------------------
*/


/*
 * 
 * side: base widget side position - right/left
*/
.ht-ctc-chat {
    --side: right;
    /* --side-desktop: right; */
    /* --side-mobile: right; */
}




/* Reset for Greetings Box */
.ht_ctc_chat_greetings_box *:not(ul):not(ol):not(.ht_ctc_default):not(.ht_ctc_defaults *) {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.ht_ctc_chat_greetings_box ul,
.ht_ctc_chat_greetings_box ol {
    margin-top: 0;
    margin-bottom: 0;
}

/* Layout */
.ht_ctc_chat_greetings_box_layout {
    clear: both;
}

/* Backdrop Overlay - element auto creates from js file*/
.ht_ctc_modal_backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    /* background: rgba(0, 0, 0, 0.4); */
    z-index: 9;
    backdrop-filter: blur(1px);
    /* backdrop-filter: blur(2px); */
    /* transition: opacity 2s ease; */
    animation: ctc_fadeIn 0.2s ease;
}

/* Optional: Scroll Lock Body (uncomment if needed) */
/* body.ht_ctc_modal_open {
    overflow: hidden;
} */

.ht_ctc_notification {
    animation: ctc_fadeIn 0.25s ease;
}

/* Animations */
/* FadeIn Animation */
@keyframes ctc_fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* .ht_ctc_chat_greetings_box {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block !important;
}

.ctc_greetings_opened {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
} */




/* Entry Animation - Corner */
/* @keyframes ht_ctc_an_corner {
    0% {
        transform: scale(0.3);
        opacity: 0;
        transform-origin: bottom right;
    }

    100% {
        transform: scale(1);
        opacity: 1;
        transform-origin: bottom right;
    }
}

.ht_ctc_an_corner {
    animation: ht_ctc_an_corner 0.2s ease-out;
    animation-fill-mode: both;
} */

/* todo: test c/g/s */
/* call to action stick - hover effects */ 
/* transform --shift changes at js based on widget side right/left */
/* pointer-events: none; */
/* .ht-ctc-cta-hover {
    opacity: 0;
    transform: translateX(var(--shift, 5px));
    transition: opacity 0.15s ease, transform 0.15s ease;
} */

/* .ht-ctc-chat:hover .ht-ctc-cta-hover {
    opacity: 1;
    display: block !important;
    transform: translateX(0);
    pointer-events: auto;
} */

/* Greetings Scroll Behavior */
.ctc_g_content {
    max-height: calc(80vh - 140px);
    overflow-y: auto;
}

.ctc_g_content,
.ctc_g_sentbutton,
.ctc_g_bottom {
    margin-top: -0.9px !important;
}

/* Greetings Header Image */
.greetings_header_image {
    position: relative;
    display: inline-block;
}

.greetings_header_image img {
    object-fit: cover;
}

/* Online Badge */
/* rtl left: 0px; added with in php page. */ 
.g_header_badge_online {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 1;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    /* Optional styling: 
    background-color: #06e376;
    border: 2px solid #075e54; */
}

/* Scrollbar Styling for Large Screens */
@media only screen and (min-width: 900px) {
    .ctc_g_content::-webkit-scrollbar {
        width: 2.8px;
    }

    .ctc_g_content::-webkit-scrollbar-thumb {
        background: #a5a5a5;
    }
}

/* Responsive: Mobile Specific Adjustments */
@media only screen and (max-width: 420px) {

    /* Widget Side Position Fixes */
    .ctc_side_positions .ctc_m_p_left {
        right: unset !important;
        left: 0 !important;
    }

    .ctc_side_positions .ctc_m_p_right {
        left: unset !important;
        right: 0 !important;
    }

    .ctc_side_positions .ctc_m_p_left .ctc_greetings_close_btn {
        float: left !important;
    }

    .ctc_side_positions .ctc_m_p_right .ctc_greetings_close_btn {
        float: right !important;
    }

    /* Call to Action Button Order */
    .ctc_side_positions .ctc_m_cta_order_0 {
        order: 0 !important;
    }

    .ctc_side_positions .ctc_m_cta_order_1 {
        order: 1 !important;
    }

    /* Full Width Greetings */
    .ht_ctc_greetings.ctc_m_full_width {
        position: fixed !important;
        bottom: 0 !important;
        right: 0 !important;
    }

    .ht_ctc_greetings.ctc_m_full_width .ht_ctc_chat_greetings_box {
        position: unset !important;
        margin: 7px !important;
        min-width: 80vw !important;
        width: calc(100vw - 14px) !important;
    }

    .ctc_m_full_width .ctc_g_message_box_width {
        max-width: 85% !important;
    }

    /* fix: animation and greetings in mobile devices not working properly. clear animation-fill-mode for .ht_ctc_animation only if child have .ht_ctc_greetings */
    .ht_ctc_animation:has(.ht_ctc_greetings) {
        animation-fill-mode: none !important;
    }
}

