/* Custom styles for DSL Network */

/* AI Analysis Banner Styles */
#aiAnalysisBanner {
    position: sticky;
    top: 0;
    z-index: 1020;
    margin-bottom: 1rem;
    border: none;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#aiAnalysisBanner .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Card hover effect */
.content-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

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

/* Card body padding */
.content-card .card-body {
    padding: 1.5rem;
}

.content-card .card-header {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Stance badges */
.stance-badge .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Total score badge */
.total-score {
    background-color: #f8f9fa;
    border-left: 4px solid #6c757d;
    padding: 8px 12px;
    margin-top: 12px;
}

/* Tree connectors for comments */
.comments-tree .border-start {
    position: relative;
}

.comments-tree .border-start::before {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    width: 2px;
    height: 100%;
    background-color: #dee2e6;
}

/* Post author highlight */
.post-header .post-author {
    font-weight: 600;
    color: #3b5998;
}

/* Post meta and actions styling */
.post-meta .d-flex {
    align-items: flex-start;
    gap: 1rem;
}

.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
}

.post-actions .btn {
    flex-shrink: 0;
}

/* AI breakdown details */
.ai-breakdown .card {
    font-size: 0.875rem;
}

/* Improved button styles */
.btn-light {
    background-color: #f8f9fa;
    border-color: #f0f2f5;
}

.btn-light:hover {
    background-color: #e9ecef;
}

/* Score highlights */
.ai-score, .user-score, .total-score {
    border-radius: 4px;
}

/* Profile page styles */
.profile-avatar {
    width: 100px;
    height: 100px;
    font-size: 3rem;
    background-color: #f0f2f5;
    color: #3b5998;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Profile specific padding */
.content-card .text-center {
    padding: 0.5rem 0;
}

.content-card .border-bottom {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.content-card .border-bottom:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.card-header {
    background-color: #f8f9fa;
    font-weight: 500;
}

.list-group-flush {
    margin-bottom: 0;
}

.list-group-item {
    padding: 1rem 1.5rem;
    background-color: transparent;
    border-color: #f0f2f5;
}

.content-card .list-group-flush .list-group-item {
    padding: 1rem 0;
}

.content-card .list-group-flush .list-group-item:first-child {
    padding-top: 0.5rem;
}

.content-card .list-group-flush .list-group-item:last-child {
    padding-bottom: 0.5rem;
}

/* Scoring Criteria Page Styles */
.criteria-section {
    background: var(--card-background, #ffffff);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color, #e9ecef);
}

.criteria-header {
    color: var(--primary-color, #3b5998);
    border-bottom: 3px solid var(--accent-color, #1877f2);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.score-component {
    background: var(--background-light, #f8f9fa);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-color, #1877f2);
}

.reasoning-type, .fallacy-item {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.reasoning-type:hover, .fallacy-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.weight-positive {
    color: #28a745;
    font-weight: bold;
}

.weight-negative {
    color: #dc3545;
    font-weight: bold;
}

.weight-neutral {
    color: #6c757d;
    font-weight: bold;
}

.badge-reasoning {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85em;
    margin-right: 0.5rem;
}

.badge-fallacy {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85em;
    margin-right: 0.5rem;
}

.methodology-overview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.content-type-badge {
    background: var(--accent-color, #1877f2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8em;
    margin: 0.25rem;
    display: inline-block;
}

.score-explanation {
    background: #f8f9fa;
    border-left: 4px solid #17a2b8;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

/* Footer styles */
.main-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Mobile-friendly adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        margin-top: 2rem;
    }

    .post-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .post-actions .btn {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Scoring criteria responsive adjustments */
    .criteria-section {
        padding: 1rem;
    }

    .methodology-overview {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Main content styles */
.content-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.post-header {
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-author {
    font-weight: bold;
    color: #333;
}

.post-time {
    color: #666;
    font-size: 0.9em;
}

.post-title {
    font-size: 1.5em;
    margin: 10px 0;
    color: #333;
}

.post-content {
    margin-bottom: 15px;
    line-height: 1.6;
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.post-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.sidebar {
    padding-left: 20px;
}

.comment-item {
    border-left: 3px solid #dee2e6;
    padding-left: 15px;
    margin: 15px 0;
}

.comment-item .comment-content {
    margin-bottom: 10px;
}

.comment-item .comment-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.comment-item .comment-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.stance-badge {
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
}

.stance-agree {
    background: #d4edda;
    color: #155724;
}

.stance-disagree {
    background: #f8d7da;
    color: #721c24;
}

.stance-neutral {
    background: #fff3cd;
    color: #856404;
}

.ai-breakdown {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.ai-breakdown h6 {
    color: #495057;
    margin-bottom: 10px;
}

.ai-breakdown .badge {
    margin-right: 5px;
}

/* Tags styles */
.tags-container {
    margin-bottom: 15px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid;
    transition: all 0.2s ease;
}

.tag-badge:hover {
    text-decoration: none;
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Tag type specific styles */
.tag-topic {
    background-color: #007bff20;
    border-color: #007bff;
    color: #007bff;
}

.tag-reasoning {
    background-color: #28a74520;
    border-color: #28a745;
    color: #28a745;
}

.tag-quality {
    background-color: #ffc10720;
    border-color: #ffc107;
    color: #856404;
}

.tag-domain {
    background-color: #6f42c120;
    border-color: #6f42c1;
    color: #6f42c1;
}

.tag-sentiment {
    background-color: #fd7e1420;
    border-color: #fd7e14;
    color: #fd7e14;
}

.tag-auto {
    background-color: #6c757d20;
    border-color: #6c757d;
    color: #6c757d;
}

.tag-manual {
    background-color: #17a2b820;
    border-color: #17a2b8;
    color: #17a2b8;
}

/* Tag management forms */
.tag-management {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.tag-form .form-check {
    margin-bottom: 8px;
}

.tag-form .form-check-input {
    margin-right: 8px;
}

.tag-form .form-check-label {
    cursor: pointer;
}

.tag-type-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.tag-type-section h6 {
    color: #495057;
    margin-bottom: 10px;
    font-weight: 600;
}

.tag-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.tag-stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    flex: 1;
}

.tag-stat .stat-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #007bff;
}

.tag-stat .stat-label {
    font-size: 0.9em;
    color: #6c757d;
}

.tag-filter {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.tag-filter .form-control,
.tag-filter .form-select {
    margin-bottom: 10px;
}

.tag-table {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag-table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.tag-table td {
    vertical-align: middle;
    padding: 12px;
}

.tag-table .tag-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid #dee2e6;
}

.tag-table .tag-actions {
    display: flex;
    gap: 5px;
}

.tag-table .tag-actions .btn {
    padding: 4px 8px;
    font-size: 0.8em;
}

.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}
