/**
 * Chatbot History - Modern Professional Design
 */

/* Chatbot Widget */
.chatbot-widget-section {
    margin: 0 0 80px 0;
    padding: 0;
}

.chatbot-widget-section h2,
.chatbot-widget-section p {
    display: none;
}

/* History Section */
.chatbot-history-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
}

.chatbot-history-section h2 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 40px 0;
    letter-spacing: -0.5px;
}

.history-meta {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 40px 0;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.7);
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
}

/* Thread Container */
.history-thread {
    margin-bottom: 60px;
    padding: 32px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.history-thread:hover {
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.07),
        0 15px 40px rgba(59, 130, 246, 0.12);
    transform: translateY(-2px);
}

.history-thread h3 {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 24px 0;
    padding: 0 0 12px 0;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Question */
.history-question {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    position: relative;
    overflow: hidden;
}

.history-question::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.history-question strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.history-date {
    display: inline-block;
    font-size: 11px;
    color: #64748b;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
}

/* Response */
.history-response {
    padding: 20px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    line-height: 1.7;
    position: relative;
    overflow: hidden;
}

.history-response::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.history-response strong {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #065f46;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.history-response p {
    margin: 0 0 12px 0;
    color: #334155;
    font-size: 15px;
    line-height: 1.7;
}

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

.history-response ul,
.history-response ol {
    margin: 12px 0;
    padding-left: 24px;
    color: #334155;
}

.history-response li {
    margin: 6px 0;
}

.history-response a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.history-response a:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Feedback */
.history-feedback {
    margin-top: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(234, 179, 8, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.history-feedback .score {
    padding: 5px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.history-feedback .score-positive {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.history-feedback .score-negative {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.history-feedback .comment {
    color: #78716c;
    flex: 1;
    font-style: italic;
}

/* Subtle Animation */
.history-item {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-history-section {
        padding: 20px 16px;
    }
    
    .chatbot-history-section h2 {
        font-size: 24px;
    }
    
    .history-thread {
        padding: 20px;
        margin-bottom: 40px;
    }
    
    .history-question,
    .history-response {
        padding: 16px 18px;
    }
    
    .history-feedback {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Scrollbar */
.chatbot-history-section::-webkit-scrollbar {
    width: 8px;
}

.chatbot-history-section::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.chatbot-history-section::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
    border-radius: 4px;
}

.chatbot-history-section::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #64748b 0%, #475569 100%);
}
