/* Knowledge Graph Styles for Veritas AI */

/* Graph Header */
.graph-header {
    background: linear-gradient(135deg, #0a192f 0%, #0d47a1 100%);
    color: white;
    padding: 100px 0 40px;
    margin-bottom: 0;
}

.graph-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.header-description {
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 900px;
    opacity: 0.9;
}

/* Graph Controls Section */
.graph-controls {
    background-color: #f8f9fa;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.control-panel {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.control-group {
    margin-bottom: 10px;
}

.control-label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #495057;
}

/* Graph Visualization Area */
.graph-visualization {
    background-color: #f8f9fa;
    padding: 30px 0;
    min-height: 600px;
}

.graph-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 700px;
    position: relative;
    overflow: hidden;
}

.graph-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.graph-loading p {
    margin-top: 10px;
    color: #6c757d;
}

/* Graph Sidebar */
.graph-sidebar {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 700px;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-section {
    margin-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 20px;
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0a192f;
}

/* Graph Stats */
.graph-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-item {
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0a192f;
}

/* Selected Node Info */
.selected-node {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    min-height: 150px;
}

.placeholder-message {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin-top: 30px;
}

.node-info {
    margin-bottom: 15px;
}

.node-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #0a192f;
}

.node-framework {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
    color: white;
}

.node-framework.eu-ai-act {
    background-color: #0d6efd;
}

.node-framework.gdpr {
    background-color: #0dcaf0;
}

.node-framework.nist {
    background-color: #198754;
}

.node-framework.iso {
    background-color: #6610f2;
}

.node-framework.us-eo {
    background-color: #fd7e14;
}

.node-framework.cn-aig {
    background-color: #dc3545;
}

.node-framework.ca-aida {
    background-color: #20c997;
}

.node-framework.uk-ai {
    background-color: #6f42c1;
}

.node-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 10px;
}

.node-reference {
    font-size: 0.8rem;
    color: #6c757d;
}

.node-connections {
    margin-top: 15px;
}

.node-connections-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #0a192f;
}

.connection-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.connection-item {
    font-size: 0.85rem;
    padding: 3px 0;
    display: flex;
    align-items: center;
}

.connection-item::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.connection-item.direct::before {
    background-color: #0d6efd;
}

.connection-item.evidence::before {
    background-color: #fd7e14;
}

.connection-item.control::before {
    background-color: #6610f2;
}

/* Legend */
.legend-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-symbol {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
}

.legend-symbol.eu-ai-act {
    background-color: #0d6efd;
}

.legend-symbol.gdpr {
    background-color: #0dcaf0;
}

.legend-symbol.nist {
    background-color: #198754;
}

.legend-symbol.iso {
    background-color: #6610f2;
}

.legend-symbol.us-eo {
    background-color: #fd7e14;
}

.legend-symbol.cn-aig {
    background-color: #dc3545;
}

.legend-symbol.ca-aida {
    background-color: #20c997;
}

.legend-symbol.uk-ai {
    background-color: #6f42c1;
}

.legend-line {
    width: 30px;
    height: 2px;
    margin-right: 8px;
}

.legend-line.direct {
    background-color: #0d6efd;
}

.legend-line.evidence {
    background-color: #fd7e14;
}

.legend-line.control {
    background-color: #6610f2;
}

.legend-label {
    font-size: 0.85rem;
    color: #495057;
}

/* Graph Insights Section */
.graph-insights {
    padding: 40px 0;
    background-color: white;
}

.graph-insights h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #0a192f;
    text-align: center;
}

.insights-content {
    min-height: 200px;
    position: relative;
}

.insights-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6c757d;
}

.insight-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.insight-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.insight-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #0a192f;
    display: flex;
    align-items: center;
}

.insight-title i {
    color: #0d6efd;
    margin-right: 8px;
}

.insight-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
}

.insight-tags {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.insight-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    background-color: #e9ecef;
    color: #495057;
}

/* Node Detail Modal */
.modal-body h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 20px 0 10px;
    color: #0a192f;
}

/* Add styling for accountability category badge */
.node-category {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 5px;
    margin-bottom: 10px;
}

.node-category.accountability {
    background-color: #6f42c1;
    color: white;
}

.node-category.risk {
    background-color: #dc3545;
    color: white;
}

.node-category.transparency {
    background-color: #0dcaf0;
    color: white;
}

.node-category.human {
    background-color: #fd7e14;
    color: white;
}

.node-category.technical {
    background-color: #198754;
    color: white;
}

.node-category.data {
    background-color: #0d6efd;
    color: white;
}

.requirement-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: white;
    margin-bottom: 15px;
}

.requirement-badge.eu-ai-act {
    background-color: #0d6efd;
}

.requirement-badge.gdpr {
    background-color: #0dcaf0;
}

.requirement-badge.nist {
    background-color: #198754;
}

.requirement-badge.iso {
    background-color: #6610f2;
}

.requirement-badge.us-eo {
    background-color: #fd7e14;
}

.requirement-badge.cn-aig {
    background-color: #dc3545;
}

.requirement-badge.ca-aida {
    background-color: #20c997;
}

.requirement-badge.uk-ai {
    background-color: #6f42c1;
}

.requirement-reference {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.requirement-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.connection-table {
    margin-top: 15px;
}

.connection-table th {
    font-size: 0.9rem;
    font-weight: 600;
}

.connection-table td {
    font-size: 0.9rem;
    vertical-align: middle;
}

.connection-type {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.connection-type.direct {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.connection-type.evidence {
    background-color: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.connection-type.control {
    background-color: rgba(102, 16, 242, 0.1);
    color: #6610f2;
}

/* Service Tier Elements */
.graph-usage-notification {
    background-color: #f1f8ff;
    padding: 10px 0;
    border-bottom: 1px solid #d1e4fd;
}

.usage-info {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.tier-badge {
    background-color: #6c757d;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 10px;
}

.usage-message {
    color: #495057;
}

.usage-message a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

.usage-message a:hover {
    text-decoration: underline;
}

.premium-lock-icon {
    color: #6c757d;
    font-size: 0.9rem;
    cursor: help;
}

.premium-features-prompt {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    border-left: 4px solid #0d6efd;
}

.prompt-icon {
    background-color: #0d6efd;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.prompt-content {
    flex: 1;
}

.prompt-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #0a192f;
}

.prompt-text {
    font-size: 0.95rem;
    color: #495057;
}

/* D3.js Graph Styling */
.nodes circle {
    stroke-width: 2px;
}

.links line {
    stroke-opacity: 0.6;
}

.node-label {
    font-size: 8px;
    pointer-events: none;
    text-anchor: middle;
    user-select: none;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .graph-header {
        padding: 80px 0 30px;
    }
    
    .graph-header h1 {
        font-size: 1.8rem;
    }
    
    .graph-container, .graph-sidebar {
        height: 500px;
        margin-bottom: 20px;
    }
}

@media (max-width: 767px) {
    .graph-header {
        padding: 70px 0 25px;
    }
    
    .graph-header h1 {
        font-size: 1.6rem;
    }
    
    .control-panel {
        padding: 15px;
    }
    
    .graph-container {
        height: 400px;
    }
    
    .legend-container {
        grid-template-columns: 1fr;
    }
}
