/* Breakthrough Dependencies Map Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: aliceblue;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Network canvas fills the viewport */
#network {
    width: 100%;
    height: 100%;
}

/* Title overlay at top center */
.title {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 700;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 18px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    z-index: 10;
}

/* Legend at upper left */
.legend {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 6px;
    padding: 10px 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-size: 12px;
    z-index: 10;
}

.legend h4 {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.legend-label {
    color: #555;
}

/* Right panel with controls, sliders, and info */
.right-panel {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 240px;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-size: 13px;
    z-index: 10;
}

.right-panel h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Preset buttons */
.preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.preset-btn {
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-align: left;
}

.preset-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

/* Progress summary */
.progress-summary {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.6;
}

.progress-summary .achieved {
    font-weight: 600;
    color: #3F51B5;
}

.progress-summary .viability-status {
    font-weight: 700;
}

.viability-status.blocked {
    color: #E53935;
}

.viability-status.viable {
    color: #43A047;
}

/* Slider controls */
.slider-section {
    margin-bottom: 12px;
}

.slider-section h5 {
    margin: 0 0 6px 0;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.slider-row label {
    flex: 1;
    font-size: 11px;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.slider-row input[type="range"] {
    width: 70px;
    flex-shrink: 0;
    cursor: pointer;
}

.slider-row .slider-value {
    width: 32px;
    text-align: right;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    flex-shrink: 0;
}

/* Info panel for hover/click details */
.info-panel {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 4px;
}

.info-panel h5 {
    margin: 0 0 4px 0;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.info-panel p {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.info-panel .info-placeholder {
    color: #999;
    font-style: italic;
}

/* Edge tooltip styles */
.edge-tooltip {
    font-size: 12px;
    color: #555;
    margin-top: 6px;
    padding: 6px 8px;
    background: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #42A5F5;
}
