/* Complete Organizational Graph Schema - MicroSim Styles
 * Layout: schema diagram on the left; legend, question picker and
 * details panel on the right. Aria color scheme.
 */

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

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

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ================================
   GRAPH AREA
   ================================ */
.graph-area {
    flex: 1;
    position: relative;
    min-width: 0;
    min-height: 0;
    border: 1px solid silver;
}

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

.title {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 19px;
    font-weight: bold;
    color: #1A237E;
    z-index: 5;
    pointer-events: none;
}

/* ================================
   RIGHT PANEL
   ================================ */
.right-panel {
    width: 252px;
    min-width: 252px;
    background-color: #ffffff;
    border-left: 3px solid #303F9F;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-section {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    overflow: hidden;
}

#details-section {
    flex: 1;
    min-height: 0;
}

.panel-header {
    background-color: #303F9F;
    color: white;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ================================
   LEGEND
   ================================ */
.legend-content {
    padding: 6px 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 6px;
    row-gap: 2px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #333;
    white-space: nowrap;
}

.legend-chip {
    display: inline-block;
    width: 18px;
    height: 12px;
    border-radius: 3px;
    border: 2px solid;
    flex-shrink: 0;
}

/* ================================
   QUESTION PICKER
   ================================ */
.question-content {
    padding: 6px 10px 8px 10px;
    font-size: 12px;
    color: #333;
}

.question-content label {
    display: block;
    margin-bottom: 4px;
}

#question-select {
    width: 100%;
    font-size: 12px;
    padding: 3px 2px;
    border: 1px solid #5C6BC0;
    border-radius: 4px;
    background-color: #FFF8E7;
    color: #222;
}

/* ================================
   DETAILS
   ================================ */
.details-content {
    flex: 1;
    padding: 8px 10px;
    overflow-y: auto;
    font-size: 12.5px;
    line-height: 1.4;
    color: #333;
}

.details-prompt p {
    margin-bottom: 6px;
    font-size: 12px;
    color: #444;
}

.detail-type {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 3px;
    background-color: rgba(48, 63, 159, 0.12);
    color: #1A237E;
}

.detail-type.edge {
    background-color: rgba(212, 136, 15, 0.18);
    color: #7A4A00;
}

.detail-type.question {
    background-color: #FFD700;
    color: #1A237E;
}

.detail-name {
    font-weight: 700;
    font-size: 15px;
    color: #222;
    margin-bottom: 3px;
    font-family: Menlo, Consolas, 'Liberation Mono', monospace;
}

.detail-name.plain {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13.5px;
    line-height: 1.3;
}

.detail-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    font-weight: 700;
    margin-top: 6px;
    margin-bottom: 1px;
}

.detail-text {
    font-size: 12px;
    color: #333;
}

.detail-text code,
.detail-mono {
    font-family: Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 11px;
    color: #303F9F;
}

.detail-cypher {
    padding: 6px 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    font-family: Menlo, Consolas, 'Liberation Mono', monospace;
    font-size: 10.5px;
    color: #303F9F;
    line-height: 1.35;
    white-space: pre-wrap;
    border-left: 3px solid #D4880F;
}

.detail-hint {
    margin-top: 6px;
    font-size: 11.5px;
    color: #7A4A00;
    font-style: italic;
}

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

div.vis-network div.vis-navigation div.vis-button {
    background-color: rgba(48, 63, 159, 0.12);
    border-radius: 4px;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 700px) {
    .right-panel {
        width: 215px;
        min-width: 215px;
    }
    .title {
        font-size: 15px;
    }
}

/* Narrow screens: diagram on top, question picker and details underneath.
   Zoom and pan with the navigation buttons. */
@media (max-width: 540px) {
    .container {
        flex-direction: column;
    }
    .graph-area {
        flex: 0 0 auto;
        height: calc(100vh - 230px);
    }
    .right-panel {
        width: 100%;
        min-width: 0;
        height: 230px;
        border-left: none;
        border-top: 3px solid #303F9F;
    }
    #legend-section {
        display: none;
    }
    .title {
        display: none;
    }
}
