/*==================================================
                BTBP CHATBOT WIDGET
==================================================*/

#cb-widget{
    position:fixed;
    right:25px;
    bottom:10px;
    z-index:999999;
    font-family:Arial,Helvetica,sans-serif;
}

/*=========================================
            Toggle Button
=========================================*/

#cb-widget-toggle{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    cursor:pointer;

    background:transparent !important;
    border:none !important;
    outline:none;
    box-shadow:none !important;

    width:auto;
    height:auto;

    padding:0;
}

/* Remove all browser effects */

#cb-widget-toggle:hover,
#cb-widget-toggle:focus,
#cb-widget-toggle:active{
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
    outline:none !important;
}

/*=========================================
                ICON
=========================================*/

#cb-widget-toggle img{

    width:82px;
    height:82px;

    display:block;

    object-fit:contain;

    background:#ffffff;

    border-radius:50%;

    padding:8px;

    border:none;

    box-shadow:
        0 12px 30px rgba(0,0,0,.20);

    transition:.35s ease;

    animation:cbFloat 3s ease-in-out infinite;

}

#cb-widget-toggle:hover img{

    transform:translateY(-6px) scale(1.08);

}

/*=========================================
                TEXT
=========================================*/

#cb-widget-toggle span{

    margin-top:0px;

    display:inline-block;

    padding:8px 18px;

    background:#ffffff;

    color:#111;

    border-radius:30px;

    font-size:15px;

    font-weight:700;

    text-align:center;

    white-space:nowrap;

    box-shadow:0 6px 18px rgba(0,0,0,.18);

    transition:.3s;

}

#cb-widget-toggle:hover span{

    background:#e3e3e3;

    color:#333333;

}

/*=========================================
                PANEL
=========================================*/

#cb-widget-panel{

    position:absolute;

    right:0;

    bottom:120px;

    width:390px;

    height:720px;

    display:none;

    overflow:hidden;

    background:#fff;

    border-radius:18px;

    box-shadow:
        0 18px 50px rgba(0,0,0,.30);

    animation:popupShow .30s ease;

}

#cb-widget-panel.cb-open{

    display:block;

}

/*=========================================
            CLOSE BUTTON
=========================================*/

#cb-widget-close{

    position:absolute;

    top:10px;

    right:10px;

    width:34px;

    height:34px;

    border:none;

    border-radius:50%;

    background:rgba(0,0,0,.70);

    color:#fff;

    cursor:pointer;

    font-size:22px;

    line-height:34px;

    text-align:center;

    z-index:999;

}

#cb-widget-close:hover{

    background:#d60000;

    transform:rotate(90deg);

}

/*=========================================
                IFRAME
=========================================*/

#cb-widget-frame{

    width:100%;

    height:100%;

    border:none;

    background:#ffffff;

}

/*=========================================
                FLOAT
=========================================*/

@keyframes cbFloat{

0%{

transform:translateY(0);

}

50%{

transform:translateY(-8px);

}

100%{

transform:translateY(0);

}

}

/*=========================================
                PULSE
=========================================*/

@keyframes cbPulse{

0%{

box-shadow:
0 12px 30px rgba(0,0,0,.20),
0 0 0 0 rgba(69, 73, 80, 0.3);

}

70%{

box-shadow:
0 12px 30px rgba(0,0,0,.20),
0 0 0 14px rgba(0,102,255,0);

}

100%{

box-shadow:
0 12px 30px rgba(0,0,0,.20),
0 0 0 0 rgba(0,102,255,0);

}

}

/*=========================================
            POPUP
=========================================*/

@keyframes popupShow{

from{

opacity:0;

transform:translateY(30px) scale(.92);

}

to{

opacity:1;

transform:translateY(0) scale(1);

}

}

/*=========================================
            TABLET
=========================================*/

@media(max-width:768px){

#cb-widget{

right:20px;

bottom:25px;

}

#cb-widget-panel{

left:0;

right:0;

bottom:0;

width:100vw;

height:100vh;

max-width:100vw;

max-height:100vh;

border-radius:0;

}

#cb-widget-toggle img{

width:72px;

