/* CLAUDE.md Network — Rule Execution Order
 * vis-network MicroSim stylesheet
 */

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

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

.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(-70%);
    font-size: 18px;
    font-weight: bold;
    color: #1a1a2e;
    background-color: rgba(240, 248, 255, 0.9);
    padding: 2px 12px;
    border-radius: 4px;
    z-index: 10;
}

/* Legend */
.legend {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 8px 10px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    z-index: 10;
    max-width: 190px;
}

.legend-title {
    font-size: 11px;
    font-weight: bold;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 2px 0;
    font-size: 11px;
}

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

.legend-glow {
    box-shadow: 0 0 6px rgba(255, 214, 0, 0.8);
}

.legend-sep {
    border-top: 1px solid #ddd;
    margin: 4px 0;
}

/* Right panel */
.right-panel {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 265px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
}

/* Selector panel */
.selector-panel {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.panel-title {
    font-size: 12px;
    font-weight: bold;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.computer-buttons, .project-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.project-buttons {
    margin-bottom: 0;
}

.comp-btn, .proj-btn {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    background: #f5f5f5;
    color: #555;
    transition: all 0.15s;
}

.comp-btn:hover, .proj-btn:hover {
    background: #e0e0e0;
}

.comp-btn.active {
    background: #5C6BC0;
    color: white;
    border-color: #3949AB;
}

.proj-btn.active {
    background: #78909C;
    color: white;
    border-color: #546E7A;
}

/* Controls */
.controls {
    display: flex;
    gap: 6px;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.step-counter {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    min-width: 100%;
    margin-bottom: 2px;
}

.btn {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #2962FF;
    color: white;
}

.btn-primary:hover {
    background-color: #0D47A1;
}

.btn-primary:disabled {
    background-color: #90CAF9;
    cursor: not-allowed;
}

.btn-primary.running {
    background-color: #E65100;
}

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

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

/* File contents panel */
.status-info {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.status-title {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 12px;
    color: #333;
}

.file-path {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 6px;
    word-break: break-all;
    display: none;
}

.file-path.visible {
    display: block;
}

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

/* Rules panel */
.rules-panel {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.rules-list {
    font-size: 11px;
    line-height: 1.6;
}

.rule-item {
    padding: 2px 0;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.rule-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}

.rule-layer-label {
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 6px;
    padding: 1px 4px;
    border-radius: 2px;
    color: white;
}

.rule-new {
    animation: ruleFlash 0.6s ease-out;
}

@keyframes ruleFlash {
    0% { background-color: #FFF9C4; }
    100% { background-color: transparent; }
}

/* Responsive */
@media (max-width: 700px) {
    .title { font-size: 14px; }
    .legend { max-width: 150px; }
    .legend-item { font-size: 9px; }
    .right-panel { width: 200px; }
    .btn { padding: 6px 10px; font-size: 11px; }
}
