:root {
    /* Real Bestmix colors */
    --primary-blue: #16579E;
    --blue-hover: #0C325A;
    --blue-light:#E5F2FF;
    --blue2: #B7D5F5;
    --blue1: #DBEAFA;
    --blue05: #e5edf7;
    --blue3: #81B6EE;
    --blue4: #2881E2;
    --cyan1: #ECFAFE;
    --orange-light:#fff4dc;

    --warning: #FDCA40;
    --yellow500: #F2B202;
    --succes: #13A550;
    --error: #D7003C;
    --bg-error: #FFE3EB;
    --error-hover: #8F0028;
    --red3: #FF5C8A;
    
    
    --gray1: #F4F4F4;
    --gray2: #ECECEC;
    --secondary-gray: #ECECEC;
    --gray3: #D8D8D8;
    --gray5: #a5a5a5; /* Stroke */
    --stroke: #A5A5A5;
    --gray6: #797979; /* selected sidelink */
    --text-muted: #797979;
    --gray7:#505050; /* hover sidelink */
    --gray8: #323232;
    --white: #FFFFFF;

}


body {
    background-color: var(--white);
    margin: 0;
    font-family: "Noto Sans", sans-serif;
    padding: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 150%;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0; 

    z-index: 11;

    width: 16rem;
    
    background-color: var(--gray8);
    overflow-x: hidden;
    
    transition: width 0.3s ease;

}

.sidebar.collapsed {
    width: 4rem;
}


.sidebar .link {
    text-decoration: none;
    font-size: 1rem;
    color: var(--white);
    background-color: none;

    display: flex;
    text-align: center;
    align-items: center;

}

.sidebar .link:hover {
    background-color: var(--gray7);
    transition: 0.3s ease;
}

.sidebar .link:focus {
    background-color: var(--gray7);
    outline: none;
}

.sidebar .icon-square {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 2.5rem;
    width: 4rem;

    background-color: none;
    
}

.sidebar .link .text-square {
    color: var(--white);
}

.sidebar.collapsed .text-square {
    display: none;
} 

.sidebar .link-toggle {
    position: absolute;
    bottom: 0; 

    font-size: 1rem;
    color: var(--white);
    background-color: var(--gray6);

    display: flex;
    text-align: center;
    align-items: center;

    width: 100%;

}

.sidebar .link-toggle .toggle-button {
    border: 0;
    background-color:var(--gray6);
    height: 2.5rem;
    width: 4rem;
    color: var(--white);
}

/* Topbar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;

    z-index: 10;
    
    height: 3rem;
    width: 100%;

    background-color: var(--gray1);
    color: var(--text-muted);
    border: 2px solid var(--gray5);

    display: flex;
    align-items: center;         /* vertically center */
    gap: 8px;

    padding-left: 276px;
    
    font-size: 14px;
    font-weight: 400;
    line-height: 150%;
    
    transition: padding-left 0.3s ease;
    
}

.sidebar.collapsed ~ .topbar {
    padding-left: 83px;
}


/* Main content shifts with sidebar */
.main-content {
    margin-left: 260px;
    margin-top: 48px;
    padding: 16px;
    transition: margin-left 0.3s ease;
    height: calc(100vh - 48px - 2px)
}

.sidebar.collapsed ~ .main-content {
    margin-left: 67px;
}


/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
/*                                                             OVERVIEW                                                                */
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
.overviewgrid {
    display:grid;
    grid-template-rows: auto auto 1fr 1fr 1fr; /* overwritten in code */
    grid-template-columns: 7vw 1fr 1fr 1fr; /* overwritten in code, */

    gap: 16px;
    align-items: center; 

    height: 85vh;
    
}

.box, .alert {
    position:relative;
    
    display: block;
    padding: 6%;
    
    justify-items: center; 
    text-align: center;
    align-content: center;

    background-color: var(--gray1);
    border-radius: 0.5rem;
    border: 0.05rem solid var(--gray5);
    
    box-shadow: 5px 5px 8px rgba(0,0,0,0.2); 
    margin: 1rem auto;
    max-width:25rem;
}


.alert {
    font-size:1vw;
    padding: 2%;

    /* trial */
    /* background-color: white;
    border: none;
    box-shadow: none; */
    
}

