/* network_style.css */
#network-container {
    width: 100%;
    height: 80vh; /* Responsive height */
    min-height: 500px;
    background-color: var(--light-bg, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 15px rgba(0,0,0,0.02);
}

#network-svg {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#network-svg:active {
    cursor: grabbing;
}

/* Nodes & Edges */
.link {
    stroke: var(--accent-color, #3182ce);
    stroke-opacity: 0.4;
    stroke-width: 2px;
    transition: stroke-opacity 0.3s;
}

.node circle {
    stroke: #fff;
    stroke-width: 2px;
    cursor: pointer;
    transition: fill 0.3s, r 0.3s, filter 0.3s;
}

.node circle:hover {
    filter: brightness(1.1);
}

.node text {
    font-family: "Segoe UI", Roboto, sans-serif;
    font-size: 12px;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(255,255,255,0.8);
    font-weight: 500;
    fill: var(--text-color, #333);
}

/* Tooltip/Card */
#collaborator-card {
    position: absolute;
    pointer-events: none; 
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.15);
    border-radius: 8px;
    padding: 1.2rem;
    min-width: 220px;
    z-index: 10;
    transform: translateY(10px);
}

#collaborator-card.show {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

#collab-name {
    margin: 0 0 0.8rem 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color, #1a365d);
}

#collab-website {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.5rem 1rem;
    background: var(--primary-color, #1a365d);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

#collab-website:hover {
    background: var(--accent-color, #3182ce);
    color: #fff;
    text-decoration: none;
}

#collab-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #888;
}

#collab-close:hover {
    color: #333;
}

/* Dotted styling for ongoing collaborations */
.ongoing-link {
    stroke-dasharray: 6, 6;
    animation: dash 30s linear infinite;
    stroke-opacity: 0.6;
}

@keyframes dash {
    to {
        stroke-dashoffset: -1000;
    }
}
