/**
 * SCREEN 2C KNOWLEDGE GRAPH INTEGRATION
 * Styles for legal knowledge graph sources in evidence cards.
 */

/* Graph source badge */
.s2c-badge-graph {
    background: linear-gradient(135deg, #1a365d, #2b6cb0);
    color: #fff;
}

/* Confidence tier badges */
.s2c-tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}
.s2c-tier-a { background: #c6f6d5; color: #22543d; }
.s2c-tier-b { background: #fefcbf; color: #744210; }
.s2c-tier-c { background: #fed7d7; color: #742a2a; }

/* Repealed provision warning */
.s2c-repealed-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 8px 0;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    color: #c53030;
    font-size: 13px;
    line-height: 1.4;
}
.s2c-repealed-warning svg { flex-shrink: 0; stroke: #c53030; }

.s2c-evidence-card.source-repealed {
    opacity: 0.85;
    border-color: #feb2b2;
}

/* Legal context panel */
.s2c-legal-context {
    margin: 8px 0;
    padding: 10px 12px;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 6px;
}
.s2c-legal-context-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #2b6cb0;
    margin-bottom: 6px;
}
.s2c-legal-context-header svg { stroke: #2b6cb0; }

/* Graph edge list */
.s2c-legal-edges { list-style: none; margin: 0; padding: 0; }
.s2c-legal-edges li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}
.s2c-legal-edges li:last-child { border-bottom: none; }

/* Edge type badges */
.s2c-edge-type {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
/* Edge type colors — active: interprets, amends, comments_on
   Pre-wired for future graph expansion: cites, part_of, repeals */
.s2c-edge-cites .s2c-edge-type { background: #e9d8fd; color: #553c9a; }
.s2c-edge-interprets .s2c-edge-type { background: #c6f6d5; color: #276749; }
.s2c-edge-amends .s2c-edge-type { background: #fefcbf; color: #975a16; }
.s2c-edge-comments_on .s2c-edge-type { background: #e2e8f0; color: #4a5568; }
.s2c-edge-part_of .s2c-edge-type { background: #bee3f8; color: #2a4365; }
.s2c-edge-repeals .s2c-edge-type { background: #fed7d7; color: #9b2c2c; }

.s2c-edge-target {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
    .s2c-badge-graph { background: linear-gradient(135deg, #2b6cb0, #4299e1); }
    .s2c-tier-a { background: #276749; color: #c6f6d5; }
    .s2c-tier-b { background: #975a16; color: #fefcbf; }
    .s2c-tier-c { background: #9b2c2c; color: #fed7d7; }
    .s2c-repealed-warning { background: #3b1a1a; border-color: #9b2c2c; color: #feb2b2; }
    .s2c-repealed-warning svg { stroke: #feb2b2; }
    .s2c-evidence-card.source-repealed { border-color: #9b2c2c; }
    .s2c-legal-context { background: #1a3a5c; border-color: #2b6cb0; }
    .s2c-legal-context-header { color: #90cdf4; }
    .s2c-legal-context-header svg { stroke: #90cdf4; }
    .s2c-legal-edges li { color: #cbd5e1; border-bottom-color: #4a5568; }
    .s2c-edge-cites .s2c-edge-type { background: #44337a; color: #d6bcfa; }
    .s2c-edge-interprets .s2c-edge-type { background: #22543d; color: #9ae6b4; }
    .s2c-edge-amends .s2c-edge-type { background: #744210; color: #fefcbf; }
    .s2c-edge-comments_on .s2c-edge-type { background: #4a5568; color: #e2e8f0; }
    .s2c-edge-part_of .s2c-edge-type { background: #2a4365; color: #bee3f8; }
    .s2c-edge-repeals .s2c-edge-type { background: #742a2a; color: #fed7d7; }
}