.alert .content2center {
    position: relative;
}

.alert .bulb {
    position: absolute;
    left:5%;
    top:50%;
    transform: translateY(-50%);
    font-size: 1.3vw;

}

.alert .content2center .bulb {
    position:absolute;
    left: -36px;
    top: 50%;
    transform: translateY(-50%);

    font-size: 1.3vw;
    color:var(--yellow500);
}

.box .icon {
    position: absolute;
    left:5%;
    top:7%;

    font-size: 1.3vw;
    color:black;
}

.box .graph-container {
    aspect-ratio: 7 / 1;
    width: 60%;
}

.box .value {
    font-size: 3.5vw; 
    font-weight: bold;

    margin: 5%;
    margin-right: 0;
    margin-left: 1vw;
}

.overviewgrid .box .value {
    padding: 10%;
}

.box .unit {
    font-size: 0.7vw;
    margin-right: 1vw;
}


.recommendation-header, .header, .prodline-header, .number {
    text-align: center;
}

.recommendation-header {
    font-size: 0.6vw;
    color: var(--gray6);
    font-style: italic;
    grid-area: 3 / 1 / 4 / 2;  /* row start/ col start / row end / col end; */
}

.header {
    font-size: 1vw;
    color: var(--gray6);
    font-weight: bold;
    text-align:right;
}

.prodline-header {
    font-size: 1.3vw;
    color: var(--gray6);
}

.timestamp {
    font-style : italic; 
    font-size : x-small;
    color: var(--text-muted);
    text-align: right;
    line-height: 120%;
}

.box .value {
    font-size: clamp(3rem, 8rem, 4vw);
}
.box .unit {
    font-size: clamp(1rem, 3rem, 0.8vw);
}


/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
/*                                                               OPTIMIZER                                                             */
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
.optimizergrid {
    display: grid;
    grid-template-rows: 5vh 8vh 20vh 45vh 5vh;
    grid-template-columns: 55% 4px 1fr;
    gap: 16px;
}

.optimizergrid .dropdown {
    width: 250px;
}
.VirtualizedSelectFocusedOption {
    background-color: var(--blue1);
}
.VirtualizedSelectOption:hover  {
    background-color: var(--blue1);
}

.Select-control:focus,
.Select.is-focused > .Select-control {
    border-color: var(--blue2) !important;
    box-shadow: 0 0 2px 2px var(--blue1) !important; 
}

.Select-control {
    border-width: 1px;
    border-radius: 8px;
    border-color: var(--gray5);
    height:36px;
}

.page-header {
    font-size: 18px;
    font-weight:700;
    white-space: nowrap;

}

.boxes-div {
    align-items: center;
}

