/* Funding Partnership Fit Map - vis-network MicroSim stylesheet
   Full-bleed network canvas with an overlay title and a right-hand panel.
   Zero margin/padding so the sim fills its iframe exactly. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: aliceblue;
}

main {
    display: block;
    width: 100%;
    height: 100%;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Capped at CANVAS_HEIGHT so the layout never renders taller than the
       iframe it is embedded in. Keep this in sync with CANVAS_HEIGHT. */
    max-height: 640px;
}

#network {
    width: 100%;
    height: 100%;
    background-color: aliceblue;
}

.title {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: bold;
    color: black;
    background-color: aliceblue;
    padding: 2px 10px;
    white-space: nowrap;
    z-index: 10;
}

.right-panel {
    position: absolute;
    top: 44px;
    right: 10px;
    width: 230px;
    max-height: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary {
    background-color: #757575;
    color: white;
}

.btn-secondary:hover {
    background-color: #616161;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 11.5px;
}

.legend-note {
  background: transparent !important;
  border: none !important;
}

.legend-color {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    margin-right: 5px;
    border: 2px solid #333;
    flex-shrink: 0;
}

.info-panel {
    background-color: rgba(255, 255, 255, 0.97);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #4A90D9;
    overflow-y: auto;
}

.info-heading {
    font-weight: bold;
    font-size: 13px;
    color: #2E6BA8;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #dee2e6;
}

.info-label {
    font-size: 15px;
    font-weight: bold;
    color: #B87B12;
    margin-bottom: 4px;
}

.info-relation {
    font-size: 12px;
    font-style: italic;
    color: #555;
    margin-bottom: 8px;
}

#info-content p {
    font-size: 12.5px;
    line-height: 1.45;
    color: #333;
    margin-bottom: 8px;
}

.info-placeholder {
    color: #888;
    font-style: italic;
}

@media (max-width: 620px) {
    .title { font-size: 15px; }
    .right-panel { width: 190px; }
    .legend-item { font-size: 10px; }
}
