/* styles.css */

/* Import Inter font from Google Fonts - try alternative URL */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Test with Roboto font as well */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap');

/* Debug: Test if Inter font is loaded */
.test-inter-font {
    font-family: "Inter", sans-serif !important;
    font-weight: 400 !important;
}

/* Test with Roboto font */
.test-roboto-font {
    font-family: "Roboto", sans-serif !important;
    font-weight: 400 !important;
}

/* Force Inter font on all elements with maximum specificity */
html *,
html body *,
body *,
div, span, p, h1, h2, h3, h4, h5, h6, a, button, input, textarea, select, label {
    font-family: "Inter", sans-serif !important;
}

/* Global font application with higher specificity */
html * {
    font-family: "Inter", sans-serif !important;
}

html body {
    font-family: "Inter", sans-serif !important;
}

body {
    font-family: "Inter", sans-serif !important;
    margin: 0;
    padding: 0;
    background: #f8f9fa; 
    color: #343a40; 
}

/* Ensure headings use Inter font */
h1, h2, h3, h4, h5, h6 {
    font-family: "Inter", sans-serif !important;
}

/* Ensure form elements use Inter font */
input, textarea, select, button {
    font-family: "Inter", sans-serif !important;
}

/* Bootstrap component font overrides */
.navbar, .navbar-brand, .btn, .form-control, .card, .card-header, .card-body, .card-title, .card-text {
    font-family: "Inter", sans-serif !important;
}

