#ai-assistant {
    font-family: inherit;
    z-index: 99999;
    right: 0;
    position: absolute;
}
/*
#ai-assistant-toggle {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 19px;
    color: #fff;
    background: #E31E24;
    border: 0;
    border-radius: 30px;
    box-shadow: 0 4px 18px #0003;
    cursor: pointer;
    z-index: 99999;
    font-size: 15px;
    font-weight: 600;
}
*/
#ai-assistant-toggle i {
    font-size: 20px;
}

.ai-window {
    right: 5px;
    position: fixed;
    bottom: 0px;
    width: 97%;
    height: 100%;
    /*max-height: calc(100dvh - 110px);*/
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    box-shadow: 0 8px 35px #0003;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100000;
}

.ai-window[hidden] {
    display: none !important;
}

.ai-header {
    background: #E31E24;
    color: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-header strong,
.ai-header small {
    display: block;
}

.ai-header strong {
    font-size: 16px;
}

.ai-header small {
    margin-top: 4px;
    opacity: .85;
    font-size: 11px;
}

.ai-window-actions {
    display: flex;
    gap: 8px;
}

.ai-window-actions button {
    color: #fff;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f7f7f7;
}

.ai-message {
    max-width: 90%;
    width: fit-content;
    padding: 11px 13px;
    margin-bottom: 10px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.ai-message.bot {
    background: #fff;
    border: 1px solid #e8e8e8;
    color: #222;
    border-bottom-left-radius: 3px;
}

.ai-message.user {
    background: #E31E24;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 3px;
}

.ai-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 13px;
    background: #fff;
    max-height: 160px;
    overflow-y: auto;
}

.ai-option {
    text-align: left;
    border: 1px solid #E31E24;
    background: #fff;
    color: #b9151b;
    padding: 10px 12px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
}

.ai-option:hover {
    background: #fff0f0;
}

.ai-form {
    display: flex;
    padding: 10px;
    gap: 8px;
    border-top: 1px solid #eee;
    background: #fff;
}

.ai-form input {
    min-width: 0;
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 22px;
    padding: 11px 13px;
    outline: none;
}

.ai-form input:focus {
    border-color: #E31E24;
}

.ai-form button {
    width: 42px;
    border: 0;
    border-radius: 50%;
    background: #E31E24;
    color: #fff;
    cursor: pointer;
}
