:root {
    --bubble-chat-container-color: #009DE0;
    --bubble-chat-secondary-color: rgb(41, 41, 41);
    --chat-container-color: white;
    --chat-secondary-color: #003A6C;
    --chat-own-message-color-opaque: #009DE0;
}

* {
    font-family: "Host Grotesk", sans-serif;
}

.chat-bubble {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    gap: 15px;

    right: 40px;
    bottom: 25px;
    /*You have to raise the z because otherwise there are some menus that stay on top when you open it.*/
    z-index: 999;


    width: 215px;
    height: 40px;
    border-radius: 15px;

    background-color: var(--bubble-chat-container-color);
    cursor: pointer;

    transition: width 0.5s ease, transform 0.3s ease;
    overflow: hidden;
}

.chat-bubble.shorter {
    width: 50px;
    justify-content: center;
}

.chat-bubble.shorter .inner-bubble h2 {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.chat-bubble:hover {
    transform: scale(1.05);
}

.chat-bubble.animated-bubble {
    animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.chat-bubble .welcome-message {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 220px;
    height: 65px;
    box-shadow: 0px 0px 15px var(--bubble-chat-secondary-color);
    background-color: var(--bubble-chat-container-color);

    position: absolute;
    top: -55px;
    left: -190px;
    border-radius: 15px;

    padding: 2px;
    transition: opacity .5s ease;
}

.chat-bubble .welcome-message p {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    color: white;
    text-align: start;
    font-size: .85rem;
    border-radius: 15px;
    padding: 5px 8px;
    margin-bottom: 0px;
}

.chat-bubble .welcome-message .close-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -7px;
    right: -7px; 
    background-color: var(--secondary-color);
    border-radius: 10px;
}

.chat-bubble .welcome-message .close-container svg {
    width: 18px;
    height: 18px;
}

.inner-bubble {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background-color: transparent;
    overflow: hidden;
}

.inner-bubble h2 {
    color: white;
    font-size: 1.15rem !important;
    margin: 0;
    font-family: "Host Grotesk", sans-serif;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    position: absolute;
    left: 15px;
}

.chat-bubble:not(.shorter) .inner-bubble h2 {
    transition-delay: 0.1s;
}

.inner-bubble img {
    width: 50px;
    height: 50px;
    transition: width 0.3s ease, height 0.3s ease;
    margin-left: auto;
}

.chat-container {
    box-sizing: border-box;
    display: flex;
    position: fixed;

    right: 40px;
    bottom: calc(25px + 50px);
    /*You have to raise the z because otherwise there are some menus that stay on top when you open it.*/
    z-index: 999;

    flex-direction: column;
    width: 400px;
    height: 600px;
    background-color: var(--chat-container-color);
    border-radius: 10px;

    transform: scale(0);
    transform-origin: calc(100% - 40px) bottom;
    transition: transform .5s ease;
}

.chat-container.show {
    box-sizing: border-box;
    transform: scale(1);
}

.chat-container .header {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    height: 75px;
    background-color: var(--chat-secondary-color);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;

    .avatar {
        display: flex;
        align-items: center;
        flex-direction: row;
        width: 100%;
        height: 100%;
        margin-left: 10px;
    }

    .avatar span {
        color: white;
        margin-left: 7.5px;
    }

    .avatar img {
        width: 40px;
        height: 40px;
    }
}

.chat-container .messages {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: calc(100% - 75px - 54px);
    padding: 10px;
    overflow: scroll;
      
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

.chat-container .messages .message.me {
    display: flex;
    justify-content: end;
    margin-left: auto;
    border-radius: 10px 1px 10px 10px;
    background-color: #009DE0;
}

.chat-container .messages .message.other {
    border-radius: 1px 10px 10px 10px;
    background-color: #EDEDED;
}

.chat-container .messages .message.other span p {
    color: black;
}

.chat-container .messages .message:not(& .message:first-of-type) {
    margin-top: 15px;
}

.chat-container .messages::-webkit-scrollbar {
    display: none;
}

.chat-container .messages .message {
    display: flex;
    align-items: start;
    width: fit-content;
    max-width: 70%;
    height: fit-content;
    text-wrap: wrap;
    padding: 7px 7px;
    background-color: var(--chat-secondary-color);
    border-top-left-radius: 2px;
}

.chat-container .messages span {
    width: 100%;
    text-align: left;
    display: inline-block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    word-break: keep-all;
    max-width: 100%;
    color: white;
}

.chat-container .messages span p {
    margin: 0;
}

.chat-container .messages span.typing {
    display: inline-block;
    color: white;
}

.chat-container .messages span.typing::after {
    content: "";
    margin-left: 5px;
    display: inline-block;
    animation: typingDots 1s infinite steps(3);
}

@keyframes typingDots {
    0% {
        content: "";
    }
    33% {
        content: ".";
    }
    66% {
        content: "..";
    }
    100% {
        content: "...";
    }
}

.chat-container .input-container {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    margin-top: auto;
    border-top: 2px solid #D9D9D9;
    padding-top: 2px;
    
    input {
        width: 100%;
        height: 40px;
        border-radius: 15px !important;
        padding: 5px 15px;
        background-color: transparent !important;
        border: transparent;
        color: black;
        font-family: "Host Grotesk", sans-serif !important;
    }

    input::placeholder {
        color: black;
        opacity: .5;
        font-family: "Host Grotesk", sans-serif;
    }

    input:focus {
        outline: none;
    }

    .icon-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        margin-left: 10px;
        margin-right: 10px;
        background-color: var(--chat-secondary-color);
        border-radius: 15px;

        svg {
            width: 30px;
            height: 30px;
            cursor: pointer;
            color: white;
        }

        img {
            width: 30px;
            height: 30px;
            cursor: pointer;
            color: white;
        }
    }    
}

.chat-container .input-container.disabled {
    opacity: .5;
}

@media (max-width: 600px) {
    .chat-container {
        width: 250px;
        height: 400px;
    }

    .chat-container .icon-wrapper {
        margin-left: 0px !important;
    }

    .chat-container .icon-wrapper img {
        width: 18px !important;
        height: 18px !important;
    }
}

@media (max-height: 800px) {
    .chat-container {
        height: 400px;
    }
    .chat-container .input-container input {
        font-size: 14px;
    }
    .chat-container .messages{
        font-size: 14px;
    }
}

.footer-text{ 
    text-align: center;
    text-decoration: none;
    mix-blend-mode: difference !important;
    color: white !important;
}
.footer-text a{
    font-weight: bold;
    text-decoration: none;
    mix-blend-mode: difference !important;
    color: white !important;
}

.chat-bubble-view {
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    right: 40px;
    bottom: 25px;
    /*You have to raise the z because otherwise there are some menus that stay on top when you open it.*/
    z-index: 999;


    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0px 0px 15px var(--bubble-chat-secondary-color);

    background-color: var(--bubble-chat-container-color);
    cursor: pointer;

    transition: transform ease;
}