.webxline-chat-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 640px;
    direction: rtl;
    font-family: inherit;
    overflow: hidden;
}

.webxline-chat-header {
    background: #1e293b;
    color: #ffffff;
    padding: 16px 20px;
}

.webxline-chat-header h3 {
    margin: 0;
    font-size: 16px;
    color: #fff;
}

.webxline-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.webxline-msg {
    padding: 12px 18px;
    border-radius: 10px;
    max-width: 85%;
    line-height: 1.7;
    font-size: 14px;
    word-break: break-word;
}

.webxline-msg-user {
    background: #2563eb;
    color: #ffffff;
    align-self: flex-start;
    border-bottom-right-radius: 2px;
    white-space: pre-wrap;
}

.webxline-msg-ai {
    background: #ffffff;
    color: #1e293b;
    align-self: flex-end;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
}

.webxline-msg-ai.loading {
    color: #3b82f6;
    background: #eff6ff;
    border-color: #bfdbfe;
    font-weight: 500;
}

.webxline-msg-ai a {
    color: #2563eb;
    background: #eff6ff;
    padding: 3px 8px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin: 2px 0;
    border: 1px solid #bfdbfe;
}

.webxline-msg-ai a:hover {
    background: #2563eb;
    color: #ffffff;
}

.webxline-msg-ai ul, .webxline-msg-ai ol {
    margin: 6px 0;
    padding-right: 20px;
}

.webxline-msg-ai code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    direction: ltr;
}

.webxline-attachment-preview {
    background: #f1f5f9;
    padding: 8px 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.webxline-file-badge {
    color: #334155;
}

#webxlineRemoveAttachment {
    background: none;
    border: none;
    font-size: 18px;
    color: #ef4444;
    cursor: pointer;
    font-weight: bold;
    padding: 0 4px;
}

.webxline-chat-input-area {
    display: flex;
    align-items: center;
    padding: 12px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    gap: 8px;
}

.webxline-icon-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 18px;
}

.webxline-chat-input-area textarea {
    flex: 1;
    height: 48px;
    resize: none;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.webxline-chat-input-area textarea:focus {
    border-color: #2563eb;
}

.webxline-chat-input-area button#webxlineChatSendBtn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 20px;
    height: 48px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}