/* Sections styling for generate_par responses */

.response-sections {
    margin: 20px 0;
}

.response-section {
    padding: 20px;
    border-radius: 12px;
    background: var(--bot-message-bg, #f8f9fa);
    transition: all 0.3s ease;
    margin-bottom: 15px;
    border: 1px solid var(--border-light, #e0e0e0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.response-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.response-section:last-child {
    margin-bottom: 0;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary, #333);
    border-bottom: 2px solid var(--primary-color, #007bff);
    padding-bottom: 8px;
}

.section-header i {
    margin-right: 8px;
    color: var(--primary-color, #007bff);
    font-size: 18px;
}

/* Buyingen AI Answer Section */
.ai-answer-section {
    border-left: 4px solid #28a745;
}

.ai-answer-section .section-header {
    border-bottom-color: #28a745;
}

.ai-answer-section .section-header i {
    color: #28a745;
}

/* User Experiences Section */
.user-experiences-section {
    border-left: 4px solid #17a2b8;
}

.user-experiences-section .section-header {
    border-bottom-color: #17a2b8;
}

.user-experiences-section .section-header i {
    color: #17a2b8;
}

/* Sources Section */
.sources-section {
    border-left: 4px solid #6f42c1;
    display: none;
}

.sources-section .section-header {
    border-bottom-color: #6f42c1;
}

.sources-section .section-header i {
    color: #6f42c1;
}

/* Related Content Section */
.related-section {
    border-left: 4px solid #ffc107;
}

.related-section .section-header {
    border-bottom-color: #ffc107;
}

.related-section .section-header i {
    color: #ffc107;
}

/* Answer sections */
.answer-section-2 {
    margin-top: -18px;
}

/* Related chatbots section */
.related-section {
    border-left: 4px solid #ffc107;
}

.related-chatbots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.related-chatbot-card {
    background: var(--card-bg, #fff);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border-light, #dee2e6);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.related-chatbot-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.related-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.related-card-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
}

.related-card-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--placeholder-bg, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
    color: var(--placeholder-text, #6c757d);
}

.related-card-info {
    flex: 1;
}

.related-card-title {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px 0;
    line-height: 1.3;
    color: var(--text-primary, #333);
}

.related-card-creator {
    font-size: 12px;
    color: var(--text-secondary, #666);
    margin: 0;
}

.related-card-description {
    font-size: 13px;
    color: var(--text-secondary, #666);
    line-height: 1.4;
    margin: 8px 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card-tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.related-tag {
    background: var(--tag-bg, #e9ecef);
    color: var(--tag-text, #495057);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

/* Dark theme support */
[data-theme="dark"] .response-section {
    border-color: var(--dark-border, #4a5568);
}

[data-theme="dark"] .related-chatbot-card {
    background: var(--dark-card-bg, #2d3748);
    border-color: var(--dark-border, #4a5568);
}

[data-theme="dark"] .section-header {
    color: var(--dark-text-primary, #f7fafc);
}

[data-theme="dark"] .related-card-title {
    color: var(--dark-text-primary, #f7fafc);
}

[data-theme="dark"] .related-card-creator,
[data-theme="dark"] .related-card-description {
    color: var(--dark-text-secondary, #a0aec0);
}

[data-theme="dark"] .related-tag {
    background: var(--dark-tag-bg, #4a5568);
    color: var(--dark-tag-text, #e2e8f0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .response-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .related-chatbots-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .related-card-header {
        margin-bottom: 8px;
    }
    
    .related-card-image,
    .related-card-placeholder {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
}
