/* markov-d3-styles.css */

.viz-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
}

#graph-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

/* Link Preview (Dashed Gray) */
.link-preview {
    fill: none;
    stroke: #999;
    stroke-width: 3px;
    stroke-dasharray: 5 5;
    pointer-events: none;
}

/* Topology Toolbar */
.topology-toolbar {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border: 1px solid #eee;
}

.topo-btn-group {
    display: flex;
    gap: 5px;
}

.topo-btn {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.2s;
}

.topo-btn:hover {
    background: #f1f1f1;
}

.active-topo {
    background: #2c3e50 !important;
    color: white !important;
    border-color: #2c3e50 !important;
}

.topo-options {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 15px;
    border-left: 2px solid #ddd;
}

.control-label {
    font-size: 0.85em;
    font-weight: bold;
    color: #555;
    margin-right: 5px;
}

/* Sidebar */
.controls-sidebar {
    flex: 1;
    min-width: 320px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

/* --- Graph Elements --- */
.node-active circle.main-circle {
    /* Styles handled in JS now for selection/active split */
}

.link {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 2px;
    cursor: pointer;
    transition: stroke 0.2s;
}

.link:hover {
    stroke: #e74c3c;
}

/* Just color change, no width change */

.particle {
    stroke: #fff;
    stroke-width: 2px;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
    z-index: 100;
}

/* UI Elements */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.9em;
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(16px);
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-family: monospace;
    font-size: 0.85em;
    text-align: center;
}

.matrix-table td,
.matrix-table th {
    border: 1px solid #eee;
    padding: 4px;
}

.matrix-table th {
    background: #f9f9f9;
    vertical-align: middle;
}

.color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
}