.chart-container {
    width: 100%;
    max-height: 100px;
    margin: 5px 0;
    padding: 5px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#pca-variance-container {
    position: relative;
    margin: 5px auto 0 auto;
    max-width: 1000px;
    width: 90%;
    border-radius: 5px 5px 0 0;
    box-shadow: -2px 0 4px rgba(0,0,0,0.1), 2px 0 4px rgba(0,0,0,0.1), 0 -2px 4px rgba(0,0,0,0.1);
    clip-path: inset(-4px -4px 0 -4px);
}

/* Hide the triplet slider elements but preserve their CSS for compatibility */
#pca-triplet-container {
    display: none !important;
}

/* Make sure there's appropriate height for the chart */
.chart-wrapper {
    position: relative;
    width: 100%;
    min-height: 120px;
    margin-top: 3px;
}

#pca-variance-chart {
    width: 100%;
    height: 120px ;
}

#chart-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #f2f2f2;
    border-radius: 5px;
    overflow: hidden;
    /* margin-bottom: 5px; */
}

#chart-canvas {
    width: 100%;
    height: 100%;
}

/* PCA Variance Chart Slider Styles */
.slider-wrapper {
    position: relative;
    width: 100%;
    padding: 0 10px;
}

.pca-slider-container {
    position: relative;
    width: 100%;
    height: 20px;
}

.pca-slider-track {
    position: relative;
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    cursor: pointer;
    margin: 8px 0;
}

.pca-slider-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background-color: #4CAF50;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
    left: 0;
}

.pca-slider-handle:active {
    cursor: grabbing;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Slider label and value */
#pca-triplet-container label {
    font-weight: 500;
    margin-bottom: 5px;
}

#pca-triplet-value {
    font-size: 12px;
    color: #555;
    min-width: 200px;
    margin-bottom: 8px;
}

/* Slider itself */
#pca-triplet-slider {
    width: 100%;
    margin: 5px 0;
    position: relative;
}

/* Metric Dropdown Styles */
.metric-dropdown-container {
    position: absolute;
    top: 5px;
    right: 0px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 5px;
    background-color: rgba(248, 249, 250, 0.95);
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.metric-dropdown-label {
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    margin: 0;
    font-size: 11px;
}

.metric-dropdown-select {
    padding: 2px 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: white;
    cursor: pointer;
    font-size: 11px;
    min-width: 110px;
    max-width: 130px;
}

.metric-dropdown-select:hover {
    border-color: #999;
    background-color: #f8f9fa;
}

.metric-dropdown-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
} 

/* White border/stroke for chart text elements */
#pca-variance-chart text,
.chart-container text,
svg text {
    paint-order: stroke fill;
    stroke: white;
    stroke-width: 3px;
    stroke-linejoin: round;
    stroke-linecap: round;
    z-index: 10;
}

/* Ensure labels remain readable with white borders */
.chart-label,
.axis-label {
    text-shadow: 
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white,
        -2px 0 0 white,
        2px 0 0 white,
        0 -2px 0 white,
        0 2px 0 white;
}
