/**
 * Styles for chat messages and markdown formatting
 */

/* Message Container Styles */
.message {
    margin-bottom: 16px;
    max-width: 85%;
    clear: both;
}

.user-message {
    float: right;
    background-color: #f0f0f0;
    border-radius: 18px 18px 0 18px;
    padding: 12px 16px;
}

.ai-message {
    float: left;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 18px 18px 18px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Text Formatting */
.message-content p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

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

.message-content strong {
    font-weight: 600;
}

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

/* List Styling */
.message-content ul,
.message-content ol {
    margin: 10px 0;
    padding-left: 24px;
}

.message-content li {
    margin-bottom: 5px;
    line-height: 1.5;
}

/* Links */
.message-content a {
    color: #4f0f87; /* XBURG brand color */
    text-decoration: none;
    border-bottom: 1px solid #4f0f87;
    padding-bottom: 1px;
    transition: all 0.2s ease;
}

.message-content a:hover {
    opacity: 0.8;
}

/* Headings */
.message-content h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 10px 0;
    color: #333;
}

.message-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 14px 0 8px 0;
    color: #444;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Message container adjustments */
    .message {
        max-width: 92%; /* Wider messages for mobile */
        margin-bottom: 12px; /* Slightly reduced vertical spacing */
    }
    
    /* Text formatting adjustments */
    .message-content p {
        margin: 0 0 8px 0; /* Reduced paragraph spacing */
        line-height: 1.4; /* Slightly tighter line height */
        font-size: 12px; /* Slightly larger font for readability */
    }
    
    /* List styling adjustments */
    .message-content ul,
    .message-content ol {
        margin: 8px 0;
        padding-left: 20px; /* Reduce indentation */
    }
    
    .message-content li {
        margin-bottom: 4px;
    }
    
    /* Heading size adjustments */
    .message-content h2 {
        font-size: 17px;
        margin: 14px 0 8px 0;
    }
    
    .message-content h3 {
        font-size: 15px;
        margin: 12px 0 6px 0;
    }
}
