.agenticwp-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: transparent;
}

.agenticwp-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.agenticwp-message.user {
    background-color: var(--agenticwp-user-message);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.agenticwp-message.assistant,
.agenticwp-message.loading {
    background-color: #f1f5f9;
    color: var(--agenticwp-text);
    align-self: flex-start;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 4px;
}

.agenticwp-message.loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agenticwp-loading-dots {
    display: flex;
    gap: 3px;
}

.agenticwp-loading-dots span {
    width: 6px;
    height: 6px;
    background-color: rgba(30, 41, 59, 0.6);
    border-radius: 50%;
    animation: agenticwp-loading 1.4s infinite ease-in-out;
}

.agenticwp-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.agenticwp-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.agenticwp-error-message {
    background: rgba(220, 50, 50, 0.1);
    border: 1px solid var(--agenticwp-error);
    color: var(--agenticwp-error);
    padding: 12px;
    border-radius: var(--agenticwp-border-radius);
    font-size: 14px;
    margin-bottom: 12px;
}

.agenticwp-message-content h1,
.agenticwp-message-content h2,
.agenticwp-message-content h3,
.agenticwp-message-content h4,
.agenticwp-message-content h5,
.agenticwp-message-content h6 {
    margin: 12px 0 6px 0;
    font-weight: 600;
    line-height: 1.3;
    color: var(--agenticwp-text);
}

.agenticwp-message-content h1 { font-size: 1.5em; }
.agenticwp-message-content h2 { font-size: 1.3em; }
.agenticwp-message-content h3 { font-size: 1.1em; }
.agenticwp-message-content h4 { font-size: 1em; }
.agenticwp-message-content h5 { font-size: 0.9em; }
.agenticwp-message-content h6 { font-size: 0.85em; }

.agenticwp-message-content h1:first-child,
.agenticwp-message-content h2:first-child,
.agenticwp-message-content h3:first-child,
.agenticwp-message-content h4:first-child,
.agenticwp-message-content h5:first-child,
.agenticwp-message-content h6:first-child {
    margin-top: 0;
}

.agenticwp-message-content p {
    margin: 6px 0;
    line-height: 1.5;
}

.agenticwp-message-content p:first-child {
    margin-top: 0;
}

.agenticwp-message-content p:last-child {
    margin-bottom: 0;
}

.agenticwp-message-content ul,
.agenticwp-message-content ol {
    margin: 8px 0;
    padding-left: 16px;
}

.agenticwp-message-content li {
    margin: 2px 0;
    line-height: 1.5;
}

.agenticwp-message-content a {
    color: var(--agenticwp-primary);
    text-decoration: underline;
    text-decoration-color: rgba(34, 113, 177, 0.5);
    transition: color 0.15s ease;
}

.agenticwp-message-content a:hover {
    color: var(--agenticwp-primary-hover);
    text-decoration-color: var(--agenticwp-primary-hover);
}

.agenticwp-message-content code {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: var(--agenticwp-text);
}

.agenticwp-message-content pre {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 10px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

.agenticwp-message-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

.agenticwp-message-content blockquote {
    border-left: 3px solid var(--agenticwp-primary);
    margin: 8px 0;
    padding: 6px 12px;
    background: rgba(34, 113, 177, 0.1);
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: var(--agenticwp-text-muted);
}

.agenticwp-message-content strong,
.agenticwp-message-content b {
    font-weight: 600;
    color: var(--agenticwp-text);
}

.agenticwp-message-content em,
.agenticwp-message-content i {
    font-style: italic;
}