/* Communication Network Model - MicroSim Styles
 * Split view: aggregate model (left) and event-level model (right),
 * with a shared info bar and control row underneath.
 * Uses the Aria color scheme (indigo / amber / gold / champagne).
 */

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

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

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    border: 1px solid silver;
}

/* ================================
   TITLE
   ================================ */
.title-bar {
    flex: 0 0 30px;
    line-height: 30px;
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    color: #1A237E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}

/* ================================
   SPLIT PANELS
   ================================ */
.panels {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 0 6px;
}

.panel {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #C5CAE9;
    border-radius: 6px;
    overflow: hidden;
}

.panel-header {
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    background-color: #303F9F;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
}

.panel-name {
    font-size: 14px;
    font-weight: bold;
}

.panel-sub {
    font-size: 12px;
    color: #E8EAF6;
}

.count-badge {
    margin-left: auto;
    font-size: 12px;
    font-weight: bold;
    color: #1A237E;
    background-color: #FFD700;
    border-radius: 10px;
    padding: 2px 9px;
    display: none;
}

.count-badge.visible {
    display: inline-block;
}

.network-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
}

.network {
    width: 100%;
    height: 100%;
}

.panel-note {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 5px;
    text-align: center;
    font-size: 12px;
    color: #5D4037;
    pointer-events: none;
}

.panel-note.alert {
    background-color: #FFF8E7;
    border: 1px solid #D4880F;
    border-radius: 5px;
    padding: 3px 6px;
    color: #7A4A00;
}

/* ================================
   INFO BAR
   ================================ */
.info-bar {
    flex: 0 0 84px;
    margin: 6px 6px 0 6px;
    padding: 6px 10px;
    background-color: #FFF8E7;
    border: 1px solid #E0C48A;
    border-left: 4px solid #D4880F;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.4;
    color: #222;
    overflow: hidden;
}

.info-bar .info-title {
    font-weight: bold;
    color: #1A237E;
}

.info-bar code {
    font-family: Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 12px;
    color: #303F9F;
}

.info-bar .pair-count {
    display: inline-block;
    margin-right: 10px;
    white-space: nowrap;
}

.info-bar .pair-count b {
    color: #B06D0B;
}

/* ================================
   CONTROLS
   ================================ */
.controls {
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 10px;
    background-color: #ffffff;
    border-top: 1px solid silver;
    margin-top: 6px;
    font-size: 14px;
    color: #222;
}

.check-label {
    white-space: nowrap;
    cursor: pointer;
}

.check-label input {
    width: 16px;
    height: 16px;
    vertical-align: -2px;
    accent-color: #303F9F;
}

.slider-label {
    white-space: nowrap;
    min-width: 215px;
}

.slider-label span {
    font-weight: bold;
    color: #303F9F;
}

#time-window {
    flex: 1;
    min-width: 60px;
    accent-color: #D4880F;
}

/* ================================
   VIS-NETWORK TOOLTIP
   ================================ */
div.vis-tooltip {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    background-color: #FFF8E7;
    border: 1px solid #D4880F;
    border-radius: 6px;
    padding: 5px 8px;
    color: #222;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
}

/* ================================
   RESPONSIVE: stack the two models on narrow screens
   ================================ */
@media (max-width: 600px) {
    .title-bar {
        font-size: 14px;
    }
    .panels {
        flex-direction: column;
        gap: 4px;
    }
    .panel-header {
        flex: 0 0 22px;
    }
    .panel-sub {
        display: none;
    }
    .title-long {
        display: none;
    }
    .panel-note {
        display: none;
    }
    .info-bar {
        flex: 0 0 96px;
        font-size: 12px;
        line-height: 1.3;
        padding: 4px 8px;
    }
    .controls {
        gap: 8px;
        font-size: 12px;
    }
    .slider-label {
        min-width: 0;
    }
}
