/* Label Anatomy Explorer - vis-network MicroSim
   Force-directed clusters: gold concept nodes with orbiting gray alt-labels. */

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

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

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 450px;
}

/* Full-canvas network; overlays are absolute siblings (never children). */
#network {
    width: 100%;
    height: 100%;
    background-color: aliceblue;
}

/* ===== Title ===== */
.title {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: bold;
    color: #1a3a6c;
    background-color: rgba(240, 248, 255, 0.85);
    padding: 2px 12px;
    border-radius: 6px;
    z-index: 10;
}

/* ===== Legend ===== */
.legend {
    position: absolute;
    top: 44px;
    left: 10px;
    padding: 8px 10px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 4px 0;
    font-size: 12px;
}

.swatch {
    width: 16px;
    height: 16px;
    margin-right: 7px;
    border: 2px solid #333;
    flex: 0 0 auto;
}

.swatch.concept {
    background-color: #ffce54;
    border-color: #f6a623;
    border-radius: 50%;
}

.swatch.alt {
    background-color: #e0e0e0;
    border-color: #9e9e9e;
    border-radius: 4px;
}

.swatch-line {
    width: 20px;
    height: 0;
    margin-right: 7px;
    border-top: 2px dashed #9e9e9e;
    flex: 0 0 auto;
}

.caution {
    color: #e65100;
    font-size: 16px;
    margin-right: 7px;
    flex: 0 0 auto;
}

/* ===== Right side panel (infobox on click) ===== */
.right-panel {
    position: absolute;
    top: 44px;
    right: 10px;
    width: 270px;
    z-index: 10;
}

.infobox {
    background-color: rgba(255, 255, 255, 0.97);
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #f6a623;
}

.infobox.concept-note { border-left-color: #f6a623; }
.infobox.alt-note { border-left-color: #9e9e9e; }
.infobox.caution-note { border-left-color: #e65100; }

.infobox-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
    color: #1a3a6c;
}

.infobox-content {
    font-size: 12.5px;
    line-height: 1.55;
}

.infobox .caveat {
    display: block;
    margin-top: 10px;
    padding: 8px 10px;
    background-color: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 6px;
    font-size: 12px;
    color: #7a3b00;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .title { font-size: 16px; }
    .right-panel { width: 200px; }
    .legend { font-size: 10px; }
    .legend-item { font-size: 10px; }
}
