.chat-toggle-button {
    position: fixed;
    bottom: 80px;
    left: 5px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #de3a3e;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-toggle-button img {
    width: auto;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
}

.chat-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 350px;
    height: 60vh;
    border-radius: 10px;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    font-family: "Arial", sans-serif;
    z-index: 20;
}

.chat-widget-header {
    background-color: #de3a3e;
    color: white;
    padding: 10px 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-title {
    flex-grow: 1;
    text-align: left;
}

.chat-header-buttons {
    display: flex;
    gap: 10px;
}

.chat-control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-family: Arial, sans-serif;
    width: 24px;
    height: 24px;
    margin: 0 5px;
    padding: 0;
    box-sizing: border-box;
    cursor: pointer;
}

.chat-control-button-container {
    position: relative;
    display: inline-block;
}

.tooltip {
    visibility: hidden;
    width: auto;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.chat-control-button-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.chat-widget-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    border-bottom: 1px solid #ddd;
}

.chat-widget-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #f1f1f1;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#chatInput {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

#chatSendButton {
    padding: 10px 20px;
    margin-left: 10px;
    background-color: #de3a3e;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

.chat-message {
    background-color: #f1f1f1;
    color: #000;
    padding: 8px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    width: fit-content;
}

.chat-message.user-message {
    text-align: right;
    margin-left: auto;
    max-width: 80%;
}

.chat-message.assistant-message {
    text-align: left;
    max-width: 80%;
}

.chat-message.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    margin: 10px 0;
    font-weight: bold;
}

.chat-header-logo {
    width: auto;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.chat-message.full-width-error {
    background-color: #ffb3b3;
    color: #b30000;
    padding: 15px;
    border: 2px solid #ff4d4d;
    border-radius: 10px;
    margin: 10px 0;
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.restart-button {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.restart-button:hover {
    background-color: #0056b3;
}

.chat-widget-body img {
    width: 130px;
    mix-blend-mode: multiply;
}

.typing-indicator {
    display: inline-block;
    font-style: italic;
    color: #888;
    margin-top: 5px;
}

.typing-indicator::after {
    content: "...";
    display: inline-block;
    animation: typingAnimation 1.5s infinite;
}

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

@media screen and (max-width: 600px) {
    .chat-widget {
        width: 100%;
        /* height: 100%; */
        height: 100dvh;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
    }

    .chat-widget-header {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    .chat-widget-input {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .chat-toggle-button {
        z-index: 20;
    }
}
