.scopic-chat-splash-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.scopic-chat-room-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99999;
}
.scopic-chat-room-widget * {
    box-sizing: border-box;
}
.scopic-chat-room-widget .scopic-chat-splash, .scopic-chat-room-widget .scopic-chat-room {
    width: 420px;
    height: 480px;
    border-radius: 34px;
    background: #FFF;
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: absolute;
    z-index: 20;
    right: 91px;
    bottom: 20px;
}
.scopic-chat-room-widget .scopic-chat-room {
    align-items: flex-start;
    overflow: hidden;
    flex-flow: column;
    justify-content: space-between;
}
.scopic-chat-room-widget .scopic-chat-splash h4 {
    color: #001F3E;
    font-size: 36px;
    font-weight: 700;
    line-height: normal;
    margin: 8px 0 0 0;
}
.scopic-chat-room-widget .scopic-chat-splash p {
    color: #393939;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    margin: 10px 0 0 0;
}
.scopic-chat-room-widget .scopic-chat-splash .open-chat-btn {
    padding: 17px 60px;
    border-radius: 30px;
    background: #007AFF;
    text-decoration: none;
    color: #FFF;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
   /* 125% */
    display: inline-block;
    margin: 40px 0 0 0;
}
.scopic-chat-room-widget button.open-chat-btn {
    background: no-repeat;
    border: none;
    padding: 0;
    outline: 0;
    cursor: pointer;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 30px;
    background: #FFF;
    box-shadow: 0px 4px 20px 0px rgba(0, 31, 62, 0.06);
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-head h6 {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #007AFF;
    font-size: 16px;
    font-weight: 600;
    line-height: 120%;
   /* 19.2px */
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-head h6 img {
    width: 35px;
    height: 35px;
    object-fit: cover;
}
.scopic-chat-room-widget .scopic-chat-room-head .close-chat-icon {
    width: 20px;
    height: 25px;
    border: none;
    background: transparent;
    outline: 0;
    position: relative;
    padding: 0;
    cursor: pointer;
}
.scopic-chat-room-widget .scopic-chat-room-head .close-chat-icon:before, .scopic-chat-room-widget .scopic-chat-room-head .close-chat-icon:after {
    content: "";
    width: 1px;
    height: 19px;
    background: #001F3E;
    position: absolute;
    transform: rotate(45deg);
    top: 4px;
    left: 10px;
}
.scopic-chat-room-widget .scopic-chat-room-head .close-chat-icon:after {
    transform: rotate(-45deg);
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-foot {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 16px;
    gap: 10px;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-foot input[type="text"] {
    width: 100%;
    border: none;
    border-radius: 30px;
    background: #EDF2F9;
    height: 50px;
    padding: 10px 25px;
    color: #3a3b3e;
    font-size: 16px;
    font-weight: 400;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-foot .send-btn {
    border: none;
    background: transparent;
    padding: 0;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body {
    flex-grow: 1;
    width: 100%;
    display: flex;
    flex-flow: column;
    justify-content: end;
    overflow: hidden;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll {
    overflow: auto;
    padding: 16px;
    display: flex;
    flex-flow: column;
    gap: 27px;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper {
    position: relative;
    width: 100%;
    padding: 0 15px 0 0;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper i {
    position: absolute;
    width: 45px;
    height: 45px;
    right: 0;
    top: 0;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper i img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper .send-content {
    border-radius: 14px;
    background: var(--blue, #007AFF);
    box-shadow: 0px 0px 10px 0px rgba(0, 31, 62, 0.15);
    padding: 12px;
    text-align: left;
    max-width: 226px;
    margin-left: auto;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper .send-content p {
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 120%;
   /* 16.8px */
    margin: 0;
    word-break: break-word;
}

.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper.received {
    padding: 0 0 0 65px;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper.received i {
    right: auto;
    left: 0;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper.received .send-content {
    margin-left: 0;
    border-radius: 12px;
    background: #FFF;
    box-shadow: 0px 0px 10px 0px rgba(0, 31, 62, 0.15);
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper.received .send-content p {
    color: #393939;
    font-size: 14px;
    font-weight: 400;
    line-height: 160%;
}

.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper.received .send-content p a {
    color: #3da9f3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper.received .send-content p a:hover {
    color: #3da9f3;
    text-decoration: none;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper.received .send-content li {
    color: #393939;
    font-size: 14px;
    font-weight: 400;
    line-height: 160%;
}
.scopic-chat-room-widget .scopic-chat-splash .scopic-chat-room-head {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 30px;
    text-align: right;
}
.scopic-chat-room-widget .hidden{
    display: none !important;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper span {
    color: rgb(0 31 62 / 20%);
    font-size: 10px;
    font-weight: 600;
    text-align: right;
    display: block;
    margin: 6px 4px 0 0;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper.received span {
    text-align: left;
}
.scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .send-msg-wrapper li::marker{
    content: none !important;
}
.scopic-chat-room-widget .scopic-chat-splash i{
    margin-left:30px;
    margin-right:30px;
    display:block;
    font-size:14px;
    line-height: 20px;
    margin-top: 20px;
}
.scopic-chat-splash-inner p {
    padding: 0 30px;
    font-size: 16px !important;
}

.scopic-session-closed-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: 0 40px;
}

.scopic-session-closed-content img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.scopic-session-closed-content h4 {
    color: #001F3E;
    font-size: 28px;
    font-weight: 700;
    line-height: normal;
    margin: 0 0 15px 0;
}

.scopic-session-closed-content p {
    color: #393939;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.scopic-session-closed-content .refresh-message {
    color: #007AFF;
    font-weight: 600;
    margin-top: 20px;
}
/* ========== typing animation ========== */
.scopic-chat-room-widget .dots-cont {
    height: 25px;
}
.scopic-chat-room-widget .dot {
    width: 8px;
    height: 8px;
    background: #22303e;
    display: inline-block;
    border-radius: 50%;
    right: 0px;
    bottom: 0px;
    position: relative;
    animation: jump 1s infinite;
}
.scopic-chat-room-widget .dots-cont:hover > .scopic-chat-room-widget .dot {
    animation: none;
}
.scopic-chat-room-widget .dots-cont .dot-1 {
    -webkit-animation-delay: 100ms;
    animation-delay: 100ms;
}
.scopic-chat-room-widget .dots-cont .dot-2 {
    -webkit-animation-delay: 200ms;
    animation-delay: 200ms;
}
.scopic-chat-room-widget .dots-cont .dot-3 {
    -webkit-animation-delay: 300ms;
    animation-delay: 300ms;
}
@keyframes jump {
    0% {
        bottom: 0px;
    }
    20% {
        bottom: 5px;
    }
    40% {
        bottom: 0px;
    }
}
.bot-typing {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bot-typing i {
    height: 45px;
    width: 45px;
}

/* Bubble pop up */
.open-chat-btn-wrapper {
    position: relative;
}
.scopic-chat-room-widget .open-chat-btn-wrapper .alert-popup {
    width: 195px;
    position: absolute;
    background: #fff;
    padding: 18px 20px;
    box-sizing: border-box;
    right: 94px;
    z-index: 99;
    border-radius: 49px;
    bottom: 21px;
    box-shadow: 0 0 20px rgb(0 0 0 / 19%);
    cursor: pointer;
}
.scopic-chat-room-widget .open-chat-btn-wrapper .alert-popup p {
    margin: 0;
    color: #0d2a4a;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.scopic-chat-room-widget .open-chat-btn-wrapper .bubble-close-btn{
    position: absolute;
    top: 0;
    left: 0;
    width: 23px;
    height: 23px;
    cursor: pointer;
    padding: 0;
    border: none;
    background: none;
}

.scopic-chat-room-widget .open-chat-btn-wrapper .bubble-close-bg {
    fill: #93C6FD;
    transition: fill 0.2s ease;
}

.scopic-chat-room-widget .open-chat-btn-wrapper .bubble-close-btn:hover .bubble-close-bg {
    fill: #2C83E1;
}

/* ===== bubble animation ===== */
#scopic_chatbot_bubble.alert-popup{
    opacity: 0;
    transform: translateY(14px) scaleX(0.15) scaleY(0.85);
    transform-origin: 100% 50%;
    will-change: transform, opacity;
}
#scopic_chatbot_bubble.bubble-in{
    animation: scopic-bubble-in 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
#scopic_chatbot_bubble.bubble-out{
    animation: scopic-bubble-out 260ms cubic-bezier(0.4, 0.0, 1, 1) both;
}

@keyframes scopic-bubble-in{
    0%{
        opacity: 0;
        transform: translateY(14px) scaleX(0.15) scaleY(0.85);
    }
    55%{
        opacity: 1;
        transform: translateY(0px) scaleX(1.06) scaleY(1.02);
    }
    100%{
        opacity: 1;
        transform: translateY(0px) scaleX(1) scaleY(1);
    }
}

@keyframes scopic-bubble-out{
    0%{
        opacity: 1;
        transform: translateY(0px) scaleX(1) scaleY(1);
    }
    100%{
        opacity: 0;
        transform: translateY(20px) scaleX(0.85) scaleY(0.95);
    }
}

@media (prefers-reduced-motion: reduce){
    #scopic_chatbot_bubble.bubble-in,
    #scopic_chatbot_bubble.bubble-out{
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}



/* ======================================== */
@media all and (max-width: 667px) {
    .scopic-chat-room-widget .scopic-chat-splash, .scopic-chat-room-widget .scopic-chat-room {
        width: 335px;
    }
    .scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper.received .send-content p {
        font-size: 12px;
        line-height: 20px;
    }
}
@media all and (max-width: 470px) {
    .scopic-chat-room-widget button.open-chat-btn img {
        width: 80px;
    }
    .scopic-chat-room-widget {
        bottom: 5px;
        right: 5px;
    }
    .scopic-chat-room-widget .scopic-chat-splash, .scopic-chat-room-widget .scopic-chat-room {
        width: 295px;
        height: 430px;
        right: 80px;
        bottom: 20px;
    }
    .scopic-chat-room-widget .open-chat-btn-wrapper .alert-popup {
        padding: 15px 20px !important;
        right: 80px !important;
        border-radius: 49px;
        bottom: 18px !important;
    }
    .scopic-chat-room-widget .scopic-chat-room .scopic-chat-room-body .scopic-chat-room-scroll .send-msg-wrapper .send-content p {
        font-size: 12px;
        line-height: 18px;
    }
    .scopic-chat-room-widget .scopic-chat-splash h4 {
        font-size: 26px;
    }
    .scopic-chat-room-widget .scopic-chat-splash p {
        font-size: 12px !important;
    }
}
@media all and (max-width: 380px) {
    .scopic-chat-room-widget .scopic-chat-splash, .scopic-chat-room-widget .scopic-chat-room {
        width: 295px;
        height: 371px;
        right: 6px;
        bottom: 94px;
    }
    .scopic-chat-room-widget .scopic-chat-splash h4 {
        font-size: 20px;
        margin: 0;
    }
    .scopic-chat-room-widget .scopic-chat-splash .open-chat-btn {
        padding: 10px 40px;
        font-size: 14px;
        font-weight: 600;
        line-height: 20px;
        margin: 25px 0 0 0;
    }
}

#scopic_chatbot_icon{
    width: 85px;
    height: 85px;
}

#scopic_chatbot_icon svg #head{
    transform-box: fill-box;
    transform-origin: 50% 60%;
    will-change: transform;
    animation: head-tilt 5.6s cubic-bezier(0.4,0,0.2,1) infinite;
}

#scopic_chatbot_icon svg #left-eye,
#scopic_chatbot_icon svg #right-eye{
    transform-box: fill-box;
    transform-origin: center;
    will-change: transform;
    animation: eyes-seq 5.6s ease-in-out infinite;
}

@keyframes head-tilt{
    0%   { transform: rotate(-7deg) translateY(0px); }
    10%  { transform: rotate(-7deg) translateY(0px); }

    18%  { transform: rotate(0deg) translateY(-1px); }
    26%  { transform: rotate(0deg) translateY(0px); }

    72%  { transform: rotate(0deg) translateY(0px); }

    82%  { transform: rotate(6deg) translateY(-1px); }
    90%  { transform: rotate(0deg) translateY(0px); }

    100% { transform: rotate(-7deg) translateY(0px); }
}


@keyframes eyes-seq{
    0%, 12%   { transform: translateX(1px) scaleY(1); }
    16%       { transform: translateX(0px) scaleY(0.2); } /* blink */
    18%, 75%  { transform: translateX(0px) scaleY(1); }
    84%       { transform: translateX(-1px) scaleY(1); }
    92%, 100% { transform: translateX(1px) scaleY(1); }
}

#scopic_chatbot_icon svg #wave-hand{
    transform-box: fill-box;
    transform-origin: left center;
    will-change: transform, opacity;
    opacity: 0;
    transform: translateX(-6px) rotate(0deg);
    animation: hand-seq 5.6s ease-in-out infinite;
}

@keyframes hand-seq{
    0%   { opacity: 0; transform: translateX(-6px) rotate(0deg); }
    6%   { opacity: 1; transform: translateX(0px) rotate(0deg); }
    10%  { opacity: 1; transform: translateX(0px) rotate(14deg); }
    14%  { opacity: 1; transform: translateX(0px) rotate(-10deg); }
    18%  { opacity: 1; transform: translateX(0px) rotate(14deg); }
    22%  { opacity: 1; transform: translateX(0px) rotate(-5deg); }
    28%  { opacity: 0; transform: translateX(-6px) rotate(0deg); }
    100% { opacity: 0; transform: translateX(-6px) rotate(0deg); }
}

#scopic_chatbot_icon{
    position: relative;
    isolation: isolate;
}

#scopic_chatbot_icon svg{
    position: relative;
    z-index: 2;
}

#scopic_chatbot_icon::before{
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.35);
    filter: blur(8px);
    z-index: 1;
    opacity: 0;
    transform: scale(0.85);
    animation: aura-pulse-5s 5s ease-out infinite;
    pointer-events: none;
}

#scopic_chatbot_icon::after{
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.22);
    filter: blur(10px);
    z-index: 1;
    opacity: 0;
    transform: scale(0.85);
    animation: aura-pulse-5s 5s ease-out infinite;
    animation-delay: 0.25s;
    pointer-events: none;
}

@keyframes aura-pulse-5s{
    0%   { opacity: 0;   transform: scale(0.85); }
    6%   { opacity: 0.9; transform: scale(0.92); }
    18%  { opacity: 0.35; transform: scale(1.18); }
    26%  { opacity: 0;   transform: scale(1.35); }
    100% { opacity: 0;   transform: scale(1.35); }
}

@media all and (min-width: 668px) {

    .scopic-chat-room-widget .open-chat-btn-wrapper .alert-popup {
        width: 12vw;
        right: 7vw;
        bottom: 2vw;
    }
    .scopic-chat-room-widget .open-chat-btn-wrapper .alert-popup p{
        font-size: 1vw;
    }
    #scopic_chatbot_icon{
        width: 7vw;
        height: auto;
    }
    .scopic-chat-room-widget .scopic-chat-splash, .scopic-chat-room-widget .scopic-chat-room {
        right: 7vw;

    }
}
