.distribution-analysis-container {
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 90%;
    
}

.column-select {
    margin: 10px 0;
    width: 100%;
}

.fetch-button {
    background-color: #43617e;
    color: white;
    border: none;
    padding: 10px 15px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

.fetch-button:hover {
    background-color: #0056b3;
}

.heatmap-container {
    /*margin-top: 20px;*/
    overflow: auto; /* Enable scrolling */
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    max-height: 500px; /* Adjust height limit */
    max-width: 100%; /* Ensure it fits inside the page */
    border: 1px solid #ddd;
    position: relative;
}




/* Correlation Matrix Header */
.distribution-header {
    background: #f8f9fa;  /* Light grey background */
    padding: 15px;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    color: #333; /* Dark text for contrast */
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Dataset Selection & Shape Display */
.dataset-selection-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    color: #333; /* Dark text for contrast */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

/* Dataset dropdown */
.dataset-dropdown {
    padding: 5px 10px;
    background: #e9ecef; /* Light grey background */
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
    color: #333; /* Ensures contrast */

}

/* Dataset Shape */
.dataset-shape {
    background: #e9ecef; /* Light grey background */
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: bold;
    border: 1px solid #ccc;
    color: #333; /* Dark text for visibility */
}



/* ✅ Column Selection Container - Adds padding & structure */
.column-selection-container {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ✅ Column Label */
.column-label {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

/* ✅ Improve column select UI */
.column-select {
    width: 100%;
    min-height: 40px;
    font-size: 1rem;
    border-radius: 5px;
}


.correlation-table {
    border-collapse: separate;
    border-spacing: 8px; /* Adds space between cells */
    text-align: center;
}



.correlation-table th, 
.correlation-table td {
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px; /* Soft rounded corners */
    transition: all 0.2s ease-in-out;
}


/* 🔥 Add subtle shadow effect to each cell */
.correlation-table td {
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}


/* 🖱️ Hover Effect */
.correlation-table td:hover {
    transform: scale(1.05); /* Slight increase in size */
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
}



/* 🏷️ Improve column headers */
.correlation-table th {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    position: sticky;
    top: 0;
    z-index: 2;
}



/* ✅ Column headers styling */
.correlation-table thead th {
    background-color: #f4f4f4;  /* Light mode header */
    color: #333; /* Dark text for light mode */
    font-size: 14px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 2px solid #ddd;
   

   
}



/* ✅ First column (Row headers) styling */
.correlation-table tbody tr td:first-child {
    background-color: #f4f4f4;  /* Light mode */
    color: #333;
    font-weight: bold;
    text-align: left;
    padding-left: 10px;
}




/* ✅ Add hover effect on column headers */
.correlation-table thead th:hover, 
.correlation-table tbody tr td:first-child:hover {
    background-color: #ddd;
    cursor: pointer;
    color: #fff;
    max-width: 250px;
    overflow: visible;
    white-space: normal;
}





/* ✅ Dark mode support */
.dark-mode .correlation-table thead th,
.dark-mode .correlation-table tbody tr td:first-child {
    background-color: #222;  /* Dark mode header */
    color: #fff; /* Light text for dark mode */
}

/* ✅ Hover effect for better interaction */
.correlation-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* ✅ Column hover effect */
.correlation-table tbody td:hover {
    background-color: rgba(255, 255, 255, 0.3);
}



/* ✅ Column highlighting when hovered */
.correlation-table tbody td:hover,
.correlation-table tbody td.highlighted,
.correlation-table thead th.highlighted {
    background-color: rgba(255, 255, 0, 0.5) !important; /* Yellow highlight */
    color: black !important;
}



/* ✅ Fix row headers while scrolling */
.correlation-table tbody td:first-child,
.correlation-table thead th:first-child {
    position: sticky;
    left: 0;
    background: #f8f9fa;
    z-index: 3;
    border-right: 2px solid #ddd;
}




/* ✅ Ensure table doesn't shrink */
.correlation-table {
    
    width: max-content;
    
}


/* ✅ Fix intersection of top-left corner */
.correlation-table thead th:first-child {
    z-index: 20;
}




/* ✅ Ensure table cells have padding */
.correlation-table th,
.correlation-table td {
    padding: 10px;
    text-align: center;
    white-space: nowrap; /* Prevents text breaking */
}








/* ✅ Scrollbar customization */
.heatmap-container::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.heatmap-container::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 5px;
}

.heatmap-container::-webkit-scrollbar-thumb:hover {
    background: #888;
}












/* ✅ Wrapper for Selected Columns */
.selected-columns-wrapper {
    max-width: 100%;
    background: #f4f4f4;
    padding: 5px;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* ✅ Scrollable container for long lists */
.selected-columns {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    max-width: 100%;
    padding: 5px;
}

.selected-columns.scrollable {
    max-height: 40px; /* Limit height */
    overflow-y: auto;
}

/* ✅ Column chips */
.column-chip {
    background: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    display: inline-block;
    white-space: nowrap;
}

/* ✅ Expand / Collapse button */
.expand-columns {
    color: #007bff;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    font-weight: bold;
}

/* ✅ Expanded View */
.expanded-columns {
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin-top: 5px;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
















.column-selection-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Adds space between elements */
    margin-bottom: 20px;
}

.column-dropdown-button {
    background: #43617e;
    color: gray;
    border: none;
    color: white;
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    width: 200px;
    font-weight: bold;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.column-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px; /* Start with a minimum width */
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 5px;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ccc;
    z-index: 1000;
    color: black; /* Default text color */
    resize: both;  /* ✅ Enable horizontal & vertical resizing */
}



/* Fix for Dark Mode */
body.dark-mode .column-dropdown {
    background-color: #333; /* Dark background */
    border: 1px solid #666;
    color: white; /* Light text for visibility */
}



/* Ensure Checkboxes Remain Visible */
.column-item input[type="checkbox"] {
    filter: brightness(1.2); /* Makes checkboxes more visible */
}


/* Ensure Hover Effect in Dark Mode */
body.dark-mode .column-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}


/* Fix for Text Labels in Dark Mode */
body.dark-mode .column-item {
    color: white; /* Ensures labels are visible */
}

.column-search {
    width: 90%;
    padding: 8px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.column-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
}

.column-item {
    display: flex;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    font-size: 14px;
}

.column-item input {
    margin-right: 8px;
}

.draggable-handle {
    cursor: grab;
    margin-right: 5px;
    font-size: 16px;
}





.close-dropdown {
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 10px;
    color: #333;
}

.close-dropdown:hover {
    color: red;
}



.column-dropdown-button:hover {
    background-color: #218838;
    transform: scale(1.05);
}
.column-dropdown-button:active {
    transform: scale(0.95);
}






/* ✅ Align Select Columns and Generate Heatmap on Same Line */
.column-selection-wrapper {
    display: flex;
    align-items: center;
    gap: 20px; /* Adds space between buttons */
    margin-bottom: 20px;
    /*justify-content: space-between; /* Push export buttons to the right */
    flex-wrap: wrap;
}



/* ✅ Improved "Generate Heatmap" Button */
.fetch-button {
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 10px;
    border: none;
    
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
}

.fetch-button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.fetch-button:active {
    transform: scale(0.95);
}



/* ✅ Card-like button container */
.button-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}





/* ✅ Ensure 'COLUMN' label matches other headers */
.correlation-table thead th:first-child {
    background-color: #f8f9fa;  /* Light mode header */
    color: #333; /* Dark text */
    font-size: 14px;
    text-transform: uppercase;
    text-align: center;
    border-right: 2px solid #ddd;
}

/* ✅ Ensure dark mode applies correctly */
body.dark-mode .correlation-table thead th:first-child {
    background-color: #222;  /* Dark mode background */
    color: #fff; /* Light text for dark mode */
    border-right: 2px solid #444;
}






/* ✅ Style for Export Buttons */
.export-buttons {
    display: flex;
    gap: 10px;
}



.export-button {
    background-color: gray;
    color: white;
    border: none;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
}

.export-button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.export-button:active {
    transform: scale(0.95);
}



/* ✅ Left section holds "Select Columns" and "Generate Heatmap" */
.left-section {
    display: flex;
    align-items: center;
    gap: 20px; /* Keeps buttons properly spaced */
}



/* ✅ Pushes Export Buttons to the far right */
.export-buttons {
    margin-left: auto; /* This will push it to the far right */
    display: flex;
    gap: 10px;
}














/* ✅ Correlation Method Card */
.method-selection-container {
    display: flex;
    align-items: center;
    margin-left: 20px;
    background: #ffffff;  /* ✅ Always white for visibility */
    padding: 10px 15px;  /* ✅ More padding for a proper card effect */
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #ccc;
    min-width: 200px; /* ✅ Widen the card so it doesn't look squeezed */
}

/* ✅ Ensure text is visible in dark mode */
.method-label {
    margin-right: 10px;
    font-weight: bold;
    color: #000000 !important; /* ✅ Force black text to avoid dark mode issue */
}

/* ✅ Dropdown Button */
.method-dropdown {
    position: relative;
    min-width: 180px; /* ✅ Increase dropdown width for better visibility */
}

.method-dropdown-button {
    background-color: #ffffff;  /* ✅ Ensure it's always white */
    border: 1px solid #ccc;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    min-width: 180px;  /* ✅ Make sure the button is wide enough */
    text-align: left;
    font-weight: bold;
    color: #000 !important; /* ✅ Ensure text is always visible */
}

/* ✅ Dropdown List */
.method-dropdown-list {
    position: absolute;
    top: 40px;
    left: 0;
    width: 220px;  /* ✅ Increased width for better visibility */
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

/* ✅ Method Options */
.method-item {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    color: #000; /* ✅ Ensure text is visible */
}

.method-item input {
    margin-right: 10px;
}

/* ✅ Fix Export Button Alignment */
.export-buttons {
    margin-left: auto !important;  /* ✅ Push export buttons to the extreme right */
    display: flex;
    gap: 10px;  /* ✅ Maintain space between buttons */
}










/* ✅ Scrollable Histogram Grid */
.histogram-scroll-container {
    width: 100%;
    height: 600px; /* Slightly increased height */
    overflow: auto; /* ✅ Forces both horizontal & vertical scrollbars */
    overflow-y: scroll; /* Always show vertical scrollbar */
    
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}


/* ✅ Scrollable Box Plot Grid */
.boxplot-scroll-container {
    width: 100%;
    height: 600px; /* Matches histogram height */
    overflow: auto; /* Ensures scrolling */
    overflow-y: scroll; 
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}


/* ✅ Grid Layout for Multiple Histograms */
.histogram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); /* Increased width */
    grid-auto-rows: minmax(450px, auto); /* Increased height */
    gap: 30px;
    justify-content: center;
    min-width: 100%;  /* ✅ Prevents content from squeezing */
    white-space: nowrap;

    
}


/* ✅ Grid Layout for Multiple Box Plots */
.boxplot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); /* Matches histogram */
    grid-auto-rows: minmax(450px, auto); /* Matches histogram */
    gap: 30px;
    justify-content: center;
    min-width: 100%;
    white-space: nowrap;
}


