/* Chatbot button */
#chatbot-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    height: 60px;
    width: 60px;
    transition: all 0.5s;
}

#chatbot-button .button {
    box-sizing: border-box;
    font-size: 1.5rem;
    text-align: center;
    line-height: 30px;
    transition: all 0.2s;
    width: 100%;
    height: 100%;
    color: white;
    border-radius: 50%;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    display: block;
    box-sizing: border-box;
}

#chatbot-button .button:active, #chatbot-button .button:hover {
    transform: scale(1.1);
}

/* Chat window */
#chat-window {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 400px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: calc(100% - 40px);
}

@media (min-width: 641px) {
    #chat-window {
        width: 400px;
        height: 520px;
    }

    #chatbot-button {
        right: 30px;
        bottom: 30px;
    }
}

/* Chat header */
#chat-header {
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 10px 10px 0 0;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
}

#chat-close {
    color: white;
    position: absolute;
    right: 15px;
    top: 10px;
}

/* Chat messages area */
#chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 10px;
    border-top: 1px solid #ccc;
    background: #f7f7f7;
    font-size: 1rem;
}

@media (min-width: 641px) {
    #chat-messages {
        height: 400px;
    }
}

@media (min-width: 1200px) {
    #chat-messages {
        font-size: 1.1rem;
    }
}

#chat-messages .bot {
    display: flex;
    gap: 10px;
}

#chat-messages .bot .fa-circle {
    display: inline-block;
    margin: 1px 1px;
    font-size: 0.6rem;
}

#chat-messages .user {
    text-align: right;
}

#chat-messages .bot .icon {
    width: 25px;
    height: 25px;
    display: inline-block;
    border-radius: 50px;
    margin-top: 17px;
    line-height: 26px;
    padding: 0 2px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

#chat-messages .bot .icon img {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: auto;
}

@media (min-width: 960px) {
    #chat-messages .bot .icon {
        height: 35px;
        width: 35px;
        margin-top: 12px;
        line-height: 35px;
        padding: 0 4px;
    }
}

#chat-messages .message {
    border-radius: 5px;
    padding: 10px;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
    margin: 5px 0;
    display: inline-block;
    max-width: 80%;
    transition: all 0.3s east-in-out;
}

#chat-messages .bot .message {
    background: #fff;
}

#chat-messages .user .message {
    color: #fff;
}

#chat-messages .message a {
    color: #50466e;
}

#chat-messages .message a:active, #chat-messages .message a:hover {
    text-decoration: underline;
}

#chat-messages .message .gfield {
    margin-bottom: 10px;
}

#chat-messages .message input[type=text], 
#chat-messages .message input[type=email], 
#chat-messages .message textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: solid 1px #9f9f9f;
    font-family: inherit;
}

#chat-messages .message textarea {
    height: 150px;
}

#chat-messages .message .gfield--type-honeypot, #chat-messages .message .honey {
    display: none;
}

#chat-messages .message .button {
    background: #50466e;
    font-family: inherit;
    font-weight: bold;
    width: 100%;
}

#chat-messages .message .button:hover, #chat-messages .message .button:active {
    background: #2d79a2;
}

#chat-message .gfield_required gfield_required_asterisk {
    font-weight: bold;
    color: #941b1b;
}

/* Chat input */
#chat-input {
    width: 100%;
    padding: 5px;
    border: none;
    border-top: 1px solid #ccc;
    box-sizing: border-box;
}

#chat-input form {
    display: flex;
    align-items: center;
}

#chat-input input {
    width: 80%;
    padding: 10px;
    border: none;
    font-size: 1rem;
    box-shadow: none;
    margin: 0;
    flex-grow: 1;
}

#chat-input button {
    width: 18%;
    background: none transparent;
    color: #696969;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s;
    flex-basis: fit-content;
}

#chat-input button:hover, #chat-input button:active {
    transform: scale(1.1);
    color: #363636
}