/*
 * AI Explorer Wiki - Custom Styles
 * Staleness color coding, technical levels, and tree navigation
 */

/* Staleness Badge Colors */
.staleness-green {
    background-color: #28a745 !important;
    color: white;
}

.staleness-yellow {
    background-color: #ffc107 !important;
    color: #212529;
}

.staleness-red {
    background-color: #dc3545 !important;
    color: white;
}

.staleness-pinned {
    background-color: #007bff !important;
    color: white;
}

/* Fresh indicator class */
.staleness-fresh {
    background-color: #28a745 !important;
    color: white;
}

.staleness-aging {
    background-color: #ffc107 !important;
    color: #212529;
}

.staleness-stale {
    background-color: #dc3545 !important;
    color: white;
}

/* Border variants for list items */
.staleness-green-border {
    border-left: 4px solid #28a745 !important;
}

.staleness-yellow-border {
    border-left: 4px solid #ffc107 !important;
}

.staleness-red-border {
    border-left: 4px solid #dc3545 !important;
}

/* Technical Level Indicator - 5 dots/bars */
.tech-level-indicator {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.tech-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #dee2e6;
    border: 1px solid #adb5bd;
    display: inline-block;
    transition: all 0.2s ease;
}

.tech-dot.filled {
    background-color: #6f42c1;
    border-color: #5a32a3;
}

/* Mini version for list items */
.tech-level-mini {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}

.tech-dot-mini {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #dee2e6;
    display: inline-block;
}

.tech-dot-mini.filled {
    background-color: #6f42c1;
}

/* Technical level voting */
.tech-level-voting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-vote-btn.active[data-accurate="true"] {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.tech-vote-btn.active[data-accurate="false"] {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Node items in lists */
.node-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.node-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Voting buttons */
.voting-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.vote-btn.active {
    font-weight: bold;
}

.vote-btn.active[data-value="1"] {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.vote-btn.active[data-value="-1"] {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Node content */
.node-content {
    min-height: 100px;
    line-height: 1.7;
}

/* Comments */
.comments-list .card {
    border-left: 3px solid #6c757d;
}

/* Tags */
.tag-badge {
    transition: transform 0.2s ease;
}

.tag-badge:hover {
    transform: scale(1.05);
}

/* Timeline for revision history */
.timeline .card {
    position: relative;
}

.timeline .card::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    width: 10px;
    height: 10px;
    background: #6c757d;
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline .card.border-success::before {
    background: #28a745;
}

/* Tree visualization styles */
.tree-container {
    padding: 20px;
    overflow-x: auto;
}

.tree-node {
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tree-node:hover {
    background: #e9ecef;
    transform: scale(1.05);
}

.tree-node.fresh {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.tree-node.aging {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.tree-node.stale {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.tree-node.pinned {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

/* Mindmap canvas */
#mindmap-canvas {
    width: 100%;
    height: 500px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fafafa;
}

/* Breadcrumb styling */
.breadcrumb {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
}

/* Card enhancements */
.card-header {
    font-weight: 500;
}

/* Footer */
.footer {
    border-top: 1px solid #dee2e6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .voting-container {
        flex-wrap: wrap;
    }

    .node-item:hover {
        transform: none;
    }

    .tech-level-voting {
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-top: 0.5rem;
    }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Pulse animation for active voting */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.vote-btn.voting {
    animation: pulse 0.3s ease;
}

/* Pinned indicator */
.pinned-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #007bff;
}

/* Moderation badges */
.moderation-pending {
    background-color: #ffc107;
    color: #212529;
}

.moderation-approved {
    background-color: #28a745;
    color: white;
}

.moderation-rejected {
    background-color: #dc3545;
    color: white;
}

/* User role badges */
.role-viewer {
    background-color: #6c757d;
}

.role-editor {
    background-color: #17a2b8;
}

.role-moderator {
    background-color: #fd7e14;
}

.role-admin {
    background-color: #dc3545;
}
