/* Study Buddy Architecture Explorer - vis-network layout
 * Graph on the left, controls and info on the right.
 * Total height is fixed at 620px for iframe embedding (CANVAS_HEIGHT 620).
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    display: flex;
    width: 100%;
    height: 620px;
    border: 1px solid silver;
}

/* ---------- graph area ---------- */
.graph-area {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 100%;
}

#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: 0 6px;
    white-space: nowrap;
    z-index: 10;
}

/* ---------- right panel ---------- */
.right-panel {
    width: 300px;
    flex-shrink: 0;
    height: 100%;
    padding: 8px 10px;
    background-color: white;
    border-left: 1px solid silver;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;   /* fallback only: content fits at typical widths */
    font-size: 14px;
    line-height: 1.4;
}

.panel-box {
    background-color: ghostwhite;
    border: 1px solid lightsteelblue;
    border-radius: 8px;
    padding: 8px 10px;
}

.hidden {
    display: none;
}

#explore-panel, #quiz-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#explore-panel.hidden, #quiz-panel.hidden {
    display: none;
}

.mode-switch {
    display: flex;
    gap: 6px;
}

.btn {
    padding: 7px 14px;
    font-size: 15px;
    font-weight: bold;
    border: 1px solid silver;
    border-radius: 6px;
    cursor: pointer;
    background-color: whitesmoke;
    color: black;
}

.btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.mode-btn {
    flex: 1;
}

.mode-btn.active {
    background-color: royalblue;
    border-color: royalblue;
    color: white;
}

.btn-primary {
    background-color: royalblue;
    border-color: royalblue;
    color: white;
}

.btn-secondary {
    background-color: dimgray;
    border-color: dimgray;
    color: white;
}

.btn-small {
    margin-top: 4px;
    padding: 4px 10px;
    font-size: 13px;
}

.instruction {
    color: dimgray;
    font-style: italic;
}

.part-name {
    font-size: 17px;
    font-weight: bold;
    margin-top: 2px;
}

.part-group {
    color: steelblue;
    font-size: 13px;
    margin-bottom: 4px;
}

.part-job {
    margin-bottom: 6px;
}

.connections {
    font-size: 13px;
}

.connections ul {
    margin: 2px 0 0 16px;
}

.connections li {
    margin-bottom: 2px;
}

.box-title {
    font-weight: bold;
    margin-bottom: 2px;
}

.check-answer {
    margin-top: 4px;
    color: darkgreen;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

.quiz-note {
    font-size: 12px;
    color: dimgray;
    margin-bottom: 6px;
}

.quiz-job {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
}

.feedback {
    margin: 8px 0;
    padding: 0;
    border-radius: 6px;
}

.feedback.correct {
    padding: 8px;
    background-color: honeydew;
    border: 2px solid seagreen;
}

.feedback.incorrect {
    padding: 8px;
    background-color: seashell;
    border: 2px solid darkorange;
}

.feedback ul {
    margin: 4px 0 0 18px;
}

.quiz-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* narrow screens: slimmer panel */
@media (max-width: 640px) {
    .right-panel {
        width: 230px;
        font-size: 13px;
    }
    .title {
        font-size: 15px;
    }
}
