#sinai-chat-button {
    position: fixed;
    z-index: 999;
    right: 30px;
    bottom: 100px;
    width: 50px;
    height: 50px;
    border: solid 2px salmon;
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    padding-top: 10px;
    line-height: 1;
    color: salmon;
    cursor: pointer;
}

#sinai-chat-wrap {
    width: 100%;
    min-width: 300px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    overflow: auto;
    border: solid 1px #c0c0c0;
    padding: 20px;
}

#sinai-floating-chat-wrap {
    position: fixed;
    z-index: 1000;
    bottom: 100px;
    right: 30px;
    width: 300px;
    height: 500px;
    overflow-y: auto;
    border: solid 2px salmon;
    padding: 10px;
    background-color: white;
    border-radius: 10px;
    display: none;
    flex-direction: column;
}

#sinai-chat-close {
    font-size: 12px;
    text-align: right;
    line-height: 1;
    cursor: pointer;
    margin-bottom: 5px;
}

#sinai-floating-chat-wrap.active {
    display: flex;
}

#sinai-chat {
    flex-grow: 1;
    max-height: 500px;
    overflow-y: auto;
}

#sinai-chat > div:has(> div.user-message) {
    text-align: right;
}

#sinai-chat-input-wrap {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

#sinai-floating-chat-wrap #sinai-chat-input-wrap {
    margin-top: 10px;
    gap: 10px;
}

#sinai-chat-send {
    border: solid 1px #ed6c0f;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #ffac70;
    font-weight: bold;
    color: white;
}

#sinai-floating-chat-wrap #sinai-chat-send {
    padding: 5px 10px;
    font-size: 12px;
}

#sinai-chat-input {
    padding: 10px 20px;
    flex-grow: 1;
    outline: solid 1px #c0c0c0;
    border-radius: 5px;
}

#sinai-floating-chat-wrap #sinai-chat-input {
    padding: 5px 10px;
    font-size: 12px;
}

.sinai-message {
    padding: 10px 20px;
    border-radius: 10px;
    max-width: 85%;
    display: inline-block;
    margin-bottom: 10px;
}

.sinai-message ul,
.sinai-message ol {
    margin: 0;
    padding: 0 0 0 20px;
}

.sinai-message a {
    color: #0a68b4;
    text-decoration: underline;
}

.sinai-message.server-message > :last-child {
    margin-bottom: 0;
}

#sinai-floating-chat-wrap .sinai-message {
    padding: 5px 10px;
    font-size: 12px;
}

.sinai-message.server-message {
    border: solid 1px #d7d7d7;
    background-color: #dedede;
    line-height: 1.2;
}

.sinai-message.server-message h1,
.sinai-message.server-message h2,
.sinai-message.server-message h3,
.sinai-message.server-message h4,
.sinai-message.server-message h5,
.sinai-message.server-message h6 {
    margin-bottom: 8px;
    color: #f77042;
    font-weight: bold;
}

.sinai-message.user-message {
    border: solid 1px #bbf8f2;
    background-color: #cbf6f2;
}

#sinai-chat-thinking {
    height: 30px;
}

#sinai-chat-thinking > img {
    width: 30px;
}