#tratatur-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1a73e8;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: transform 0.2s;
}
#tratatur-chat-btn:hover { transform: scale(1.08); }

#tratatur-chat-window {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    font-family: Arial, sans-serif;
    overflow: hidden;
    transition: opacity 0.2s, transform 0.2s;
}
#tratatur-chat-window.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

#chat-header {
    background: #1a73e8;
    color: #fff;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#chat-header .avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
#chat-header .status {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
    margin-left: auto;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8f9fa;
}

.chat-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}
.chat-msg.bot {
    background: #fff;
    border: 1px solid #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-msg.user {
    background: #1a73e8;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-msg.typing { color: #888; font-style: italic; }

#chat-input-row {
    display: flex;
    padding: 10px 12px;
    gap: 8px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}
#chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 80px;
    min-height: 36px;
}
#chat-input:focus { border-color: #1a73e8; }
#chat-send {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #1a73e8;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    align-self: flex-end;
}
#chat-send:disabled { background: #ccc; cursor: default; }