/* ✅ Individual Histogram Box */
.histogram-box {
    min-width: 500px;
    min-height: 450px;
    max-width: 550px; /* Prevents overflowing */
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid #ddd;
    overflow: hidden; /* Prevents content overflow */
}


/* ✅ Individual Box Plot Box */
.boxplot-box {
    min-width: 500px;
    min-height: 450px;
    max-width: 550px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid #ddd;
    overflow: hidden;
}


/* ✅ Title Positioned Inside the Box */
.histogram-header {
    width: 100%;
    padding: 8px;
    text-align: center;
    font-weight: bold;
    background: #f1f1f1;
    border-radius: 8px 8px 0 0;
}




/* ✅ Title Positioned Inside the Box for Box Plots */
.boxplot-header {
    width: 100%;
    padding: 8px;
    text-align: center;
    font-weight: bold;
    background: #f1f1f1;
    border-radius: 8px 8px 0 0;
}



/* ✅ Chart Container Ensuring KDE Axis is Visible */
.histogram-chart-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; /* Allows scrolling if chart is too large */
}



/* ✅ Chart Container for Box Plot */
.boxplot-chart-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; /* Allows scrolling if chart is too large */
}



/* ✅ Ensuring Scrollbars are Always Visible */
.histogram-scroll-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.histogram-scroll-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 5px;
}

