:root {
    --primary-background-colour: #fff; /* #2f3039 */
    --secondary-background-color: #f7f7f7; /* rgb(60, 63, 65) */
    --primary-text-color: #555555; /* #fff */

}

body {
    margin: 0;
    padding: 0;
    background: var(--primary-background-colour);
    font-family: 'Montserrat', 'Roboto', sans-serif;
    color: var(--primary-text-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100vh;
    position: relative;
    overflow-y: scroll;
    overflow-x: hidden;
}

#header {
    width: 100%;
    padding: 20vh 20px 0 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#header img {
    width: 50px;
}

#main-heading {
    font-size: 3em;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    margin: 0.4em;
}

.label {
    color: #7d7d7d;
    font-size: 0.9em;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
    padding: 10px 0 20px 0;
}

#configure-custom-bot-section {
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    max-width: 40%;
}

#configure-custom-bot-section form {
    display: flex;
    flex-wrap: wrap;
    /* flex-direction: column; */
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 0 0 50px 0;
}

.custom-bot-checkbox {
    outline: 2px solid #555555;
    margin: 0.5em;
    padding: 0.4em 1em;
    border-radius: 50px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.custom-bot-checkbox:hover {
    background: #e9e9e9;
}

.custom-bot-checkbox.checked {
    background: #cae6ff;
    outline: 2px solid #65b7ff;
}

.custom-bot-checkbox input {
    display: none;
}

#chat-window {
    width: 50vw;
    margin: 0 0 auto 0;
    padding-bottom: 30px;
}

#chat-window::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.message {
    word-wrap: break-word;
    color: var(--comp-clr);
    font-size: 1em;
    margin: 0.5rem 0.3rem;
    padding: 15px 20px;
    border-radius: 14px;
    border: none;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 2px 3px 0px;
    outline: none;
    transition: box-shadow 0.2s;
    width: fit-content;
    max-width: 75%;
    align-self: flex-end;
    position: relative;
}

.user-message {
    background: rgb(244, 250, 255);
    margin: 30px 0 10px auto;
    border-top-right-radius: 5px;
}

.bot-message {
    background: var(--secondary-background-color);
    margin: 20px 0 10px 0;
    border-top-left-radius: 5px;
}

.message-label {
    position: absolute;
    top: -27px;
    font-size: 0.8em;
    opacity: 1;
}

.user-message-label {
    right: 3px;
}

.bot-message-label {
    left: 3px;
}

.message-label-fade {
    opacity: 1;
    animation: opacity 0.3s ease-out forwards; 
}

@keyframes opacity {
    0% {
        opacity: a;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
    }
}

.message-continuation {
    margin-top: -5px;
    border-radius: 20px;
}

#actions {
    position: sticky;
    bottom: 0;
    padding-bottom: 35px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    background: var(--primary-background-colour);
    box-shadow: 0 -30px 20px 0px var(--primary-background-colour);
}

#chatbot-typing-indicator {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    padding: 3px;
    overflow-y: scroll;
    align-self: flex-start;
    position: absolute;
    top: -30px;
    left: 25vw;
    overflow: hidden;
}

#chatbot-typing-indicator p {
    font-size: 0.8em;
    color: #141414;
    font-weight: bolder;
    margin: 0;
    padding: 0;
    margin-right: 1px;
}

.chatbot-typing-indicator-hidden {
    display: none !important;
}

#chatbot-typing-indicator .dot {
    width: 2px;
    height: 2px;
    background-color: #141414;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.2s infinite;
}

#chatbot-typing-indicator .dot:nth-child(2) {
    animation-delay: 0s;
}

#chatbot-typing-indicator .dot:nth-child(3) {
    animation-delay: 0.25s;
}

#chatbot-typing-indicator .dot:nth-child(4) {
    animation-delay: 0.5s;
}

@keyframes typing {
    0% {
    transform: translateY(0);
    }
    50% {
    transform: translateY(-2px);
    }
    100% {
    transform: translateY(0);
    }
}
  

#chatbot-input {
    width: 50vw;
    margin: 0;
    position: relative;
    top: -10px;
}

#chatbot-input #input {
    width: 100%;
    max-height: 200px;
    min-height: 3em;
    /* border: rgb(221, 228, 235) 1px solid; */
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 2px 3px 0px;
    border-radius: 14px;
    padding: 1em 3em 1.1em 1.5em;
    margin: 0;
    font-size: 1em;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    color: var(--primary-text-color);
    outline: none;
    box-sizing: border-box;
    background-color: var(--secondary-background-color);
    transition: all 0.2s ease-in-out;
    resize: vertical;
    overflow-y: scroll;
    overflow-x: hidden;
    cursor: text;
    word-break: wrap-all;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#chatbot-input #input::-webkit-scrollbar {
    display: none;
}
/* 
#chatbot-input #input:focus {
    box-shadow: 0px 3px 3px 0px rgb(207, 214, 221);
} */

#chatbot-input #input::after {
    content: "Ask anything...";
    color: #74787c;
    position: absolute;
    top: calc(50% - 0.55em);
}

#chatbot-input #input.after-hidden::after {
    display: none;
}

#chatbot-send-button {
    position: absolute;
    right: 1em;
    bottom: calc(50% - 15px);
    cursor: pointer;
}

#chatbot-input button {
    position: absolute;
    height: 30px;
    top: calc(50% - 15px);
    right: 10px;
    background: rgb(207, 214, 221);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    color: rgb(84, 88, 92);
    width: 13%;
}

#chatbot-selector {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    margin: 20px 0 50px 0;
}

#chatbot-selector select {
    background-color: var(--secondary-background-color);
    padding: 0.5em;
    cursor: pointer;
    border: rgb(207, 214, 221) 1px solid;
    border-radius: 5px;
    transition: all 0.2s ease-in-out;
}

#chatbot-selector select:focus {
    outline: none;
}

@media screen and (max-width: 768px) {

    #configure-custom-bot-section {
        max-width: 100%;
        padding: 0 20px;
    }

    #chat-window {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    .message {
        font-size: 1.1em;
    }

    .message-label {
        top: -30px;
    }

    #actions {
        padding: 0 20px 8px 20px;
        box-sizing: border-box;
        bottom: 0;
    }

    #chatbot-typing-indicator {
        left: 20px;
        top: -40px;
    }

    #chatbot-typing-indicator p {
        font-size: 1em;
    }

    #chatbot-input {
        width: 100%;
    }

    #chatbot-input #input {
        font-size: 1em;
    }
}