/* =========================================================
   I-CHIMES ADMISSIONS CHATBOT
========================================================= */

.ichimes-chatbot {

    position: fixed;

    right: 22px;

    bottom: 22px;

    z-index: 999999;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* =========================================================
   FLOATING BUTTON
========================================================= */

.ichimes-chatbot-toggle {

    border: 0;

    background: #D71920;

    color: #fff;

    height: 58px;

    min-width: 58px;

    padding: 0 20px;

    border-radius: 30px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(0,0,0,.35);

    font-size: 15px;

    font-weight: 700;

    transition:
        transform .2s ease,
        box-shadow .2s ease;

}


.ichimes-chatbot-toggle:hover {

    transform: translateY(-2px);

    box-shadow:
        0 14px 35px rgba(0,0,0,.45);

}


.chatbot-icon {

    font-size: 22px;

}


.chatbot-toggle-text {

    white-space: nowrap;

}


/* =========================================================
   CHAT WINDOW
========================================================= */

.ichimes-chatbot-window {

    position: absolute;

    right: 0;

    bottom: 72px;

    width: 390px;

    max-width: calc(100vw - 30px);

    height: 610px;

    max-height: calc(100vh - 110px);

    background: #101010;

    border:
        1px solid rgba(255,255,255,.12);

    border-radius: 18px;

    overflow: hidden;

    display: flex;

    flex-direction: column;

    box-shadow:
        0 25px 70px rgba(0,0,0,.55);

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(15px)
        scale(.98);

    transform-origin: bottom right;

    transition:
        opacity .2s ease,
        visibility .2s ease,
        transform .2s ease;

}


.ichimes-chatbot-window.open {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0)
        scale(1);

}


/* =========================================================
   HEADER
========================================================= */

.ichimes-chatbot-header {

    background: #050505;

    border-bottom:
        1px solid rgba(255,255,255,.1);

    padding: 17px 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.chatbot-header-brand {

    display: flex;

    align-items: center;

    gap: 11px;

}


.chatbot-avatar {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    background: #D71920;

    color: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-weight: 800;

    font-size: 14px;

}


.chatbot-header-brand strong {

    display: block;

    color: #fff;

    font-size: 15px;

}


.chatbot-header-brand span {

    display: block;

    color: #aaa;

    font-size: 11px;

    margin-top: 3px;

}


.chatbot-close {

    border: 0;

    background: transparent;

    color: #aaa;

    font-size: 29px;

    line-height: 1;

    cursor: pointer;

}


.chatbot-close:hover {

    color: #fff;

}


/* =========================================================
   MESSAGES
========================================================= */

.ichimes-chatbot-messages {

    flex: 1;

    overflow-y: auto;

    padding: 18px;

    scroll-behavior: smooth;

}


.chatbot-message {

    display: flex;

    margin-bottom: 13px;

}


.chatbot-message.bot {

    justify-content: flex-start;

}


.chatbot-message.user {

    justify-content: flex-end;

}


.chatbot-message-bubble {

    max-width: 88%;

    padding: 12px 14px;

    border-radius: 14px;

    font-size: 14px;

    line-height: 1.55;

    white-space: pre-wrap;

}


.chatbot-message.bot
.chatbot-message-bubble {

    background: #1b1b1b;

    color: #f1f1f1;

    border:
        1px solid rgba(255,255,255,.08);

    border-bottom-left-radius: 4px;

}


.chatbot-message.user
.chatbot-message-bubble {

    background: #D71920;

    color: #fff;

    border-bottom-right-radius: 4px;

}


/* =========================================================
   QUICK OPTIONS
========================================================= */

.chatbot-options {

    display: flex;

    flex-direction: column;

    gap: 8px;

    margin-top: 4px;

    margin-bottom: 12px;

}


.chatbot-option {

    width: 100%;

    text-align: left;

    background: #151515;

    border:
        1px solid rgba(255,255,255,.12);

    color: #fff;

    border-radius: 10px;

    padding: 11px 13px;

    cursor: pointer;

    font-size: 13px;

    font-weight: 600;

    transition:
        background .2s ease,
        border-color .2s ease;

}


.chatbot-option:hover {

    background: #202020;

    border-color: #D71920;

}


.chatbot-option-whatsapp {

    border-color: #D71920;

}


/* =========================================================
   TYPING
========================================================= */

.chatbot-typing {

    padding:
        0 18px 10px;

    color: #aaa;

    font-size: 11px;

}


.chatbot-typing span {

    display: inline-block;

    width: 5px;

    height: 5px;

    margin-right: 3px;

    background: #D71920;

    border-radius: 50%;

    animation:
        chatbotBounce 1.1s infinite;

}


.chatbot-typing span:nth-child(2) {

    animation-delay: .15s;

}


.chatbot-typing span:nth-child(3) {

    animation-delay: .3s;

}


@keyframes chatbotBounce {

    0%,
    60%,
    100% {

        transform: translateY(0);

    }

    30% {

        transform: translateY(-4px);

    }

}


.chatbot-typing em {

    margin-left: 5px;

    font-style: normal;

}


/* =========================================================
   INPUT
========================================================= */

.ichimes-chatbot-form {

    display: flex;

    gap: 8px;

    padding: 12px;

    background: #080808;

    border-top:
        1px solid rgba(255,255,255,.1);

}


.ichimes-chatbot-form input {

    flex: 1;

    min-width: 0;

    border:
        1px solid rgba(255,255,255,.13);

    background: #171717;

    color: #fff;

    border-radius: 11px;

    padding:
        11px 12px;

    outline: none;

    font-size: 13px;

}


.ichimes-chatbot-form input:focus {

    border-color: #D71920;

}


.ichimes-chatbot-form button {

    width: 44px;

    border: 0;

    border-radius: 11px;

    background: #D71920;

    color: #fff;

    font-size: 19px;

    cursor: pointer;

}


/* =========================================================
   FOOTER NOTE
========================================================= */

.chatbot-footer-note {

    background: #080808;

    color: #777;

    text-align: center;

    font-size: 9px;

    padding:
        0 10px 9px;

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .ichimes-chatbot {

        right: 12px;

        bottom: 14px;

    }


    .ichimes-chatbot-toggle {

        height: 50px;

        min-width: 50px;

        width: 50px;

        padding: 0;

        border-radius: 50%;

    }


    .chatbot-toggle-text {

        display: none;

    }


    .chatbot-icon {

        font-size: 21px;

    }


    .ichimes-chatbot-window {

        right: -2px;

        bottom: 61px;

        width:
            calc(100vw - 24px);

        max-width: none;

        height:
            min(650px, calc(100vh - 90px));

        border-radius: 16px;

    }

}