input[type="range"]::-webkit-slider-thumb { background: var(--spectra-mint-green); }
input[type="range"]::-moz-range-thumb { background: var(--spectra-mint-green); }
input[type="range"]::-ms-thumb { background: var(--spectra-mint-green); }

input.darker-slider::-webkit-slider-runnable-track { background: var(--sidebar-grey); }
input.darker-slider::-moz-range-track { background: var(--sidebar-grey); }
input.darker-slider::-ms-track { background: var(--sidebar-grey); }

.form-check-input:checked {
    background: var(--spectra-mint-green);
    border-color: var(--spectra-mint-green);
}


html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ##### Settings ##### */
#videoMainWindow{
    height: auto !important;
    display: block;
}

#cameraSettingsWindow {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#cameraSelect {
    text-align: center;
}

#loadedImageFilename {
    background-image: none !important;
    text-align: center;
    pointer-events: none;
    display: block;
    width: 100%;
    padding: .25rem 2.25rem .25rem .5rem;
    font-size:.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: .25rem;
}

#miscMeasuringSettings {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
    margin: 0.5rem 0;   /* vertical spacing */
    padding: 0.5rem;    /* optional inner padding */
}

#miscMeasuringSettings.scrollable {
    background-color: rgba(0,0,0,0.05); /* slightly darker */
    border-radius: 6px;                 /* optional, for visual separation */
}

#cameraSettingsNavButtons {
    flex-shrink: 0;
}

#cameraSettings,
#cameraExposureWindow {
    flex-grow: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}


#input-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#input-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: center;
}

#input-header div {
    text-align: center;
    font-weight: bold;
    font-size: 0.8rem;
}

#input-container {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.input-pair {
    display: grid;
    grid-template-columns: 1fr 1fr auto; /* Two equal inputs + button */
    gap: 0.3rem;
    align-items: center;
    width: 100%;
    padding: 0.2rem; /* For spacing inside background */
    box-sizing: border-box;
    background-color: transparent; /* Set your highlight color here later */
    border-radius: 4px;
    margin: 0.15rem 0.05rem 0.15rem 0.05rem;
}

.input-pair.highlight {
    background-color: var(--spectra-mint-green);
    transition: background-color 0.5s ease-in-out;
}

.input-pair input {
    width: 100%;
    padding: 2px 4px;
    font-size: 0.7rem;
    height: 1.5rem;
    box-sizing: border-box;
}

.input-pair button {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    line-height: 1;
}

/* ##### Sidebar sliding ##### */
#appContainer {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh; /* or 100% if inside something else full-height */
    overflow: hidden;
}

#sidebar-left {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 22vw;
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
    flex-shrink: 0;
}

#sidebar-left.hidden {
    margin-left: -22vw;
}

#sidebar-right {
    width: 22vw;
    transition: margin-right 0.3s ease-in-out, width 0.3s ease-in-out;
    flex-shrink: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

#sidebar-right.hidden {
    margin-right: -22vw;
}

.image-loaded-wrapper {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 4px solid;
    border-radius: 8px;
    padding: 0.5rem;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.image-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.outer-image-wrapper {
    flex-grow: 1;
    width: 100%;
}

.camera-image-text {
    margin-bottom: 0.3rem;
}

.inner-image-wrapper {
    flex-grow: 1;
    position: relative;
    width: 100%;
}

.loaded-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
}

.loaded-image-stripe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.small-camera-image-entry {
    padding: 0.5rem;
    gap: 0.75rem;
    min-height: 3rem;
}

.camera-image-text {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
}

#sidebarHoverZoneLeft, #sidebarHoverZoneRight {
    position: fixed;
    top: 0;
    width: 30px;
    height: 100vh;
    z-index: 104;
}

#sidebarHoverZoneLeft {
    left: 0;
}

#sidebarHoverZoneRight {
    right: 0;
}

.sidebar-handle {
    position: fixed;
    top: 50%;
    width: 30px;
    height: 80px;
    color: white;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    cursor: pointer;
    z-index: 105;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
}

#sidebarToggleHandleLeft.sidebar-handle {
    left: 0;
}

#sidebarToggleHandleRight.sidebar-handle {
    right: 0;
}

#sidebarHoverZoneLeft.moved, #sidebarToggleHandleLeft.moved {
    left: 22vw;
}

#sidebarHoverZoneRight.moved, #sidebarToggleHandleRight.moved {
    right: 22vw;
}

#mainContent {
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem;
    max-width: 100vw;
}

.graph-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 30vh;
    height: auto;
    background: #f8f9fa;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 1rem;
    overflow-y: auto;
}
.graph-drawer.hidden {
    transform: translateY(100%);
}

/*##### Main Graph ##### */
#graphCanvasWindow {
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
    overflow: hidden;
}

#graphCanvas {
    width: 100%;
    height: 100%;
    transition: max-height 0.3s ease;
    display: flex;
}

.ParentElement {
    position: relative;
    height: 50px; /* fixed height */
    flex-shrink: 0;
}

#blackBox {
    width: 100%;
    height: 100%;
    background-color: black;
}

#stripeCanvas {
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 100%;
    width: calc(100% - 60px);
    z-index: 2;
    pointer-events: none;
}


/* ##### Calibration Graph ##### */
#graphWindowCalibration {
    box-sizing: border-box;
}

#graphCalibration {
    width: 100%;
    height: calc(65vh - 0.75rem);
    display: flex;
    margin-bottom: 0.5rem;
}

#graphDivergence {
    width: 100%;
    height: calc(35vh - 0.75rem);
    display: flex;
}

/* ##### Long exposure popup ##### */
.recording-toast {
    position: fixed;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    transition: top 0.6s ease-in-out;
    pointer-events: none;
}

.recording-toast.show {
    top: 20px;
    pointer-events: auto;
}

#cameraRecordingIsOnWindows, #infoPopupInside, #errorBoxInside {
    padding: 20%;
    width: 100%;
    text-align: center;
}

#errorBlock, #infoPopupBlock {
    display: none;
    z-index: 1049;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

#errorBlock {
    background-color: var(--error-red);
}

#infoPopupBlock {
    background-color: var(--popup-grey);
}

#errorBlock.show, #infoPopupBlock.show {
    display: block;
}
