/* Network Graph Visualization Styles */

.network-graph-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    overflow: hidden;
}

.network-graph-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.network-graph-controls button {
    margin: 2px;
}

.network-graph-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.network-graph-legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 12px;
    color: var(--bs-body-color);
}

.network-graph-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid #fff;
}

/* Node styles */
.node circle {
    transition: r 0.2s ease, stroke-width 0.2s ease;
}

.node:hover circle {
    stroke-width: 3px;
    filter: brightness(1.1);
}

.node text {
    pointer-events: none;
    user-select: none;
}

/* Link styles */
.links line {
    transition: stroke-width 0.2s ease, opacity 0.2s ease;
}

.links line:hover {
    opacity: 1;
}

/* Connection path graph specific */
.connection-path-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    background-color: var(--bs-tertiary-bg);
    border-radius: 8px;
    padding: 20px;
}

.connection-path-container .node text {
    font-size: 13px;
}

.connection-path-container .link-group path {
    transition: stroke-width 0.2s ease;
}

.connection-path-container .link-group:hover path {
    stroke-width: 4px;
}

/* Career timeline specific */
.career-timeline-container {
    position: relative;
    width: 100%;
    min-height: 300px;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 20px;
}

.timeline-tooltip {
    max-width: 300px;
    font-size: 13px;
    line-height: 1.4;
}

/* Entity link styles */
.entity-link {
    color: var(--bs-link-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--bs-link-color);
    position: relative;
}

.entity-link:hover {
    color: var(--bs-link-hover-color);
    border-bottom-style: solid;
}

.entity-link.entity-person {
    border-color: #0d6efd;
}

.entity-link.entity-company {
    border-color: #198754;
}

.entity-link.entity-group {
    border-color: #fd7e14;
}

.entity-link.entity-object {
    border-color: #6610f2;
}

/* Entity hover preview */
.entity-preview-popup {
    position: absolute;
    z-index: 1050;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    max-width: 350px;
    pointer-events: none;
}

.entity-preview-popup .entity-preview-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.entity-preview-popup .entity-preview-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--bs-body-color);
    margin-bottom: 4px;
}

.entity-preview-popup .entity-preview-title {
    font-size: 12px;
    color: var(--bs-secondary-color);
}

/* Responsive styles */
@media (max-width: 768px) {
    .network-graph-container {
        min-height: 300px;
    }

    .network-graph-controls {
        top: 5px;
        right: 5px;
        padding: 5px;
    }

    .network-graph-legend {
        bottom: 5px;
        left: 5px;
        padding: 5px;
        font-size: 10px;
    }

    .connection-path-container {
        min-height: 150px;
        padding: 10px;
    }

    .career-timeline-container {
        min-height: 200px;
        padding: 10px;
    }
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .network-graph-container,
[data-bs-theme="dark"] .network-graph-controls,
[data-bs-theme="dark"] .network-graph-legend,
[data-bs-theme="dark"] .entity-preview-popup {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Loading state */
.graph-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--bs-body-color);
    font-size: 14px;
}

.graph-loading .spinner-border {
    margin-right: 10px;
}