.histogram-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}



/* Style Median Line (Dotted) */
.median-line {
    stroke-dasharray: 5, 5; /* Creates dotted effect */
    stroke-width: 4;

}













/* ✅ Truncate long titles & Show full title on hover */
.histogram-title {
    padding: 8px 15px;
    max-width: 90%;
    margin: auto;
    color: #333;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    display: block;
    position: relative;
   
}

/* ✅ Tooltip for full title on hover */
.histogram-title:hover::after {
    content: attr(data-full-title); /* Show full title */
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 12px;
    top: 150%; /* Adjusted for better positioning */
    left: 50%;
    transform: translateX(-50%);
    z-index: 999; /* Ensure it appears above everything */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease-in-out;
}

/* ✅ Ensure tooltip is hidden by default */
.histogram-title::after {
    opacity: 0;
    visibility: hidden;
}














/* ✅ Truncate long titles & Show full title on hover for Box Plot */
.boxplot-title {
    padding: 8px 15px;
    max-width: 90%;
    margin: auto;
    color: #333;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    display: block;
    position: relative;
}

/* ✅ Tooltip for full title on hover */
.boxplot-title:hover::after {
    content: attr(data-full-title); /* Show full title */
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 12px;
    top: 150%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease-in-out;
}

/* ✅ Ensure tooltip is hidden by default */
.boxplot-title::after {
    opacity: 0;
    visibility: hidden;
}









