/* =========================================================
   VCAMPUS CHATBOT
========================================================= */

.vc-chatbot {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 2147483000;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}


/* =========================================================
   FLOATING BUTTON
========================================================= */

.vc-chatbot-toggle {
    position: relative;

    width: 68px;
    height: 68px;

    border: 0;
    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #2385ff 0%,
            #1769e8 45%,
            #092b66 100%
        );

    color: #fff;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 12px 30px rgba(23, 105, 232, .35),
        0 5px 15px rgba(9, 43, 102, .25);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}


/* Hover */

.vc-chatbot-toggle:hover {
    transform: translateY(-5px) scale(1.05);

    box-shadow:
        0 18px 40px rgba(23, 105, 232, .42),
        0 8px 20px rgba(9, 43, 102, .25);
}


/* =========================================================
   CHAT ICON
========================================================= */

.vc-chatbot-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    background: rgba(255,255,255,.15);

    border-radius: 50%;
}


.vc-chat-icon-bubble {
    font-size: 25px;

    line-height: 1;

    filter:
        drop-shadow(
            0 2px 4px rgba(0,0,0,.18)
        );
}


/* Notification dot */

.vc-chat-icon-dot {
    position: absolute;

    top: 1px;
    right: 0;

    width: 10px;
    height: 10px;

    background: #55e878;

    border: 2px solid #1769e8;

    border-radius: 50%;
}


/* Close */

.vc-chatbot-close {
    display: none;

    font-size: 34px;

    line-height: 1;

    font-weight: 300;
}


/* =========================================================
   PULSE
========================================================= */

.vc-chatbot-pulse {
    position: absolute;

    inset: 0;

    border-radius: 50%;

    border: 2px solid rgba(35,133,255,.55);

    animation: vcChatPulse 2.2s infinite;

    pointer-events: none;
}


@keyframes vcChatPulse {

    0% {
        transform: scale(1);
        opacity: .8;
    }

    70% {
        transform: scale(1.35);
        opacity: 0;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }

}


/* =========================================================
   CHAT WITH US LABEL
========================================================= */

.vc-chatbot-label {
    position: absolute;

    right: 78px;
    bottom: 12px;

    white-space: nowrap;

    background: #fff;

    color: #17345f;

    padding: 9px 14px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;

    box-shadow:
        0 8px 25px rgba(8,36,80,.16);

    border: 1px solid #e8eef7;

    opacity: 0;
    transform: translateX(8px);

    pointer-events: none;

    transition: .25s ease;
}


.vc-chatbot:hover .vc-chatbot-label {
    opacity: 1;
    transform: translateX(0);
}


.vc-chatbot-label span {
    margin-right: 4px;
}


/* =========================================================
   OPEN STATE
========================================================= */

.vc-chatbot.open .vc-chatbot-icon {
    display: none;
}


.vc-chatbot.open .vc-chatbot-close {
    display: block;
}


.vc-chatbot.open .vc-chatbot-label {
    display: none;
}


/* =========================================================
   CHAT WINDOW
========================================================= */

.vc-chatbot-window {
    position: absolute;

    right: 0;
    bottom: 82px;

    width: 380px;
    height: 590px;

    background: #fff;

    border-radius: 24px;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    box-shadow:
        0 30px 80px rgba(8,36,80,.25);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(20px)
        scale(.96);

    transform-origin: bottom right;

    transition:
        opacity .3s ease,
        transform .3s ease,
        visibility .3s ease;
}


.vc-chatbot.open .vc-chatbot-window {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}


/* =========================================================
   HEADER
========================================================= */

.vc-chatbot-header {
    padding: 18px;

    background:
        linear-gradient(
            135deg,
            #2385ff,
            #1769e8 50%,
            #092b66
        );

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


.vc-chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}


.vc-chatbot-avatar {
    position: relative;

    width: 46px;
    height: 46px;

    background: rgba(255,255,255,.16);

    border: 1px solid rgba(255,255,255,.25);

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 23px;
}


.vc-avatar-status {
    position: absolute;

    right: -2px;
    bottom: -2px;

    width: 11px;
    height: 11px;

    background: #55e878;

    border: 2px solid #1769e8;

    border-radius: 50%;
}


.vc-chatbot-header h3 {
    margin: 0 0 4px;

    font-size: 18px;

    font-weight: 700;

    color: #fff;
}


.vc-chatbot-status {
    font-size: 11px;

    opacity: .92;
}


.vc-chatbot-status i {
    display: inline-block;

    width: 7px;
    height: 7px;

    margin-right: 4px;

    border-radius: 50%;

    background: #55e878;
}


.vc-chatbot-minimize {
    width: 36px;
    height: 36px;

    border: 0;

    background: rgba(255,255,255,.12);

    color: #fff;

    border-radius: 10px;

    font-size: 24px;

    cursor: pointer;
}