/* Select component font overrides */
.Select-control, .Select-placeholder, .Select-value-label, .Select-arrow-zone, .Select-arrow, .Select-menu-outer, .Select-menu, .Select-option {
    font-family: "Inter", sans-serif !important;
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Navbar styling */
.navbar {
    background-color: #007bff; 
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.navbar-brand {
    color: #ffffff; 
    font-weight: bold;
    font-size: 23.5px;
}

.navbar-brand:hover {
    color: #ffffff;
    text-decoration: none;
}

/* Jumbotron styling */
.jumbotron {
    background: linear-gradient(to bottom, #007bff, #00bfff); 
    padding: 64px 32px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 120px 20px 20px 20px; 
    color: #ffffff; 
}

.jumbotron h1 {
    font-size: 47.5px;
    font-weight: bold;
    margin-bottom: 16px;
}

.jumbotron p {
    font-size: 18.5px;
    line-height: 1.8;
}

/* Counts container styling */
.counts-container {
    background: #ffffff; 
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 20px 20px 40px 20px;
}

.count-box {
    text-align: center;
    padding: 20px;
    background-color: #f0f0f0; 
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.count-box h5 {
    font-size: 28.3px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #007bff; 
}

.count-box p {
    font-size: 39.5px;
    font-weight: bold;
    margin: 0;
    color: #343a40;
}

/* Main content container */
.main-content {
    margin: 280px 20px 20px 20px; 
}

/* Sidebar styling */
.sidebar {
    right: 0;
    background: #ffffff; 
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    overflow-y: auto;
    max-height: 95vh;
    padding: 0px !important;
}

.sidebar-break-line {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    margin-bottom: 8px;
    margin-left: 0px;
}

.filter-section {
    margin-top: -5px;
    margin-left: 0px;
    margin-right: 0px;
    margin-bottom: -6px;
}

.filter-heading {
    font-size: 15.5px !important;
    font-weight: bold !important;
    line-height: 24px !important;
    padding-top: 6px;
    padding-bottom: 6px;
    padding-left: 0px;
}
.filter-section-default {
    font-size: 13.5px;
    font-weight: bold;
    float:right;
    padding-top: 2px;
    padding-right: 2px;
}
.filter-section-image {
    margin-top: 1px;
    margin-right: 2px;
    width: 18px;
    float:left;
}
.filter-section-card {
    height: 32px;
    position: absolute;
    right: 12px;
    background: #ffffff; 
    border-radius: 8px;
    float:right;
    width: 140px;
    font-size: 13.5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 6px;
    padding-right: 6px;
    gap: 8px;
    font-weight: bold;
}

.filter-section-card:hover {
    background-color: #f0f0f0;
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.sidebar-label {
    font-size: 13.5px;
    font-weight: 500;
    margin-top: 8px;
    margin-bottom: 4px;
    color: #00000080;
    line-height: 16px;
    letter-spacing: 0%;
}
/* Sidebar headings */
.sidebar-heading {
    font-size: 15.5px;
    font-weight: bold;
    margin-top: 12px;
    margin-bottom: 4px;
    color: #000000CC;
    line-height: 20px;
    letter-spacing: 0.6%;
}
/* Radio items styling */
.radio-items-inline {
    margin-bottom: 15px;
    margin-left: 5px;
    display: flex;
    gap: 25px;
}

.radio-items-block {
    margin-bottom: 15px;
    margin-left: 5px;
}

/* Dropdown styling */
.sidebar-dropdown {
    margin-bottom: 10px;
}

/* Clean dropdown text wrapping solution for sidebar-dropdown */
.sidebar-dropdown .Select-menu-outer .Select-menu .Select-option {
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
    padding: 8px 12px !important;
    min-height: 40px !important;
    height: auto !important;
    display: block !important;
    overflow: visible !important;
    text-overflow: initial !important;
    max-width: 100% !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #333 !important;
    background-color: transparent !important;
    border: none !important;
    margin: 2px 0 !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

/* Text content within options */
.sidebar-dropdown .Select-option .Select-option-label,
.sidebar-dropdown .Select-option span,
.sidebar-dropdown .Select-option div {
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
    text-overflow: initial !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hover and selection states */
.sidebar-dropdown .Select-menu-outer .Select-menu .Select-option:hover {
    background-color: #e3f2fd !important;
    border-radius: 4px !important;
}

.sidebar-dropdown .Select-menu-outer .Select-menu .Select-option.is-focused {
    background-color: #e3f2fd !important;
    border-radius: 4px !important;
}

.sidebar-dropdown .Select-menu-outer .Select-menu .Select-option.is-selected {
    background-color: #bbdefb !important;
    border-radius: 4px !important;
}

/* Menu container */
.sidebar-dropdown .Select-menu-outer {
    min-width: 300px !important;
    max-width: 500px !important;
    width: auto !important;
    z-index: 9999 !important;
}

.sidebar-dropdown .Select-menu-outer .Select-menu {
    padding: 8px 4px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Slider label styling */
.slider-label {
    display: none !important;
    text-align: center;
    margin-top: 10px;
}

/* Button styling */
.add-plot-button {
    margin-top: 2px;
    width: 100%;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0%;
    background-color: #062D42;
    color: #ffffff;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 4px;
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 6px;
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-plot-button img {
    margin-right: 8px;
    width: 16px;
    height: 16px;
}

.add-plot-button:hover {
    background-color: #062D42;
    color: #ffffff;
}

.plot-list-container {
    margin-top: 3px;
}


.sidebar .rc-slider-tooltip-inner {
    background-color: #062D42;
    color: #ffffff;
    gap: 8px;
    padding: 4px;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 16px;
}

.rc-slider-handle
{
    background-color: #1B7AAA;
    border: 2px solid #1B7AAA;
}

.rc-slider-handle:hover {
    border: 2px solid #1B7AAA;
}

.rc-slider-handle-dragging {
    border-color: #062D42 !important;
    box-shadow: 0 0 0 1px #062D42 !important;

}

.rc-slider-mark-text{
    font-size: 11.5px;
    font-weight: 400;
    line-height: 16px;
    color: #000000CC;
}
.rc-slider-track {
    background-color: #1B7AAA;
}

.Select--multi .Select-value {
    margin: 2px 2px 2px 2px !important;
    background-color: #062D42;
    color: #ffffff;
    padding: 2px;
    padding-left: 4px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 16px;
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
}

.Select--multi .Select-multi-value-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 90%;
}

.Select--multi .Select-value-icon {
    color: #062D42;
    border-radius: 50%;
    background-color: #ffffff;
    width: 14px !important;
    height: 14px !important;
    font-size: 13.5px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 2px;
    margin-right: 2px;
    padding: 0;
    position: relative;
}

.Select--multi .Select-value-icon span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.Select--multi .Select-value-label {
    padding-right: 4px;
}

.Select--multi .Select-value-icon:hover {
    background-color: #ffffff;
    color: #1B7AAA;
    cursor: pointer;
}

.Select--multi .Select-clear-zone {
    pointer-events: none;
}

.Select-clear {
    border-radius: 50%;
    background-color: #000000CC;
    font-size: 13.5px;
    line-height: 16px;
    color: #ffffff;
    width: 16px;
    height: 16px;
    cursor: pointer;
    pointer-events: auto;
    margin-right: 4px;
    padding-right: 1px;
}
.Select-clear:hover {
    background-color: #000000CC;
    color: #ffffff;
}

.Select-control {
    align-items: center !important;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 11.5px;
    font-weight: 400;
    background-color: #0000000D;
    padding-left: 2px;
}
.Select-control:hover {
    border: 1px solid rgba(0, 0, 0, 0.2);
}
.Select-placeholder{
    padding: 12px;
    color: #000000CC;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0%;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: left;
    width: 100%;
    text-align: left;
}

.Select-value {
    padding: 10px;
    color: #000000CC;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0%;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: left;
    width: auto;
    text-align: left;
}
/* Card styling */

.mt--16{
    margin-top: -16px !important;
}
.mt--30{
    margin-top: -30px !important;
}
.mt-16{
    margin-top: 16px !important;
}
.mt-8{
    margin-top: 8px !important;
}
.mt-4{
    margin-top: 4px !important;
}
.mt-26{
    margin-top: 26px !important;
}

.mb-16{
    margin-bottom:16px !important;
}
.mb-20{
    margin-bottom:20px !important;
}
.mb-40{
    margin-bottom:40px !important;
}
.mb-50{
    margin-bottom:50px !important;
}
.mb-36{
    margin-bottom:36px !important;
}

.h-80{
    height: 80vh !important;
}
.card-row{
    margin: 16px 4px 16px 4px;
}

.card-row-1{
    margin: 8px 4px 8px 4px;
}

.card {
    background: #ffffff; 
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 16px;
}

.card-col{
    padding: 0px 8px 0px 8px;
}

.card-col-1{
    padding: 8px 8px 8px 8px;
}

.histogram-kde-row {
    padding-top: 16px;
    padding-bottom: 16px;
    margin-bottom: -8px;
    display: flex;
    justify-content: space-between;
    margin-left: 12px;
    position: fixed;
    z-index: 1001;
    background-color: #f8f9fa;
    width: calc(83.33% - 30px); 
}

.histogram-kde-spacer {
    height: 76px;
    width: 100%;
    display: block;
    margin-bottom: 10px;
}

.card-histogram-kde {
    background: #ffffff; 
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 49.5% !important;
}

.card-header-histogram-kde{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 17.5px !important;
    font-weight: 500 !important;
    background-color: #062D42; 
    color: #ffffff; 
    border-radius: 4px !important;
    border-color: rgba(0, 0, 0, 0.1);
    padding: 12px;
    margin: 6px 6px 6px 6px !important;
}

.correlation-row {
    justify-content: space-between;
    margin-left: 15px;
    z-index: 1001;
    position: fixed;
    background-color: #f8f9fa;
    padding-top: 16px;
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    margin-left: 12px;
    width: calc(83.33% - 30px); 
}

.card-correlation {
    background: #ffffff; 
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 49.5% !important;
    margin-right: 16px;
}

.card-header-correlation{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 17.5px !important;
    font-weight: 600 !important;
    background-color: #062D42;
    color: #ffffff;
    border-radius: 4px !important;
    border-color: rgba(0, 0, 0, 0.1);
    padding: 12px;
    margin: 6px 6px 6px 6px !important;
}

.card-header {
    position: relative;
    min-height: 50px;
    background-color: #2298D5; 
    color: #ffffff; /* White text color */
    padding: 12px;
    border-radius: 4px !important;
    border-color: rgba(0, 0, 0, 0.1);
    gap: 8px;
    z-index: 9;
}

.card-title {
    font-size: 17px !important;
    font-weight: 500;
    margin-bottom: 0;
    letter-spacing: -1.4%;
    line-height: 24px;
}

.card-body {
    padding: 16px;
    min-height: 400px; 
}

#twodhistogram-plots-container .card-body,
#inventory-plots-container .card-body{
    min-height: 300px !important;
}

.card-text {
    background: #ffffff; 
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 16px;
    margin: 16px;
    font-size: 13.5px;
    font-weight: 400;
    color: #000000CC;
}

/* Main content area styling */
.main-content-area {
    overflow-y: hidden;
}

.container-fluid {
    padding: 0 !important;
    --bs-gutter-x: 0 !important;

}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        display: none; 
    }

    .main-content {
        margin-top: 200px; 
    }

    .jumbotron {
        margin-top: 160px; 
    }
}

.accordion {
    border-radius: 0px !important;
    --bs-accordion-border-width: 0px !important;
    --bs-accordion-border-radius: 0px !important;
}

.accordion-body {
    padding: 12px !important;
}

.accordion-header {
    border-radius: 0px !important;
}

.accordion-button {
    display: none !important;
}

/* Auth and data status styling */
#auth-status, #data-status {
    margin: 10px;
    display: none;
    font-weight: bold;
}

/* Main container initial state */
#main-container {
    display: none;
    min-height: 100vh;
}

/* Reset and rewrite the radio button styling completely */

/* Common radio button styling */
.common-selector {
    display: flex;
    text-align: left;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    height: 32px;
}

/* Style for the form-check in dbc RadioItems */
.common-selector .form-check {
    flex: 1;
    margin: 0;
    padding: 0;
    position: relative;
    border-right: 1px solid #dee2e6;
    height: 32px;
}

/* Remove border from last item */
.common-selector .form-check:last-child {
    border-right: none;
}

/* Style for the labels in dbc RadioItems */
.common-selector .form-check-label {
    width: 100%;
    padding: 8px 0;
    background-color: #ffffff;
    cursor: pointer;
    text-align: center;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 16px;
    display: block;
}

/* Hide the actual radio input */
.common-selector .form-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Hover state */
.common-selector .form-check-label:hover {
    background-color: #0000000D;
}

/* Target the checked state directly */
.common-selector .form-check-input:checked + .form-check-label {
    background-color: #0000000D !important;
    color: #000000CC !important;
    font-weight: 500 !important;
}

/* Fluid Phase Selector Styling */
.fluid-phase-selector {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.fluid-phase-selector .form-check {
    height: 32px;
    margin-bottom: 8px;
    padding: 0;
    position: relative;
}

.fluid-phase-selector .form-check-label {
    width: 100%;
    padding: 8px 12px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 16px;
    display: block;
}

.fluid-phase-selector .form-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.fluid-phase-selector .form-check-label:hover {
    background-color: #0000000D;
}

.fluid-phase-selector .form-check-input:checked + .form-check-label {
    background-color: #0000000D !important;
}

.fluid-phase-selector .form-check-input:checked + .form-check-label::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 60%;
    transform: translateY(-50%);
    background-image: url('icons/tick.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: 16px;
    height: 16px;
    display: inline-block;
}

/* DASH SPECIFIC SELECTORS - Target the actual structure Dash creates */
/* This targets the label when its corresponding radio is checked */
.common-selector [type="radio"]:checked ~ label,
.common-selector label[data-checked="true"],
.common-selector .radio-checked {
    width: 100%;
    background-color: #0000000D !important;
    color: #000000CC !important;
    font-weight: 500 !important;
}

/* Target any element with checked attribute in the common-selector */
.common-selector [checked],
.common-selector [aria-checked="true"] {
    background-color: #0000000D !important;
    color: #000000CC !important;
    font-weight: 500 !important;
}

/* Target any element with the active class that Dash might be using */
[class*="RadioItem"][class*="active"],
[class*="radio"][class*="active"],
[class*="RadioItem--"][class*="checked"],
[class*="radio--"][class*="checked"] {
    background-color: #0000000D !important;
    color: #000000CC !important;
    font-weight: 500 !important;
}

/* Target the specific structure Dash creates for RadioItems */
.dash-radio-items label {
    cursor: pointer;
}
.radio-selected {
    background-color: #0000000D !important;
    color: #000000CC !important;
    font-weight: 500 !important;
}

#box-plot-section-container .js-plotly-plot .plotly .main-svg{
    margin-top: 20px !important;
}

#box-plot-section-container .card-body{
    min-height: 300px !important;
}

#bubble-plot-container .card-body{
    max-height: 500px !important;
}

#bubble-plot-container .js-plotly-plot .plotly .main-svg{
    margin-top: 10px !important;
}