/* 📌 Style for the Boxplot Controls (Button Container) */
.boxplot-controls {
    display: flex;
    justify-content: center; /* Centers the buttons */
    gap: 12px; /* Adds equal spacing between buttons */
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    background-color: #f8f9fa; /* Light background for subtle contrast */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Soft shadow effect */
}

/* 📌 Universal Button Styles */
.boxplot-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    min-width: 120px;
}

/* 📌 Individual Button Colors */
.boxplot-btn:nth-child(1) { /* Rotate Plot */
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.boxplot-btn:nth-child(2) { /* Show Outliers */
    background-color: #28a745;
    color: white;
    font-weight: bold;
}

.boxplot-btn:nth-child(3) { /* Reset */
    background-color: #dc3545;
    color: white;
    font-weight: bold;
}

/* 📌 Hover Effects */
.boxplot-btn:hover {
    filter: brightness(90%);
    transform: scale(1.05);
}

/* 📌 Responsive Design */
@media (max-width: 768px) {
    .boxplot-controls {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .boxplot-btn {
        width: 100%;
    }
}












/* ✅ Scrollable QQ-Plot Grid */
.qqplot-scroll-container {
    width: 100%;
    height: 600px; /* Matches histogram and boxplot height */
    overflow: auto; /* Enables scrolling */
    overflow-y: scroll;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

/* ✅ Grid Layout for Multiple QQ-Plots */
.qqplot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); /* Matches histogram & box plot */
    grid-auto-rows: minmax(450px, auto);
    gap: 30px;
    justify-content: center;
    min-width: 100%;
    white-space: nowrap;
}

/* ✅ Individual QQ-Plot Box */
.qqplot-box {
    min-width: 450px;
    min-height: 450px;
    max-width: 500px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid #ddd;
    overflow: hidden;
}

/* ✅ QQ-Plot Toolbar (Contains View Stats button) */
.qqplot-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Aligns items to the right */
    padding: 5px 10px;
    background: #f1f1f1;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #ddd;
    width: 100%;
}

/* ✅ View Stats Button */
.view-stats-btn {
    
    color: black;
    border: none;
    padding: 6px 12px;
    font-size: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    margin-left: auto; /* Pushes the button to the right */
    margin-right: 10px;
    
}

.view-stats-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.view-stats-btn:active {
    transform: scale(0.95);
}

/* ✅ Title Positioned Inside the Box */
.qqplot-header {
    width: 100%;
    padding: 8px;
    text-align: center;
    font-weight: bold;
    background: #f1f1f1;
    border-radius: 8px 8px 0 0;
}

/* ✅ Truncate long titles & Show full title on hover */
.qqplot-title {
    padding: 8px 15px;
    max-width: 90%;
    margin: auto;
    color: #333;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    display: block;
    position: relative;
}

/* ✅ Tooltip for full title on hover */
.qqplot-title:hover::after {
    content: attr(data-full-title);
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 12px;
    top: 150%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease-in-out;
}

/* ✅ Ensure tooltip is hidden by default */
.qqplot-title::after {
    opacity: 0;
    visibility: hidden;
}

/* ✅ QQ-Plot Chart Container */
.qqplot-chart-container {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding-bottom: 60px; /* ✅ Extra space */
}

/* ✅ Normality Stats (Hidden by Default) */
.qqplot-stats {
    display: none; /* Hidden initially */
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
    text-align: left;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
    width: 95%;
    border: 1px solid #ddd;
}

/* ✅ When 'View Stats' is clicked, show the stats panel */
.qqplot-stats.visible {
    display: block; /* Makes it visible when toggled */
}

/* ✅ Headers in Normality Statistics */
.qqplot-stats h5 {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    text-transform: uppercase;
    color: #333;
}