.optimizergrid .box {
    position: relative;
    height: 15vh;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.optimizergrid .box .graph-container {
    position: absolute;
    bottom: 15%;
    margin-top: 25%;
}

.optimizergrid .box .value {
    font-size: calc(min(2vw, 5vh));
}

.optimizergrid .box .unit {
    font-size: 0.5vw;
}

.optimizergrid .box .icon {
    position: absolute;

    font-size: 90%;
}

.optimizergrid .box .parameter-name {
    position: absolute;
    top: 10px;

    font-size: calc(min(0.7rem, 0.6vw));
    font-style: italic;
    color: var(--dark-gray);

    margin: 0px 15% 1vh 15%;
}

.optimizergrid .enabled:hover {
    background-color: var(--blue-light); /* Hover color */
}

/* = = = = = = = = = = = = controllable parameter box = = = = = = = = = = = = */
.cpmbox {
    position: relative;
    grid-area: 1 / 3 / 5 / 4;

    display: grid;
    
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 10% 90%;
    gap: 4px;
    
    overflow-y: auto;

    background-color: var(--gray1);

    border: 0px solid rgb(114, 114, 114);

}

.spmbox {
    position: relative;
    
    height: 55vh;

    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 10% 90%;
    gap: 4px;
    
    overflow-y: auto;

}

.cpm-title {
    text-align: center;
    align-self: center;
}

.col {
    text-align: center;
    align-self: last baseline;
}

.cpm-title {
    font-size: 16px;
    font-weight: 700;
}

.col {
    font-style: italic;
    color: var(--gray5);
    font-size: 12px;
    font-weight: 400;
}

.current-col, .description-col, .adjusted-col {
    
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 8px;

    align-items: center;
    
}

.adjusted-col {
    justify-content: left;
}


.current-col {
    grid-area: 2 / 1 / 3 / 2;
    margin-left: 8px;
}

.description-col {
    grid-area: 2 / 2 / 3 / 3;
}

.adjusted-col {
    grid-area: 2 / 3 / 3 / 4;
}



/* CONTROLLABLE PARAMETER */
.cipherbox, .parameterbox, .dash-input {
    
    width: 100%; /*fill */
    min-height: 32px;
    max-height: 32px;
    /* height: fit-content; */
    padding: 1.5px 8px;
        
    align-content: center;
    white-space: nowrap;

    background-color: white;
    border: 1px solid var(--gray5);
    border-radius: 8px;
    
    box-sizing: border-box;
    
}

.dash-input {
    font-family: "Noto Sans", sans-serif;
    font-size: 14px;
    display: inline-block;
}



.cipherbox {
    
    background-color: var(--blue-light);
    text-align: center;

}


.time-slider {
    width: 400px; 
}

.rc-slider-mark {
    font-family: 'Noto Sans', sans-serif;
    font-size: x-small;
}

.time-info {
    grid-area : 5 / 1 / 6 / 2;
    display : flex;
    justify-content: space-between;
}

.vertical-line {
    
    height: 100%;
    width: 1px;
    background-color: var(--gray3);

}

.graph {
    border-radius: 8px; 
    border: 0px solid var(--gray5);
    /* box-shadow: 5px 5px 8px rgba(0,0,0,0.2);  */

}

.button-imprint {
    display: flex;
    gap: 8px;
    text-align: center;
}

.button {
    display: inline-block;
    padding: 8px 16px;
    height: fit-content;
    gap: 16px;

    border-radius: 8px;

    font-size: 12px;
    
    transition: 0.3s;

    z-index: 5;
}

.icon-button {
    aspect-ratio: 1 / 1;
}

.primary-button {
    background-color:var(--primary-blue);
    color:white;
    border: none;
}

.secondary-button {
    background-color: var(--secondary-gray);
    color: black;
    border: 1px solid var(--gray5);
}

.destructive-button {
    background-color: var(--error);
    color: white; 
    border: none;
}

.destructive-secondary-button {
    background-color: var(--bg-error);
    border: 1px solid var(--error);
    color: var(--error);
}

.button:disabled {
    opacity: 0.5;
}

/* Hover effect */
.primary-button:hover:enabled {
    background-color: var(--blue-hover); /* Hover color */
}

/* Hover effect */
.secondary-button:hover:enabled {
    background-color: var(--gray5); /* Hover color */
}

/* Hover effect */
.destructive-button:hover:enabled {
    background-color: var(--error-hover); /* Hover color */
}

/* Active (click) effect
.button:active:enabled {
    background-color: var(--lighter-gray);
} */

.buttons {
    grid-area: 5 / 3 / 6 / 4;
    display: flex;
    margin-left: auto;
    gap: 16px;

    align-items: center;
}

.reset-btn-holder {
    display: flex;
    gap: 8px;

    height: fit-content;
    padding: 8px;

    border: 1px solid var(--gray3);

    border-radius: 16px;
    
}

/* SLIDER STYLES */
.slider {
    padding:50px;
    margin:1rem;
}

.rc-slider-track {
    background-color: var(--primary-blue);
}
.rc-slider-handle {
    /* border: solid 2px var(--primary-blue); */
    width:10px;
    height: 10px;
    background-color: var(--primary-blue);
    border: none;
    transform: translateY(25%) translate(-50%) !important;

}
.rc-slider-handle:active {
    box-shadow: 0 0 5px 3px var(--blue2);
}
.rc-slider-handle:hover {
    background-color: var(--blue2);
}
.rc-slider-handle-click-focused:focus {
    border-color: var(--primary-blue);
}
.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging {
    border-color: var(--primary-blue);
    box-shadow: 0 0 5px 3px var(--blue2);
}

.rc-slider-dot {
    border-color: var(--primary-blue);
}



.cpmbox .title-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    grid-area: 1 / 2 / 2 / 3;
    padding: 10px;
}