.js-plotly-plot .plotly .main-svg {
    background-color: transparent !important;
    margin-top: 50px;
}

.js-plotly-plot .plotly .user-select-none {
    margin-top: -60px;
}

/* Plotly modebar styling - make all icons visible */
.js-plotly-plot .plotly .modebar {
    position: absolute;
    top: 2px;
    right: 2px;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

/* Use more specific selectors and !important to override Plotly's default styles */
.js-plotly-plot .plotly .modebar:hover,
.js-plotly-plot .plotly .modebar:hover .modebar-group,
.js-plotly-plot .plotly .modebar-group:hover {
    background-color: transparent !important;
}

/* Remove transition effect */
.js-plotly-plot .plotly .ease-bg {
    transition: none !important;
    background-color: #2298D5 !important;
}

.modebar--hover .ease-bg,
.modebar--hover .modebar-group {
    background-color: transparent !important;
}

.js-plotly-plot .plotly .ease-bg:hover,
.js-plotly-plot .plotly .modebar-group:hover {
    background-color: transparent !important;
}

/* Make all modebar icons white with improved visibility */
.js-plotly-plot .plotly .modebar-btn path {
    fill: white !important;
    stroke: black !important;
    stroke-width: 0.3px !important;
}

/* Make modebar buttons more visible with dark background */
.js-plotly-plot .plotly .modebar-btn {
    border-radius: 4px;
    margin-left: 3px;
    padding: 3px !important;
    opacity: 1 !important;
    background-color: #2298D5 !important;
}

/* Custom hover effect for modebar buttons - override the light blue */
.js-plotly-plot .plotly .modebar-btn:hover {
    background-color: #2298D5 !important;
}

/* Override any default hover styles */
.js-plotly-plot .plotly .modebar-btn:hover path {
    fill: #ffffff !important;
}

/* Remove any default hover background */
.js-plotly-plot .plotly .modebar-btn.active,
.js-plotly-plot .plotly .modebar-btn:hover {
    background-color: #2298D5 !important;
}

/* Ensure modebar is always on top */
.js-plotly-plot .plotly .modebar {
    z-index: 1000 !important;
}

/* Force display of all modebar groups */
.js-plotly-plot .plotly .modebar-group {
    display: flex !important;
    opacity: 1 !important;
    background-color: transparent !important;
}

/* Override any default hover styles for the SVG elements */
.js-plotly-plot .plotly .modebar-btn svg:hover {
    fill: #ffffff !important;
}


.default-plot{
    width: 100%;
    display: flex;
    padding: 4px;
    height: auto;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 11.5px;
    font-weight: 400;
    color: #000000CC;
    background-color: rgba(0, 0, 0, 0.05);
}

.default-plot-btn{
    position: absolute;
    right: 12px;
    text-decoration: none;
    border: none !important;
    font-size: 11.5px;
    color: #000000CC !important;
}


.bubble-plot-graph{
    margin-top: -50px;
    margin-bottom: 50px;
    height: 60vh;
    width: 100%;
}

.treemap-graph{
    margin-top: -50px;
    height: 80vh;
    width: 100%;
}

.inventory-plot-graph{
    margin-top: -50px;
    height: 60vh;
    width: 100%;
    margin-bottom: -40px;
}

.twodhistogram-graph{
    margin-top: -50px;
    height: 60vh;
    width: 100%;
    margin-bottom: -50px;
}

.twodhistogram-graph .js-plotly-plot .plotly .main-svg{
    margin-top: -20px !important;
}

.box-plot-graph .js-plotly-plot .plotly .main-svg{
    margin-top: 20px !important;
}

.box-plot-graph .js-plotly-plot .plotly .main-svg{
    margin-top: 20px !important;
}
.three-d-plot-graph .js-plotly-plot .plotly .main-svg{
    margin-top: 15px !important;
}
.pearson-graph .js-plotly-plot .plotly .main-svg{
    margin-top: -20px !important;
}

.spearman-graph .js-plotly-plot .plotly .main-svg{
    margin-top: -20px !important;
}

.inventory-plot-graph .js-plotly-plot .plotly .main-svg{
    margin-top: -20px !important;
}

.treemap-graph .js-plotly-plot .plotly .main-svg{
    margin-top: 50px !important;
}

.depth-graph .js-plotly-plot .plotly .main-svg{
    margin-top: 40px !important;
}

.depth-graph .js-plotly-plot .plotly .user-select-none{
    margin-top: -95px !important;
}

.depth-x-dropdown-cont{
    position: relative;
    width: 100%;
    height: 50px;
    background-color: #ffffff;
    z-index: 9;
}

.pearson-graph{
    height: 60vh;
    width: 100%;
}

.spearman-graph{
    height: 60vh;
    width: 100%;
}

.box-plot-graph{
    margin-top: -50px;
    height: 50vh;
    width: 100%;
}

.three-d-plot-graph{
    margin-top: -50px;
    height: 60vh;
    width: 100%;
    margin-bottom: -20px;
}

/* Hide arrow zone when clear zone is visible */
.Select-clear-zone:not(:empty) ~ .Select-arrow-zone,
.Select-clear-zone.is-visible ~ .Select-arrow-zone,
.Select-clear-zone[style*="display: block"] ~ .Select-arrow-zone,
.Select-clear-zone:not([style*="display: none"]) ~ .Select-arrow-zone {
    display: none !important;
}

/* Alternative approach using has selector for modern browsers */
.Select-control:has(.Select-clear-zone:not(:empty)) .Select-arrow-zone {
    display: none !important;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #00000033;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00000055;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #00000033 transparent;
}


/* Shimmer effect styling */
.shimmer-container {
  width: 100%;
  overflow: hidden;
}

.shimmer {
  animation-duration: 2.2s;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  animation-name: shimmer;
  animation-timing-function: linear;
  background: linear-gradient(to right, #f6f7f8 8%, #edeef1 18%, #f6f7f8 33%);
  background-size: 1200px 100%;
}

@keyframes shimmer {
  0% {
    background-position: -1200px 0;
  }
  100% {
    background-position: 1200px 0;
  }
}

.shimmer-card {
  height: 300px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.shimmer-header {
  height: 40px;
  width: 70%;
  margin-bottom: 16px;
  border-radius: 4px;
}

.shimmer-body {
  height: 360px;
  border-radius: 4px;
}

/* Analysis shimmer container styling */
.analysis-shimmer-container {
  display: none;
}

.shimmer-row {
  display: flex;
  flex-wrap: wrap;
  margin: 4px 4px 4px 4px;
}

.shimmer-col {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 8px;
}

.shimmer-col-100 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 8px;
  }

.one-shimmer-row{
    margin-top: 16px !important;
    margin-bottom: 8px !important;
    margin-left: 4px !important;
    margin-right: 4px !important;
}

@media (max-width: 768px) {
  .shimmer-col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Composition Gradient Analysis Styles */
.composition-gradient-analysis-row {
    padding-top: 16px;
    padding-bottom: 16px;
    width: 100%;
    height: calc(100vh - 30px); /* Full viewport height minus header/footer space */
    min-height: 600px;
}

.depth-card {
    height: 100%;
    min-height: 700px;
    padding-bottom: 0px !important;
}

.depth-y-dropdown
{
    margin-top: 10px !important;
}

.depth-x-dropdown
{
    margin-bottom: 10px !important;
}

.depth-card .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.depth-card .card-body {
    flex: 1;
    padding: 0px;
    display: flex;
    flex-direction: column;
}

.depth-graph {
    flex: 1;
    height: 100% !important;
    min-height: 500px;
}

.depth-graph .js-plotly-plot {
    height: 100% !important;
}

.depth-graph .js-plotly-plot .plotly {
    height: 100% !important;
}

.depth-graph .js-plotly-plot .plotly .main-svg {
    height: 100% !important;
}

.depth-card .card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
    display: block;
    cursor: help;
}

.truncated-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    cursor: help;
}

.no-padding-right{
    padding-right: 0px !important;
}

/* Ensure Composition Gradient Analysis section takes full width */
#composition-gradient-analysis-section {
    width: 100%;
    padding: 0 12px;
}

