/* Base Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    min-height: 100vh;
    overflow: hidden;
}

/* Floating Panel Styles */
.floating-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    overflow: hidden;
    cursor: move;
}

.floating-panel.minimized {
    width: 150px;
    height: 40px;
    overflow: hidden;
}

.minimize-button {
    cursor: pointer;
    font-size: 18px;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.minimized .minimize-button {
    transform: rotate(180deg);
}

.panel-header {
    background: #2c3e50;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.panel-tab {
    padding: 10px 15px;
    cursor: pointer;
    flex: 1;
    text-align: center;
    border-bottom: 3px solid transparent;
}

.panel-tab.active {
    border-bottom-color: #3498db;
    font-weight: bold;
}

.panel-content {
    max-height: 800px;
    overflow-y: auto;
    padding: 10px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Compact Accordion Styles */
.compact-accordion {
    margin-bottom: 10px;
}

.compact-accordion-header {
    padding: 8px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compact-accordion-content {
    padding: 10px;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 4px 4px;
}
/* Compact Slider Styles */
.compact-slider-group {
    margin-bottom: 10px;
}

.compact-slider-row-no-flex {
    align-items: center;
    margin-bottom: 5px;
}
.compact-slider-row {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.compact-slider-label {
    flex: 1;
    font-size: 0.9em;
}

.compact-slider-controls {
    display: flex;
    align-items: center;
}

.compact-slider {
    flex: 1;
    margin: 0 10px;
}

/* Button Styles */
button {
    background-color:rgb(144, 238, 144);
    color: black;
    border: solid 1px;
    padding: 8px 12px;
    cursor: pointer;
    margin: 5px 0;
    border-radius: 4px;
    font-size: 0.9em;
}

.compact-button {
    padding: 5px 10px;
    margin: 0 2px;
    font-size: 0.8em;
}

button.active {
    background-color:rgb(255, 117, 107);
}

/* Stats Styling */
.compact-stats {
    font-size: 0.9em;
    line-height: 1.5;
}

.compact-stats li {
    margin-bottom: 5px;
}

/* Slider Controls from second CSS */
.slider-controls {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.slider-controls h4 {
    margin: 0 10px 0 0;
    font-size: 0.9em;
}

.slider-controls button {
    margin: 0 5px;
    padding: 5px 10px;
    font-size: 0.8em;
}

.slider-controls input[type="range"] {
    flex: 1;
    margin: 0 5px;
}

/* Content Div Styles */
.content-div {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

.graph-container {
    width: 100%;
    height: 100vh;
    flex: 4;
    position: relative;
}

.graph-container svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.detail-panel {
    width: 300px;
    padding: 10px;
    border-left: 1px solid #d1d1d1;
    background-color: #f9f9f9;
    overflow-y: auto;
}

/* Node and Link Styles */
.node {
    stroke: #fff;
    stroke-width: 1.5px;
    cursor: pointer;
}

.link {
    stroke: #999;
    stroke-opacity: 0.6;
}

.active {
    font-weight: bold;
}

/* Slider Container Styles */
.slider-container {
    margin-bottom: 20px;
    padding: 10px; 
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
}

.slider-container.active {
    background-color: #ffffff;
}

.title-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.slider-title {
    font-weight: bold;
    margin-right: 10px; 
}

.slider-input {
    width: 60px;
    text-align: right;
    padding: 5px; 
    border: 1px solid #ccc;
    border-radius: 3px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0; 
}

.slider {
    flex-grow: 1;
    padding: 5px 0;
}

.slider-button {
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px; 
    background-color: #4CAF50;
}

.slider-button:hover {
    background-color: #45a049;
}

.slider-min-max {
    font-size: 0.9em;
    color: #666;
    padding: 0 5px;
}

.color-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.color-container.active {
    background-color: #ffffff;
}

.color-title {
    margin-right: 10px; 
}

.color-dropdown {
    flex-grow: 1; 
    max-width: 150px; 
}

.node-popup {
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 200px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    cursor: move;
    padding-bottom: 5px;
    border-bottom: 1px solid #eaeaea;
}

.popup-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.popup-close {
    border: none;
    background: #f44336;
    color: white;
    cursor: pointer;
    font-size: 14px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.popup-close:hover {
    background: #d32f2f;
}

.popup-content {
    font-size: 14px;
}

.popup-pin-container {
    display: flex;
    justify-content: end;
}

.popup-pin {
    background-color: rgb(226, 224, 224);
    height: 25px;
    line-height: 8px;
    text-align: center;
    cursor: pointer;
}

.metric-row {
    margin: 5px 0;
    line-height: 1.4;
}

.metric-description {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.node.pinned {
    /* stroke:rgb(104, 104, 104);
    stroke-dasharray: 5,5;
    stroke-width: 3px; */
    fill: #b82222;
}

#search-tab {
    padding: 0;
    overflow: hidden;
}

.search-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 500px;
    width: 100%;
    box-sizing: border-box;
}

.search-bar-container {
    position: relative;
    margin-bottom: 8px;
}

.search-input {
    width: 100%;
    padding: 6px 30px 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 12px;
}

.search-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.select-controls, .pagination-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.control-btn, .page-btn {
    padding: 4px 8px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
}

.control-btn:hover, .page-btn:hover {
    background-color: #e0e0e0;
}

.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#page-indicator {
    font-size: 11px;
    white-space: nowrap;
}

.node-list-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 8px;
    max-height: 300px;
}

.node-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.node-table th {
    position: sticky;
    top: 0;
    background-color: #f5f5f5;
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
    z-index: 1;
}

.node-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
}

.node-table tr:hover {
    background-color: #f9f9f9;
}

.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.action-btn {
    background-color: #4a86e8;
    color: white;
    padding: 5px 8px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    flex: 1;
    white-space: nowrap;
    text-align: center;
}

.action-btn:hover {
    opacity: 0.9;
}

/* Responsive adjustments for smaller panel widths */
@media (max-width: 320px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .search-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pagination-controls {
        margin-top: 4px;
    }
}

.action-btn {
    min-width: 80px; 
}
.node.filtered-out {
    opacity: 0.1;
    transition: opacity 0.2s ease;
}
.action-btn.active {
    font-weight: bold;
}
