/* UNCDF Sankey Diagram - CSS File for Salesforce Experience Cloud */

#uncdf-sankey-container {
    width: 100%;
    min-height: 100vh;
    max-width: 100%;
    margin: 50px auto;
    background: transparent;
    padding: 0;
    font-family: 'Salesforce Sans', Arial, sans-serif;
}

.uncdf-sankey-header {
    margin-bottom: 20px;
    text-align: center;
    justify-content: center;
}

.uncdf-sankey-title {
    margin: 0 0 10px 0;
    color: #333333;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.uncdf-sankey-subtitle {
    color: #666666;
    font-size: 14px;
    margin-bottom: 0;
}

.uncdf-sankey-chart-wrapper {
    width: 100%;
    min-height: 80vh;
    overflow-x: auto;
    margin-bottom: 20px;
}

#uncdf-sankey-svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Node styles */
.uncdf-sankey-node rect {
    cursor: pointer;
    fill-opacity: 0.9;
    shape-rendering: crispEdges;
    transition: fill-opacity 0.2s ease;
}

.uncdf-sankey-node rect:hover {
    fill-opacity: 1;
}

.uncdf-sankey-node text {
    pointer-events: none;
    font-size: 12px;
    fill: #333333;
    font-family: 'Salesforce Sans', Arial, sans-serif;
}

/* Link styles */
.uncdf-sankey-link {
    fill: none;
    stroke-opacity: 0.3;
    transition: stroke-opacity 0.2s ease;
}

.uncdf-sankey-link:hover {
    stroke-opacity: 0.5;
}

/* Legend styles */
.uncdf-sankey-legend {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.uncdf-legend-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.uncdf-legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    #uncdf-sankey-container {
        padding: 20px 15px;
    }
    
    .uncdf-sankey-title {
        font-size: 20px;
    }
    
    .uncdf-sankey-subtitle {
        font-size: 13px;
    }
    
    .uncdf-sankey-legend {
        font-size: 12px;
    }
    
    .uncdf-legend-color {
        width: 14px;
        height: 14px;
    }
}

/* Salesforce Lightning Design System compatibility */
.slds-scope #uncdf-sankey-container {
    font-family: 'Salesforce Sans', Arial, sans-serif;
}

/* Tooltip styles (if using native SVG titles) */
.uncdf-sankey-node title,
.uncdf-sankey-link title {
    font-family: 'Salesforce Sans', Arial, sans-serif;
}