/* Chat popup styling */
.chat-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9;
    width: 400px;
    background-color: #F0F0F0;
    border-radius: 15px;
    max-height: 704px;
    height: min(704px, 100% - 104px);
    box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 999999 !important;
}

div#chatbotHeader>div {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 1.1em;
}

div#chatbotHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

div#chatbotHeader img {
    width: 40px;
    border-radius: 10px;
}

.chat-header {
    position: relative;
    color: #000;
    padding: 20px 13px;
    text-align: center;
    /*background: linear-gradient(to right top, #0179a6, #009cb1, #29bda7, #8bd892, #e5eb86);*/
    background-color: #d4df38;
}

.messages-container {
    height: 70%;
    overflow-y: auto;
    padding: 0px 10px 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

a#toggle-text {
    background: #fff;
    padding: 8px;
    border-radius: 5px;
}

a#toggle-text:hover {
    cursor: pointer;
}

.user-input-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0px 14px 5px;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-top: -3px;
    flex-wrap: wrap;
    animation: fadeIn 250ms ease-in;
}

.buttons button {
    font-size: 1.2em;
    background: #D4DF38;
    color: #313131;
    border-bottom: 5px solid #BEC629 !important;
    border-color: transparent;
    border-radius: 5px;
    padding: 5px 14px;
    max-width: 174px;
}

button svg {
    /*fill: #313131 !important;*/
}

.user-input-controls>div:first-child {
    display: flex;
    gap: 10px;
}

.user-input-container {
    display: flex;
    padding: 10px 14px;
    gap: 10px;
    border-radius: 0 0 15px 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.3);
    position: relative;
}

.user-input-container input {
    flex-grow: 1;
    padding: 5px;
}

.user-input-container button {
    border-radius: 10px;
    border-color: transparent;
    border: 1px solid #fefefe;
    position: absolute;
    padding: 10px;
    right: 10px;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.user-input-container button:hover {
    cursor: pointer;
    background-color: #D4DF38;
    color: #fff;
    animation: fadeIn 500ms;
    border-color: #D4DF38;
}

.user-input-container button:hover svg {
    fill: #fff;
}

/* Button to open the chat form */
#openChatBtn {
    position: fixed;
    bottom: 23px;
    right: 28px;
    display: flex;
    align-items: center;
    z-index: 9;
    background: #26788D;
    border: 0px;
    animation: fadeIn 1s ease, bounce-2 2s ease 1s, ;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 50px;
    border-bottom: 5px solid #1e5e6e;
}

button#openChatBtn p {
    padding: 0 10px 0;
    font-size: 1.5em;
    color: #fff;
    font-weight: 400;
    margin: 10px 5px;
}

button#openChatBtn svg {
    margin: 0px 5px;
    fill: #fff;
}

#openChatBtn div {
    border-right: 2px solid #fff;
}

#openChatBtn:hover {
    cursor: pointer;
}

.close-button {
    background-color: rgba(0, 0, 0, 0.3);
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    border-radius: 5px;
    padding: 2px 8px;
}

.close-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

p,
button,
body {
    font-family: Helvetica;
}

.user-message {
    max-width: 250px;
    background: #242424;
    color: #fefefe;
    padding: 10px 14px;
    border-radius: 10px 5px 10px 5px;
    align-self: flex-end;
    animation: fadeIn 200ms ease-in;
}

.bot-message, .working-message {
    color: #fefefe;
    border-radius: 10px 5px;
    max-width: 90%;
    animation: fadeIn 200ms ease-in;
}

.bot-message span, .working-message span {
    background: #fff;
    padding: 10px 14px;
    border-radius: 10px 5px;
    color: #000;
}

div#chatbotHeader p {
    margin: 0px;
    text-align: left;
}

input#userInput {
    box-sizing: border-box;
    border-style: none;
    border-image: initial;
    background-color: var(--colors-white);
    box-shadow: none;
    transition: border-color 150ms ease 0s;
    resize: none;
    min-height: var(--sizes-md);
    margin: 0px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
    padding-right: 7px;
    border-radius: 10px;
    padding: 0 10px;
    outline: none;
    height: 40px;
    font-size: 1.2em;
    padding-right: 55px;
}

.intro-message {
    text-align: center;
    margin: 0 auto;
}

.intro-message img {
    width: 100%;
    margin: -15px auto auto;
}

.intro-message p {
    width: 90%;
    margin: -15px auto 0;
}

.bot-message img, .working-message img {
    width: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

@keyframes typing {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/*.typing-dot {
  animation: typing 1.5s infinite;
  display: inline-block;
  margin-left: 5px;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.5s;
}

.typing-dot:nth-child(3) {
  animation-delay: 1s;
}*/

.bot-message>div, .working-message>div {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
}

.typing-indicator {
    display: flex;
    justify-content: left;
    align-items: center;
}

.typing-dot {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background-color: black;
    margin: 0 2px;
    animation: typingAnimation 1.5s infinite;
}

@keyframes typingAnimation {

    0%,
    100% {
        box-shadow: 10px 0 0 black, 20px 0 0 black;
    }

    50% {
        box-shadow: 10px 0 0 white, 20px 0 0 black;
    }

    60% {
        box-shadow: 10px 0 0 black, 20px 0 0 white;
    }
}

button#voiceControl,
#micInput {
    background: #D4DF38;
    border: #313131;
    border-radius: 5px;
    padding: 5px;
}

button#voiceControl img {
    width: 24px;
    height: 25px;
    padding: 1px 0 0 0;
}

#micInput svg {
    width: 24px !important;
    height: 24px !important;
}

button#voiceControl:hover,
#micInput:hover {
    transform: scale(0.9);
    animation: none;
    cursor: pointer;
}

button#openChatBtn img,
#micInput svg {
    object-position: center;
    width: 100%;
    height: 100%;
}

#micInput svg {
    margin-top: 2px;
}

.popup-message {
    position: absolute;
    bottom: 120px;
    right: 27px;
    background-color: #e34704;
    border: 1px solid #e34704;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
}

.bounce-2 {
    animation-name: bounce-2;
    animation-timing-function: ease;
}

.popup-message {
    animation: fadeIn 1s ease,
        bounce-2 2s ease 1s,
        fadeOut 8s ease 4s forwards;
}

@keyframes bounce-2 {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-50px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

#toggle {
    display: none;
}

.buttons button:hover {
    cursor: pointer;
}

.typing-animation {
    border-right: 2px solid;
    white-space: nowrap;
    overflow: hidden;
    animation: typing 2s steps(40, end), blink .5s step-end infinite alternate;
    font-family: monospace;
    font-size: 1rem;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink {
    50% {
        border-color: transparent
    }
}

#pageUrl {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    border: 0px;
}

iframe#pageUrlIframe {
    
}