#depth-container
{
    padding-bottom: 155px;
}

/* Depth Analysis Axis Dropdowns Styling */
.depth-card .card-body .Select-control {
    min-height: 32px !important;
    height: 32px !important;
    font-size: 10.5px !important;
    border: 1px solid rgba(0,0,0,0.4) !important;
    border-radius: 4px !important;
    background-color: rgba(255,255,255,0.98) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
}

.depth-card .card-body .Select-placeholder {
    font-size: 10.5px !important;
    line-height: 30px !important;
    color: #333 !important;
    padding: 0 8px !important;
}

.depth-card .card-body .Select-value-label {
    font-size: 10.5px !important;
    line-height: 30px !important;
    padding: 0 8px !important;
    color: #333 !important;
}

.depth-card .card-body .Select-arrow-zone {
    width: 26px !important;
    padding: 0 4px !important;
}

/* Default arrow (for Y-axis dropdown) */
.depth-card .card-body .Select-arrow {
    border-color: #666 transparent transparent !important;
    border-width: 5px 5px 0 !important;
    margin-top: 3px !important;
}

/* X-axis dropdown specific styling using class */
.depth-x-dropdown-container .Select-menu-outer {
    position: absolute !important;
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 2px !important;
    transform: none !important;
    max-height: 200px !important;
}

