/* Ensure info panel stays usable above the Sigma canvas */
#graph-info-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    left: auto;
    width: clamp(280px, 32vw, 380px);
    max-height: calc(100% - 2rem);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #E1E8ED;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    pointer-events: auto !important;
    z-index: 10;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

#graph-info-panel * {
    pointer-events: auto !important;
}

#graph-container {
    min-height: 0;
}

#graph-details {
    flex: 1 1 auto;
    overflow: visible;
    min-height: 200px;
}

@media (max-width: 1100px) {
    #graph-info-panel {
        width: min(380px, 48vw);
    }
}

@media (max-width: 640px), (max-height: 750px) {
    #graph-info-panel {
        position: fixed;
        inset: auto 0.75rem 0.75rem 0.75rem;
        max-height: 70vh;
    }
}

/* Loading spinner */
.graph-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
}

.graph-loading-spinner .bp5-spinner {
    margin: 0 auto 12px;
}

.graph-loading-spinner-text {
    color: #5C7080;
    font-size: 14px;
    font-weight: 500;
}

/* Graph statistics panel */
.graph-stats {
    font-size: 0.75rem;
    color: #5C7080;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #E1E8ED;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}

.graph-stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.graph-stats-label {
    color: #5C7080;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.graph-stats-value {
    font-weight: 600;
    color: #182026;
    font-size: 0.875rem;
}