.boxes-div {
    align-content:center;
}

.radio-boxes {
    display: flex;
    /* margin: 16px; */
    justify-content: space-evenly;
    margin: auto;
    gap: 5%;
}

.dash-default-spinner > div {
  background-color: var(--primary-blue) !important;
}

.save-modal1 {
    display: flex;
    gap: 16px;
    padding: 30px;
    justify-content: center;
    align-content: center;
    text-align: center;
}

.checkbox {
    background-color: var(--primary-blue);
}

/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
/*                                                                HISTORY                                                              */
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
.table-holder {
    margin: 1rem;
    height: 75vh;
}

.ag-theme-alpine {
    height: 100% !important;

    --ag-header-height: 30px !important;
    --ag-header-foreground-color: white !important;
    --ag-header-background-color: var(--gray8) !important;
    --ag-header-cell-hover-background-color: var(--gray7) !important;
    --ag-header-column-resize-handle-display: none !important;

    --ag-alpine-active-color: var(--primary-blue);
    --ag-background-color: white;
    /* ‑‑ag‑secondary‑foreground‑color: var(--gray5); */
    --ag-odd-row-background-color:  var(--gray1);
    --ag-row-hover-color: var(--blue05);
    /* --ag-column-hover-color: var(--blue05); */
    --ag-border-color: var(--gray5);
    --ag-row-border-color: var(--gray5);
}

.historygrid {
    display:grid;
    align-items: center; 
    grid-template-rows: auto 1fr;
    grid-template-columns: auto 1fr auto;

    position:relative;
}

.historygrid .page-header {
    position: absolute;
    top: 0;
    left: 0;


}

.text-placeholder {
    text-align:center;
    font-style:italic;
    color:var(--text-muted);
}

.dropdown-time {
    width: 265px;
    height: 36px;
    margin: 8px;    
}

.modal-overlay {
    position: fixed;       /* ignore parent layout, stick to viewport */
    top: 0;
    left: 0;
    width: 100vw;          /* full viewport width */
    height: 100vh;         /* full viewport height */
    background-color: rgba(0, 0, 0, 0.5); /* semi-transparent black */
    display: none;          /* switches to none */
    justify-content: center; /* center modal horizontally */
    align-items: center;     /* center modal vertically */
    z-index: 1000;           /* above everything else */
}

.modal-overlay.popup{
    display:flex;
}

.modal-overlay.hidden {
    display:none;
}

.modal-window {
    position:relative;
    z-index: 0;
    background-color: var(--gray1);
    padding: 60px;
    border-radius: 8px;
    width: auto;
    height: auto;

}

.modal-window > button {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.modal-window > button:hover {
    background-color:#3b3b3b;
}

.modal-window > button:hover > .icon {
    color:white;
}

.orientation-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 8px;

    height: 36px;
    padding: 0px 16px;
    margin: 8px;
    font-family: "Noto Sans", sans-serif;
    font-size: 12px;
    background-color: var(--gray1);

    z-index: 3;
}

input[type="radio"] {
    accent-color: var(--primary-blue);  /* or any color you like */
}
input[type="radio"]:hover {
    box-shadow: 0 0 4px 2px var(--blue2);
}
input[type="radio"]:focus {
    outline-color: var(--blue3);
}   

input[type="checkbox"] {
    accent-color: var(--primary-blue);
}
input[type="checkbox"]:hover {
    box-shadow: 0 0 4px 2px var(--blue2);
}
input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 4px 2px var(--blue3);
}

.surround-border {
    position: relative;
    display: flex;
    justify-content: space-around;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--gray5);
    border-radius: 8px;
    padding: 0 16px;

    font-family: "Noto Sans", sans-serif;
    font-size: 12px;

    z-index: 1;
}

.surround-border .text {

    position:absolute;
    left: 16px;
    top: 0px;
    transform: translateY(-55%);

    z-index: 2;

    color: var(--gray5);
    background-color: white;

    padding: 0px 4px;
}
