/* Domain Cluster Explorer - vis-network MicroSim
 * ==============================================
 * 40-node graph across 4 domains. Cluster/expand demonstration.
 * Overlays (title, legend, right panel) are SIBLINGS of #network.
 */

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

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

/* ===========================================
   CONTAINER & CANVAS
   =========================================== */
.container {
    position: relative;
    width: 100%;
    height: 100vh;
}

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

/* ===========================================
   TITLE
   =========================================== */
.title {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: bold;
    color: black;
    background-color: aliceblue;
    padding: 4px 12px;
    white-space: nowrap;
    z-index: 10;
}

/* ===========================================
   LEGEND
   =========================================== */
.legend {
    position: absolute;
    top: 42px;
    left: 10px;
    padding: 6px 8px;
    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: 3px 0;
    font-size: 11px;
}

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

/* ===========================================
   RIGHT PANEL
   =========================================== */
.right-panel {
    position: absolute;
    top: 42px;
    right: 10px;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.96);
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn {
    padding: 9px 14px;
    font-size: 13px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary { background-color: #2196f3; color: white; }
.btn-primary:hover { background-color: #1976d2; }
.btn-primary:disabled { background-color: #90caf9; cursor: not-allowed; }

.btn-secondary { background-color: #757575; color: white; }
.btn-secondary:hover { background-color: #616161; }
.btn-secondary:disabled { background-color: #bdbdbd; cursor: not-allowed; }

.instruction {
    font-size: 11px;
    color: #555;
    line-height: 1.4;
    font-style: italic;
}

/* ===========================================
   STATUS PANEL
   =========================================== */
.status-panel {
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 2px solid #2196f3;
}

.status-title {
    font-weight: bold;
    font-size: 13px;
    color: #1976d2;
    margin-bottom: 6px;
}

.status-text {
    font-size: 12px;
    line-height: 1.5;
    color: #222;
}

/* ===========================================
   PER-DOMAIN COUNTS
   =========================================== */
.counts-panel {
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #333;
    flex-shrink: 0;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 640px) {
    .title { font-size: 14px; padding: 4px 8px; }
    .legend { padding: 4px 6px; }
    .legend-item { font-size: 10px; }
    .legend-color { width: 11px; height: 11px; }
    .right-panel { width: 190px; }
    .btn { padding: 7px 10px; font-size: 12px; }
    .status-text, .count-row, .instruction { font-size: 11px; }
}