.depth-x-dropdown-container .Select-menu {
    max-height: 200px !important;
    overflow-y: auto !important;
}

.depth-x-dropdown-container .Select-arrow {
    border-color: transparent transparent #666 !important;
    border-width: 0 5px 5px !important;
    margin-top: -2px !important;
    margin-bottom: 3px !important;
}

/* Alternative selectors for X-axis dropdown */
.depth-x-dropdown .Select-menu-outer {
    position: absolute !important;
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 2px !important;
    max-height: 200px !important;
}

.depth-x-dropdown .Select-menu {
    max-height: 200px !important;
    overflow-y: auto !important;
}

.depth-x-dropdown .Select-arrow {
    border-color: transparent transparent #666 !important;
    border-width: 0 5px 5px !important;
    margin-top: -2px !important;
    margin-bottom: 3px !important;
}

/* More aggressive selectors for X-axis dropdown */
.depth-card .card-body .depth-x-dropdown-container .Select-menu-outer,
.depth-card .card-body .depth-x-dropdown .Select-menu-outer {
    position: absolute !important;
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 2px !important;
    transform: none !important;
    max-height: 200px !important;
}

.depth-card .card-body .depth-x-dropdown-container .Select-menu,
.depth-card .card-body .depth-x-dropdown .Select-menu {
    max-height: 200px !important;
    overflow-y: auto !important;
}

