﻿/*========================================================================================================================================================*/
/*ALL SCREEN RESOLUTIONS (DEFAULT LAYOUT)*/
/*========================================================================================================================================================*/

/* Chatbot Icon */
#chatbot-icon {
    position: fixed;
    bottom: 20px;
    right: 5%;
    color: white;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 500;
    animation: hithere 1s linear infinite alternate;
}

    #chatbot-icon i {
        font-size: 24px;
    }

    #chatbot-icon img {
        width: 64px;
        height: 64px;
        filter: drop-shadow(0px 0px 20px #fc4444);
    }

#chatbot-container {
    position: fixed;
    right: 8%;
    width: 400px;
    margin: 0 auto;
    background: #f4f4f4;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 5px 5px 10px 2px #333;
    font-size: small;
    z-index: 700;
    overflow: hidden;
    transition: bottom 0.5s ease;
}

.chat-box {
    height: 300px;
    overflow-y: scroll;
    scroll-behavior: smooth;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
}

    .chat-box button {
        margin: 2px;
        border-radius: 5px;
    }

.chatbot-container-hidden {
    bottom: -400px; /* Slide out */
}

.chatbot-container-visible {
    bottom: 20px; /* Slide in to the visible position */
}

.chat-options {
    display: flex;
    flex-direction: column;
}

.chat-option {
    width: none;
}

    .chat-option:hover {
        transition: ease 1s;
        color: white;
        background-color: #da2626;
    }

.user-input {
    display: flex;
}

    .user-input input {
        flex: 1;
        padding: 10px;
    }

    .user-input button {
        padding: 10px;
        border-radius: 5px;
        margin-left: 5px;
    }

        .user-input button:hover {
            background-color: #da2626;
            border: none;
            transition: ease 1s;
            color: white;
        }

.chat-message {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 10px 0;
    box-sizing: border-box;
}


    .chat-message:hover {
        filter: drop-shadow(0px 0px 4px green);
        transition: ease .5s;
    }

.innermessage {
    word-wrap: break-word;
}

.bot-message {
    background-color: #ffc16b;
    padding: 10px;
    border-radius: 5px 5px 5px 0px;
    width: 90%;
    align-items: start;
    border: solid;
    border-width: 1px;
}

.user-message {
    background-color: #d1e7dd;
    padding: 10px;
    border-radius: 5px 5px 0px 5px;
    max-width: 80%;
    margin-left: auto;
    border: solid;
    border-width: 1px;
}

.chat-icon {
    width: 64px;
    height: 64px;
    margin-top: 5px;
    margin-right: 10px;
}


.typing-indicator {
    display: inline-block;
    margin-top: 10px;
    margin-bottom: 10px;
}

    .typing-indicator span {
        display: inline-block;
        width: 8px;
        height: 8px;
        margin: 0 2px;
        background-color: #333;
        border-radius: 50%;
        animation: typing 1s infinite;
    }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes typing {
    0% {
        transform: translateY(0);
        opacity: 0.2;
    }

    50% {
        transform: translateY(-8px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 0.2;
    }
}

.chatclosebutton {
    display: flex;
    justify-content: end;
}


#close-chatbot {
    font-size: smaller;
    background-color: #ff4d4d;
    color: white;
    border: none;
    margin: 2px;
    cursor: pointer;
}

    #close-chatbot:hover {
        background-color: black;
        transition: ease-in-out 1s;
        color: #ff4d4d;
    }


@keyframes MoveUpDown {
    0%, 100% {
        bottom: 20px;
    }

    50% {
        bottom: 30px;
    }
}

@keyframes hithere {
    30% {
        transform: scale(1.2);
    }

    40%, 60% {
        transform: rotate(-20deg) scale(1.2);
    }

    50% {
        transform: rotate(20deg) scale(1.2);
    }

    70% {
        transform: rotate(0deg) scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}


/*========================================================================================================================================================*/
/*LARGER SCREENS LANDSCAPE*/
/*========================================================================================================================================================*/

@media only screen and (max-width: 1920px) {
    #chatbot-icon {
        bottom: 50px;
        right: 20%;
    }

    #chatbot-container {
        right: 18%;
        margin: 0 auto;
    }
}

/*========================================================================================================================================================*/
/*BETWEEN LARGE & MEDIUM SCREENS LANDSCAPE*/
/*========================================================================================================================================================*/

@media only screen and (max-width: 1600px) {
    #chatbot-icon {
        bottom: 20px;
        right: 12%;
    }

    #chatbot-container {
        right: 18%;
        margin: 0 auto;
    }
}

/*========================================================================================================================================================*/
/*MEDIUM SCREENS LANDSCAPE*/
/*========================================================================================================================================================*/

@media only screen and (max-width: 1366px) {
    #chatbot-icon {
        bottom: 10px;
        right: 4%;
    }

    #chatbot-container {
        position: fixed;
        right: 4%;
        width: 400px;
        margin: 0 auto;
        background: #f4f4f4;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 5px 5px 10px 2px #333;
        font-size: small;
        z-index: 700;
        overflow: hidden;
        transition: bottom 0.5s ease;
    }
}

/*========================================================================================================================================================*/
/*TABLET AND LANDSCAPE*/
/*========================================================================================================================================================*/
@media only screen and (max-width: 1280px) {
    #chatbot-icon {
        bottom: 10px;
        right: 1%;
    }

}

/*========================================================================================================================================================*/
/*iPAD AND LANDSCAPE*/
/*========================================================================================================================================================*/

@media only screen and (max-width: 1180px) {
}


/*========================================================================================================================================================*/
/*iPAD AND PORTRAIT*/
/*========================================================================================================================================================*/

@media only screen and (max-width: 820px) {
    #chatbot-icon {
        bottom: 100px;
        right: 7%;
    }
}
/*========================================================================================================================================================*/
/*TABLET AND PORTRAIT*/
/*========================================================================================================================================================*/

@media only screen and (max-width: 800px) {
    #chatbot-icon {
        bottom: 50px;
        right: 5%;
    }

    #chatbot-container {
        left: 50%; /* Start positioning from the center of the page */
        transform: translateX(-50%); /*Move the navbar back to be centered */
        /*right: 2%;*/
        width: 350px;
    }
}
/*========================================================================================================================================================*/
/*PHONE AND PORTRAIT*/
/*========================================================================================================================================================*/

@media only screen and (max-width: 480px) {
    #chatbot-icon {
        bottom: 10px;
        right: 7%;
    }

    #chatbot-container {
        left: 50%; /* Start positioning from the center of the page */
        transform: translateX(-50%); /*Move the navbar back to be centered */
        /*right: 2%;*/
        width: 350px;
    }
}
