.astro-concierge-assistant {
    font-size: 14px;
}

.astro-concierge-assistant-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #6200ea;
    color: white;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}

.astro-concierge-assistant-button:hover {
    background-color: #3700b3;
}

.astro-concierge-assistant-button .chat-icon {
    width: 34px;
    height: 34px;
    filter: invert(100%) sepia(100%) saturate(100%) hue-rotate(90deg);
    background-position: center;
    background-size: contain;
    background-image: url("/wp-content/plugins/astro-concierge-assistant/images/chat.svg");
}

/* Chat container styling */
.chat-container {
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 300px;
    height: 400px; /* Fixed height to prevent expanding */
    background-color: white;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hidden {
    display: none;
}

/* Chat header */
.chat-header {
    position: relative;
    padding: 10px;
    text-align: center;
    font-weight: 800;
    background-color: #6200ea;
    color: white;
}

/* Close button */
.close-chat {
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    font-weight: bold;
}

/* Chat body */
.chat-body {
    padding: 10px;
    flex-grow: 1;
    overflow-y: auto; /* Allows scrolling for long messages */
    max-height: 350px; /* Adjusted to keep space for footer */
}

/* Hide the scrollbar */
.chat-body::-webkit-scrollbar {
    width: 0;
}

/* Common chat message style */
.chat-message {
    display: flex;
    padding: 0;
    margin-bottom: 10px;
    border-radius: 12px;
    max-width: 100%;
    word-wrap: break-word;
    position: relative;

    font-size: 14px;
    line-height: 1.4em;
}
.chat-message span {
    /*max-width: 200px;*/
    display: inline-block;
    word-wrap: break-word; /* Per far andare a capo parole lunghe */
    overflow-wrap: break-word; /* Supporto per browser moderni */
    white-space: normal; /* Consente l'andata a capo */
}
.chat-message span a {
    display: inline-block;
    word-wrap: break-word; /* Per far andare a capo parole lunghe */
    overflow-wrap: break-word; /* Supporto per browser moderni */
    white-space: normal; /* Consente l'andata a capo */
}

/* Message bubble styling */
.chat-message span {
    display: inline-block;
    padding: 10px;
    border-radius: 5px;
}

/* Bot message (aligned left) */
.chat-message.bot {
    justify-content: flex-start;
}

.chat-message.bot span {
    background-color: #eee;
}

/* User message (aligned right) */
.chat-message.user {
    justify-content: flex-end;
}

.chat-message.user span {
    background-color: #6200ea;
    color: white;
}

/* Avatar styles */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Bot avatar (on the left side of message) */
.chat-message.bot .avatar {
    margin-right: 10px; /* Space between avatar and message */
}

/* User avatar (on the right side of message) */
.chat-message.user .avatar {
    margin-left: 5px; /* Reduced margin between avatar and chat window */
    order: 1; /* Avatar appears after the message */
}

input.chat-user-input {
    border-radius: 5px;
    font-size: 14px !important;
}

/* Chat footer (input and send button) */
.chat-footer {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
}

.chat-footer input {
    flex-grow: 1;
    border: none;
    padding: 12px;
    border-radius: 30px;
    background-color: #e0e0e0;
    outline: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.chat-footer input:focus {
    background-color: #d4d4d4;
}

.chat-footer button {
    padding: 10px 15px;
    margin-left: 10px;
    background-color: #6200ea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.chat-footer button:hover {
    background-color: #3700b3;
}

.chat-footer button i {
    font-size: 18px;
}


@media only screen and (max-width: 480px) {
    .chat-container {
        width: 90%;
        height: 70%;
    }
    .chat-body {
        max-height: unset;
    }
    .chat-message span {
        max-width: none;
    }
}