.depth-card .card-body .depth-x-dropdown-container .Select-arrow,
.depth-card .card-body .depth-x-dropdown .Select-arrow {
    border-color: transparent transparent #666 !important;
    border-width: 0 5px 5px !important;
    margin-top: -2px !important;
    margin-bottom: 3px !important;
}

/* Fallback selectors using position */
.depth-card .card-body > div:first-child > div:nth-child(2) .Select-menu-outer,
.depth-card .card-body div[style*="transform: translateX(-50%)"] .Select-menu-outer {
    position: absolute !important;
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 2px !important;
    max-height: 200px !important;
}

.depth-card .card-body > div:first-child > div:nth-child(2) .Select-menu,
.depth-card .card-body div[style*="transform: translateX(-50%)"] .Select-menu {
    max-height: 200px !important;
    overflow-y: auto !important;
}

.depth-card .card-body > div:first-child > div:nth-child(2) .Select-arrow,
.depth-card .card-body div[style*="transform: translateX(-50%)"] .Select-arrow {
    border-color: transparent transparent #666 !important;
    border-width: 0 5px 5px !important;
    margin-top: -2px !important;
    margin-bottom: 3px !important;
}

.depth-card .card-body .Select-menu-outer {
    font-size: 10.5px !important;
    border: 1px solid rgba(0,0,0,0.4) !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    z-index: 1001 !important;
    background-color: rgba(255,255,255,0.98) !important;
    max-height: 160px !important;
}

