/* Slider.css */
.slider-container input[type="range"] {
  width: 100%;
  height: 20px;
  appearance: none;
  outline: none;
  margin: 0;
  padding: 0;
  background-color: var(--vpl-blue-gray-4);
  border: 1px solid var(--vpl-border-light);
  border-radius: var(--vpl-border-radius);
}

.slider-container input[type="number"] {
  width: 30px !important;
  min-width: 30px;
  height: 20px;
  flex-shrink: 0;
  text-align: center;
  padding: 1px 2px;
  border: 1px solid var(--vpl-blue-3);
  border-radius: 4px;
  background-color: var(--vpl-blue-gray-4);
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.common-input-style {
  background-color: var(--vpl-blue-gray-4);
  border: 1px solid var(--vpl-border-light);
  border-radius: var(--vpl-border-radius);
  padding: 0px 0px 0px 8px;
  width: calc(100% - 10px);
  min-width: 30px;
  height: 20px;
  font-size: var(--vpl-ui-font-size1);
  outline: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  position: relative;
}


.extra-run-container input.common-input-style {
  width: 30px !important;
  height: 16px !important;
  padding: 0px 1px 0px 4px !important;
  font-size: 10px !important;
  font-weight: 300 !important;
}

/* Hide the thumb on WebKit browsers (e.g., Chrome, Safari) */
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* Hide the thumb on Mozilla browsers (e.g., Firefox) */
input[type="range"]::-moz-range-thumb {
  appearance: none;
  width: 0;
  height: 0;
  background: transparent;
}

/* Hide the thumb on Microsoft browsers (e.g., IE, Edge) */
input[type="range"]::-ms-thumb {
  appearance: none;
  width: 0;
  height: 0;
  background: transparent;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0 4px;
  width: 100%;
  height: 20px;
  margin-right: 5px;
  position: relative;
}

.file-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: calc(100% - 10px);
  margin-left: auto;
}

.file-input-container .common-input-style {
  padding-left: 30px;
  width: 100%;
}

.file-input-button {
  position: absolute;
  left: 1px;
  top: 1px;
  bottom: 1px;
  width: 28px;
  border: none;
  border-right: 1px solid var(--vpl-border-light);
  border-radius: var(--vpl-border-radius) 0 0 var(--vpl-border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  z-index: 1;
  background-color: var(--vpl-blue-gray-4);
}

.file-input-button:hover {
  background-color: var(--vpl-blue-gray-3);
}

.file-input-button svg {
  color: #718096;
}

#range-slider {
  margin: auto;
  overflow: hidden;
  height: 100%;
  cursor: ew-resize;
}

#range-slider .range-slider__thumb {
  width: 5px;
  height: 100%;
  border-radius: 4px;
  background-color: var(--vpl-blue-0);
  background-image: none;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  cursor: ew-resize;
}


#range-slider .range-slider__range {
  border-radius: 6px;
  background: transparent;
  box-sizing: border-box;
}

.range-slider {
  height: 100% !important;
  background: transparent !important;
}

.histogram-values {
  position: absolute;
  top: -30px;
  width: 100%;
  pointer-events: auto;
}

.value-mark {
  position: absolute;
  background-color: #fff;
  color: #333;
  padding: 4px 2px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #ccc;
  width: 35px;
  text-align: center;
  z-index: 1;
  cursor: text;
}

/* Remove spinner buttons from number input */
.value-mark::-webkit-inner-spin-button,
.value-mark::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.value-mark[type='number'] {
  -moz-appearance: textfield;
}

/* Style focus state */
.value-mark:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* ColorBar styles */
.colorbar-container {
  position: relative;
}

.colorbar-labels {
  position: absolute;
  display: flex;
  justify-content: space-between;
  width: calc(100% - 2px);
  padding: 0 1px;
  bottom: 55%;
  transform: translateY(55%);
  font-size: 10px;
  color: white;
  line-height: 1;
}

/* DiffMap Toggle Switch styles */
.diff-map-container {
  display: flex;
  align-items: center;
  height: 24px;
  justify-content: flex-start;
}

.diff-map-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--jp-ui-font-family);
}

.triggers-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.viewer-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-bar-container {
  height: 20px;
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.colorbar-container canvas {
  display: block;
}

.switch-container {
  position: relative;
  width: 32px;
  height: 18px;
  cursor: pointer;
}

.switch-checkbox {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch-toggle {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 34px;
}

.switch-toggle-thumb {
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
}

.switch-toggle-checked {
  background-color: var(--jp-brand-color1);
}

.switch-toggle-checked .switch-toggle-thumb {
  transform: translateX(14px);
}