/* Study Design Concept Map Stylesheet
 * ====================================
 * Interactive concept map showing statistics study design concepts
 * Layout: Full-height network graph with overlay panels
 */

/* ===========================================
   RESET & BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

/* ===========================================
   TITLE (Top Center)
   =========================================== */
.title {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: bold;
    color: #1e293b;
    background-color: rgba(248, 250, 252, 0.95);
    padding: 6px 16px;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===========================================
   LEGEND (Upper Left)
   =========================================== */
.legend {
    position: absolute;
    top: 10px;
    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: 11px;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 6px;
    border: 2px solid rgba(0,0,0,0.3);
}

/* Legend colors matching node categories */
.color-blue { background-color: #3b82f6; }
.color-orange { background-color: #f97316; }
.color-green { background-color: #22c55e; }
.color-purple { background-color: #a855f7; }

/* ===========================================
   RIGHT PANEL (Controls & Info)
   =========================================== */
.right-panel {
    position: absolute;
    top: 50px;
    right: 10px;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

/* ===========================================
   INFO PANEL (Node Details)
   =========================================== */
.info-panel {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border-left: 4px solid #3b82f6;
    transition: border-color 0.3s ease;
}

.info-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 15px;
    color: #1e293b;
}

.info-content {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.info-placeholder {
    color: #94a3b8;
    font-style: italic;
    font-size: 12px;
}

.info-example {
    margin-top: 10px;
    padding: 8px 10px;
    background-color: #f1f5f9;
    border-radius: 6px;
    font-size: 12px;
}

.info-example-label {
    font-weight: bold;
    color: #64748b;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* ===========================================
   RELATED CONCEPTS PANEL
   =========================================== */
.related-panel {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.related-title {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 12px;
    color: #64748b;
}

.related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.related-tag {
    background-color: #e2e8f0;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
}

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

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

.status-text {
    font-size: 11px;
    line-height: 1.5;
    color: #64748b;
}

.status-text ul {
    margin-left: 16px;
    margin-top: 4px;
}

.status-text li {
    margin-bottom: 4px;
}

/* ===========================================
   CONTROL BUTTONS
   =========================================== */
.btn {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
    width: 100%;
}

.btn-secondary {
    background-color: #64748b;
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

/* ===========================================
   SAVE BUTTON (Lower Right - Editor Mode)
   =========================================== */
.btn-save {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: #ef4444;
    color: white;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
    transition: all 0.2s;
    z-index: 20;
    width: auto;
}

.btn-save:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

/* ===========================================
   PULSE ANIMATION FOR RELATED NODES
   =========================================== */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* ===========================================
   RESPONSIVE STYLES
   =========================================== */
@media (max-width: 700px) {
    .title {
        font-size: 14px;
        padding: 4px 10px;
    }

    .legend {
        padding: 6px 8px;
    }

    .legend-item {
        font-size: 10px;
    }

    .legend-color {
        width: 12px;
        height: 12px;
    }

    .right-panel {
        width: 220px;
    }

    .info-panel {
        padding: 10px;
    }

    .info-title {
        font-size: 13px;
    }

    .info-content {
        font-size: 11px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 500px) {
    .right-panel {
        width: 180px;
        right: 5px;
    }

    .legend {
        max-width: 120px;
    }
}