.depth-card .card-body .Select-menu {
    max-height: 160px !important;
    overflow-y: auto !important;
}

.depth-card .card-body .Select-option {
    font-size: 10.5px !important;
    padding: 6px 8px !important;
    line-height: 1.3 !important;
    background-color: transparent !important;
}

.depth-card .card-body .Select-option:hover {
    background-color: #f0f0f0 !important;
}

.depth-card .card-body .Select-option.is-selected {
    background-color: #007bff !important;
    color: white !important;
}

/* Ensure overlay dropdowns have proper styling */
.depth-card .card-body > div:first-child {
    position: relative !important;
    height: 100% !important;
}

/* Ensure dropdowns don't interfere with plot interaction */
.depth-card .card-body .Select-control:hover {
    border-color: rgba(0,0,0,0.6) !important;
}

.depth-card .card-body .Select-control.is-focused {
    border-color: #007bff !important;
    box-shadow: 0 2px 6px rgba(0,123,255,0.25) !important;
}

/* Fix double scrollbar issue for X-axis dropdown */
.depth-x-dropdown-container .Select-menu-outer,
.depth-x-dropdown .Select-menu-outer,
.depth-card .card-body .depth-x-dropdown-container .Select-menu-outer,
.depth-card .card-body .depth-x-dropdown .Select-menu-outer,
.depth-card .card-body > div:first-child > div:nth-child(2) .Select-menu-outer,
.depth-card .card-body div[style*="transform: translateX(-50%)"] .Select-menu-outer {
    position: absolute !important;
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 2px !important;
    transform: none !important;
    max-height: 180px !important;
    border: 1px solid rgba(0,0,0,0.4) !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    z-index: 1001 !important;
    background-color: rgba(255,255,255,0.98) !important;
}