/* ✅ List styling inside statistics section */
.qqplot-stats ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* ✅ Individual statistic list items */
.qqplot-stats li {
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid #ddd;
}

/* ✅ Last list item should not have a border */
.qqplot-stats li:last-child {
    border-bottom: none;
}

/* ✅ Scrollbar customization for QQ-Plot */
.qqplot-scroll-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.qqplot-scroll-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 5px;
}

.qqplot-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}









/* ✅ Stats Popup (Stays Inside Column Section & Adjusts for More Stats) */
.qqplot-stats-popup {
    position: absolute; /* Ensure it stays within its column */
    top: 50px; /* Adjust positioning to be below the toolbar */
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    width: 95%; /* Adjusts width dynamically */
    max-width: 520px; /* Allows space for additional stats */
    text-align: center;
    overflow: auto; /* Ensures no overflow issues */
    max-height: 450px; /* Prevents excessive growth */
}

/* ✅ Ensure Stats Popup Doesn't Overflow its Box */
.qqplot-box {
    position: relative; /* Keeps it within its column */
    overflow: visible; /* Ensures proper rendering */
}

/* ✅ Make Stats Table Scrollable If Needed */
.qqplot-stats-content {
    max-height: 270px; /* Prevents excessive height */
    overflow-y: auto; /* Enables vertical scrolling if content is too long */
    padding-bottom: 10px;
   
}

/* ✅ Column Label on Stats Table */
.stats-column-label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

/* ✅ Table Styling */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: var(--stats-text, #333); /* Auto-adapts */
    background: var(--stats-bg, white);
    margin-top: 10px;
}

/* ✅ Improve Readability */
.stats-table th, .stats-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

/* ✅ Header Styling */
.stats-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: center;
}

/* ✅ Prevents Table From Expanding Too Much */
.stats-table td {
    max-width: 150px;
    word-wrap: break-word;
}

/* ✅ Scrollbar Customization (Only Shows When Needed) */
.qqplot-stats-content::-webkit-scrollbar {
    width: 8px;
}

.qqplot-stats-content::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

.qqplot-stats-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* ✅ Close Button */
.close-stats-btn {
    background: #d9534f;
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: bold;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.close-stats-btn:hover {
    background-color: #c9302c;
}

/* ✅ Ensures Stats Table Appears Above Other Elements */
.qqplot-box {
    z-index: 1;
}



/* ✅ Download Button Styling */
.download-stats-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #007bff;
    position: absolute;
    top: 10px;
    left: 10px;
}

.download-stats-btn:hover {
    color: #0056b3;
}













/* ✅ Improve hover card appearance */
.qqplot-chart-container .hoverlayer .hovertext {
    background: rgba(0, 0, 0, 0.85) !important; /* Darker background for readability */
    color: #fff !important; /* White text for contrast */
    border-radius: 6px !important; /* Soft rounded corners */
    padding: 8px 12px !important; /* Add spacing inside the box */
    font-size: 14px !important; /* Readable text size */
    font-weight: bold !important; /* Make text bold */
}

/* ✅ Hover box title (e.g., "Sample Quantiles") */
.qqplot-chart-container .hoverlayer .hovertext b {
    color: #FFD700 !important; /* Gold color for the title */
    font-size: 15px !important;
    text-transform: uppercase; /* Make it stand out */
}

/* ✅ Hover box data styling (values inside the card) */
.qqplot-chart-container .hoverlayer .hovertext span {
    color: #ADD8E6 !important; /* Light blue for numbers */
}

/* ✅ Hover box border to match histogram styling */
.qqplot-chart-container .hoverlayer {
    border: 2px solid rgba(255, 255, 255, 0.6) !important; /* White semi-transparent border */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3) !important; /* Soft shadow */
}

/* ✅ Set different colors for each element in hover */
.qqplot-chart-container .hoverlayer .hovertext .scatterlayer:nth-child(1) {
    background: rgba(30, 144, 255, 0.8) !important; /* Sample Quantiles (Blue) */
}
.qqplot-chart-container .hoverlayer .hovertext .scatterlayer:nth-child(2) {
    background: rgba(50, 205, 50, 0.8) !important; /* OLS Fit Line (Green) */
}
.qqplot-chart-container .hoverlayer .hovertext .scatterlayer:nth-child(3) {
    background: rgba(255, 69, 0, 0.8) !important; /* Normality Line (Red) */
}





.log-warning {
    color: red;
    font-weight: bold;
    font-size: 14px;
    margin-top: 5px;
    text-align: center;
}