/* =========================================================
   MESSAGES
========================================================= */

.vc-chatbot-messages {
    flex: 1;

    padding: 18px;

    overflow-y: auto;

    background:
        linear-gradient(
            180deg,
            #f7faff,
            #f3f7fd
        );
}


.vc-chatbot-messages::-webkit-scrollbar {
    width: 5px;
}


.vc-chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd8ec;

    border-radius: 20px;
}


.vc-chat-message {
    display: flex;

    gap: 9px;

    margin-bottom: 16px;
}


.vc-message-avatar {
    flex-shrink: 0;

    width: 31px;
    height: 31px;

    border-radius: 10px;

    background: #e8f1ff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
}


.vc-message-content {
    max-width: 82%;
}


.vc-message-bubble {
    background: #fff;

    padding: 12px 14px;

    border-radius: 4px 15px 15px 15px;

    color: #17345f;

    font-size: 13px;

    line-height: 1.55;

    box-shadow:
        0 3px 12px rgba(20,70,130,.07);
}


.vc-message-time {
    display: block;

    margin-top: 5px;
    margin-left: 4px;

    color: #8b9ab0;

    font-size: 9px;
}


/* =========================================================
   USER
========================================================= */

.vc-user-message {
    justify-content: flex-end;
}


.vc-user-message .vc-message-content {
    max-width: 78%;
}


.vc-user-message .vc-message-bubble {
    background: #1769e8;

    color: #fff;

    border-radius:
        15px 4px 15px 15px;
}


.vc-user-message .vc-message-time {
    text-align: right;

    margin-right: 4px;
}


/* =========================================================
   QUICK OPTIONS
========================================================= */

.vc-chatbot-quick-options {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 5px;
    margin-left: 40px;
}


.vc-chatbot-quick-options button {
    border: 1px solid #d7e4f7;

    background: #fff;

    color: #1769e8;

    padding: 8px 11px;

    border-radius: 999px;

    font-size: 11px;

    font-weight: 600;

    cursor: pointer;

    transition: .2s ease;
}


.vc-chatbot-quick-options button:hover {
    background: #1769e8;

    color: #fff;

    border-color: #1769e8;

    transform: translateY(-1px);
}


/* =========================================================
   TYPING
========================================================= */

.vc-chatbot-typing {
    display: none;

    padding: 0 18px 8px 58px;

    background: #f7faff;
}


.vc-chatbot-typing span {
    display: inline-block;

    width: 6px;
    height: 6px;

    margin-right: 4px;

    background: #8ba3c4;

    border-radius: 50%;

    animation: vcTyping 1.2s infinite;
}


.vc-chatbot-typing span:nth-child(2) {
    animation-delay: .15s;
}


.vc-chatbot-typing span:nth-child(3) {
    animation-delay: .3s;
}


@keyframes vcTyping {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: .5;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }

}


/* =========================================================
   INPUT
========================================================= */

.vc-chatbot-input-area {
    display: flex;

    align-items: center;

    gap: 8px;

    padding: 12px;

    background: #fff;

    border-top: 1px solid #edf1f7;
}


.vc-chatbot-input-area input {
    flex: 1;

    height: 43px;

    border: 1px solid #dce6f3;

    border-radius: 12px;

    padding: 0 13px;

    outline: none;

    color: #17345f;

    font-size: 12px;

    background: #f8fbff;
}


.vc-chatbot-input-area input:focus {
    border-color: #1769e8;

    background: #fff;

    box-shadow:
        0 0 0 3px rgba(23,105,232,.08);
}


.vc-chatbot-input-area button {
    width: 43px;
    height: 43px;

    border: none;

    border-radius: 12px;

    background: #1769e8;

    color: #fff;

    font-size: 18px;

    cursor: pointer;

    transition: .2s ease;
}


.vc-chatbot-input-area button:hover {
    background: #092b66;

    transform: scale(1.04);
}


/* =========================================================
   FOOTER
========================================================= */

.vc-chatbot-footer {
    padding: 7px;

    text-align: center;

    background: #fff;

    border-top: 1px solid #edf1f7;

    color: #9aa8bb;

    font-size: 9px;
}


.vc-chatbot-footer strong {
    color: #1769e8;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .vc-chatbot {
        right: 15px;
        bottom: 15px;
    }


    .vc-chatbot-window {
        right: 0;

        bottom: 72px;

        width:
            calc(100vw - 30px);

        max-width: 380px;

        height:
            min(
                590px,
                calc(100vh - 105px)
            );
    }


    .vc-chatbot-toggle {
        width: 58px;
        height: 58px;
    }


    .vc-chatbot-label {
        display: none;
    }

}