.depth-x-dropdown-container .Select-menu,
.depth-x-dropdown .Select-menu,
.depth-card .card-body .depth-x-dropdown-container .Select-menu,
.depth-card .card-body .depth-x-dropdown .Select-menu,
.depth-card .card-body > div:first-child > div:nth-child(2) .Select-menu,
.depth-card .card-body div[style*="transform: translateX(-50%)"] .Select-menu {
    max-height: 180px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    font-size: 10.5px !important;
}

/* Smart dropdown positioning for sidebar - only apply upward positioning when needed */
.sidebar .Select-menu-outer {
    position: absolute !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    z-index: 2000 !important;
    max-height: 200px !important;
    min-width: 100% !important;
    width: auto !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 4px !important;
}

/* Only force upward positioning for dropdowns that are likely to be cut off */
.sidebar .Select-control:last-child .Select-menu-outer,
.sidebar .Select-control:nth-last-child(-n+3) .Select-menu-outer {
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 2px !important;
}

/* Specific styling for treemap-feature-dropdown to open upward */
.sidebar #treemap-feature-dropdown .Select-menu-outer {
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 2px !important;
}

/* Alternative: Use JavaScript to detect viewport position and apply class dynamically */
.sidebar .Select-menu-outer.dropdown-upward {
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 2px !important;
}
