/* AI Engine Styles */

/* Truth Blocks Analysis Components */
.analysis-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9ecef;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Score circles */
.score-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    margin: 0 auto;
}

.score-excellent {
    background-color: #28a745;
    color: white;
}

.score-good {
    background-color: #17a2b8;
    color: white;
}

.score-moderate {
    background-color: #ffc107;
    color: #212529;
}

.score-poor {
    background-color: #dc3545;
    color: white;
}

/* Progress bars for quality indicators */
.analysis-progress {
    height: 4px;
}

/* Block count badge */
.block-count-badge {
    background-color: #f8f9fa;
    color: #6c757d;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
}

/* Content preview styling */
.content-preview {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid #dee2e6;
}

/* Truth blocks detail page */
.truth-block-card {
    border-left: 4px solid #007bff;
    margin-bottom: 1.5rem;
}

.reasoning-type-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

/* Fallacy badge styling */
.fallacy-badge {
    background-color: #ffebee;
    color: #c62828;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin: 0.25rem;
    display: inline-block;
}

/* Prominent fallacy highlighting beside truth blocks */
.fallacy-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.fallacy-highlight {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    cursor: help;
}

.fallacy-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
}

/* Responsive fallacy display */
@media (max-width: 768px) {
    .fallacy-highlights {
        margin-top: 0.5rem;
    }

    .fallacy-highlight {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Evidence quality warnings */
.evidence-warning {
    border-left: 4px solid #ffc107;
}

.evidence-notice {
    border-left: 4px solid #17a2b8;
}

.evidence-warning .alert {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.evidence-notice .alert {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Evidence score badges */
.evidence-score-high {
    background-color: #28a745 !important;
    color: white !important;
}

.evidence-score-medium {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.evidence-score-low {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Filter controls */
.filter-controls {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filter-controls .form-select,
.filter-controls .form-range {
    font-size: 0.9rem;
}

/* Statistics cards */
.stats-card {
    text-align: center;
    border: none;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
}

.stats-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Truth Blocks Detail Page Styles */
.truth-block {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #ffffff;
    transition: all 0.3s ease;
}

.truth-block:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.truth-block-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    border-radius: 7px 7px 0 0;
}

.truth-block-content {
    padding: 1rem;
}

.truth-block-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.score-badge {
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 0.25rem;
    transition: all 0.2s ease;
    cursor: help;
}

.score-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Total score badge - make it more prominent */
.score-badge.bg-dark {
    border: 2px solid #495057;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.score-badge.bg-dark:hover {
    border-color: #343a40;
    background-color: #343a40 !important;
}

/* Legacy score badges - make them less prominent */
.score-badge.text-muted {
    opacity: 0.7;
    font-size: 0.8rem;
}

/* Tooltip customization */
.tooltip .tooltip-inner {
    max-width: 300px;
    text-align: left;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.reasoning-type {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 0.25rem;
    display: inline-block;
}

/* Additional Truth Blocks Summary Page Styles */
.usage-count-badge {
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    color: #6c757d;
}

.block-content {
    font-style: italic;
    color: #495057;
}

.usage-item {
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

.usage-item:hover {
    background-color: #e9ecef;
}

.content-title {
    font-weight: 500;
    color: #212529;
}


.analysis-summary {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.analyze-button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    transition: all 0.3s ease;
}

.analyze-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.no-analysis {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

/* Truth Blocks Summary Page Styles */
.stats-overview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.filter-tabs {
    background: white;
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-tabs .nav-link {
    border: none;
    border-radius: 6px;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-tabs .nav-link.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

/* Score circle updates for summary page */
.score-circle {
    width: 50px;
    height: 50px;
    font-size: 14px;
}

/* Block count badge for summary page */
.block-count-badge {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
    color: white;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Content preview updates */
.content-preview {
    max-height: 3.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Navigation enhancements */
.breadcrumb {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.breadcrumb-item {
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: #495057;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a:hover {
    color: #007bff;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-weight: bold;
    margin: 0 0.5rem;
}

/* Back button enhancements */
.btn-outline-secondary {
    border-color: #ced4da;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for AI engine components */
@media (max-width: 768px) {
    .score-circle {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }

    .block-count-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    .content-preview {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    .breadcrumb {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 0.25rem;
    }

    .btn-outline-secondary {
        font-size: 0.85rem;
        padding: 0.375rem 0.75rem;
    }
}