height:72px;

}

#cb-widget-toggle span{

font-size:14px;

padding:7px 16px;

}

}

/*=========================================
            MOBILE
=========================================*/

@media(max-width:480px){

#cb-widget{

right:15px;

bottom:20px;

}

#cb-widget-toggle img{

width:66px;

height:66px;

}

#cb-widget-toggle span{

font-size:13px;

padding:6px 14px;

}

}

/* One-time homepage introduction */
#cb-widget-intro{
    position:absolute;
    right:110px;
    bottom:38px;
    width:330px;
    padding:20px 48px 20px 22px;
    visibility:hidden;
    opacity:0;
    transform:translateY(14px) scale(.97);
    background:#ffffff;
    border:1px solid rgba(26,37,67,.12);
    border-radius:16px;
    box-shadow:0 18px 48px rgba(10,20,38,.24);
    color:#1a2543;
    pointer-events:none;
    transition:opacity .3s ease, transform .3s ease, visibility .3s ease;
}

#cb-widget-intro::after{
    content:"";
    position:absolute;
    right:-9px;
    bottom:28px;
    width:18px;
    height:18px;
    background:#ffffff;
    border-right:1px solid rgba(26,37,67,.12);
    border-top:1px solid rgba(26,37,67,.12);
    transform:rotate(45deg);
}

#cb-widget-intro.cb-intro-visible{
    visibility:visible;
    opacity:1;
    transform:translateY(0) scale(1);
    pointer-events:auto;
}

#cb-widget.cb-intro-active #cb-widget-toggle img{
    animation:cbIntroPulse 2s ease-out 4;
}

#cb-widget-intro p{
    margin:0 0 14px;
    color:#465673;
    font-size:15px;
    line-height:1.5;
}

#cb-widget-intro p strong{
    display:block;
    margin-bottom:3px;
    color:#1a2543;
    font-size:18px;
}

#cb-widget-intro-action{
    min-height:40px;
    padding:9px 17px;
    border:0;
    border-radius:22px;
    background:#a91318;
    color:#ffffff;
    cursor:pointer;
    font-size:14px;
    font-weight:700;
    transition:background .2s ease, transform .2s ease;
}

#cb-widget-intro-action:hover,
#cb-widget-intro-action:focus{
    background:#7f0d12;
    transform:translateY(-1px);
}

#cb-widget-intro-close{
    position:absolute;
    top:10px;
    right:10px;
    width:30px;
    height:30px;
    padding:0;
    border:0;
    border-radius:50%;
    background:#eef1f5;
    color:#1a2543;
    cursor:pointer;
    font-size:21px;
    line-height:30px;
}

#cb-widget-intro-close:hover,
#cb-widget-intro-close:focus{
    background:#dfe4eb;
}

@keyframes cbIntroPulse{
    0%{
        box-shadow:0 12px 30px rgba(0,0,0,.20), 0 0 0 0 rgba(169,19,24,.4);
    }
    70%{
        box-shadow:0 12px 30px rgba(0,0,0,.20), 0 0 0 18px rgba(169,19,24,0);
    }
    100%{
        box-shadow:0 12px 30px rgba(0,0,0,.20), 0 0 0 0 rgba(169,19,24,0);
    }
}

@media(max-width:768px){
    #cb-widget-intro{
        right:0;
        bottom:118px;
        width:320px;
        max-width:calc(100vw - 40px);
    }

    #cb-widget-intro::after{
        right:36px;
        bottom:-9px;
        border-bottom:1px solid rgba(26,37,67,.12);
        border-right:1px solid rgba(26,37,67,.12);
        border-top:0;
    }
}

@media(max-width:480px){
    #cb-widget-intro{
        bottom:108px;
        max-width:calc(100vw - 30px);
        padding:18px 44px 18px 18px;
    }
}

@media(prefers-reduced-motion:reduce){
    #cb-widget-toggle img,
    #cb-widget.cb-intro-active #cb-widget-toggle img,
    #cb-widget-panel{
        animation:none;
    }

    #cb-widget-intro,
    #cb-widget-intro-action{
        transition:none;
    }
}
