/**
 * @file
 * CSS for the custom range slider widget.
 */

div.custom-bef-slider-container {
  padding: 10px 0;
}

/* Styles for the legend */
.custom-bef-slider-legend {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  color: #333;
  font-size: 1rem;
  border-bottom: none;
}

.custom-bef-slider-legend .fieldset__label {
  color: #333;
  padding-left: 0;
  background: none;
  font-weight: 600;
}

/* Slider container with legend has more padding */
.custom-bef-slider-container:has(.custom-bef-slider-legend) .custom-bef-slider-wrapper {
  margin-top: 8px;
}

/* Styles for input fields */
.custom-bef-slider-inputs {
  display: none;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.custom-bef-slider-input-wrapper {
  display: flex;
  align-items: center;
  background-color: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 2px 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.custom-bef-slider-label {
  margin-right: 5px;
  font-weight: 500;
  color: #555;
}

.custom-bef-slider-min-input,
.custom-bef-slider-max-input {
  width: 50px;
  padding: 2px 4px;
  border: none;
  background-color: transparent;
  text-align: center;
  font-weight: bold;
  color: #4285f4;
  height: 24px;
  appearance: textfield;
  -moz-appearance: textfield;
}

.custom-bef-slider-min-input::-webkit-outer-spin-button,
.custom-bef-slider-min-input::-webkit-inner-spin-button,
.custom-bef-slider-max-input::-webkit-outer-spin-button,
.custom-bef-slider-max-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.custom-bef-slider-min-input[readonly],
.custom-bef-slider-max-input[readonly] {
  cursor: default;
  background-color: transparent;
}

.custom-bef-slider-wrapper {
  position: relative;
  padding-bottom: 30px;
  margin: 0 10px;
}

.custom-bef-slider {
  margin: 15px 0;
  height: 13px;
  border-radius: 3px;
  background: #e3e3e3;
  border: none;
}

/* noUiSlider specific styles */
.custom-bef-slider .noUi-connect {
  background: #0066cc;
}

.custom-bef-slider .noUi-handle {
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  cursor: pointer;
  width: 19px;
  height: 22px;
  right: -9px;
  top: -4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.custom-bef-slider .noUi-handle:focus,
.custom-bef-slider .noUi-handle:active {
  outline: none;
}

/* Removing default lines */
.custom-bef-slider .noUi-handle:before,
.custom-bef-slider .noUi-handle:after {
  display: none;
}

/* Adding custom drag lines */
.custom-bef-slider .noUi-handle::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  height: 9px;
  width: 1px;
  background-color: #bbbbbb;
  display: block;
}

.custom-bef-slider .noUi-handle::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 5px;
  height: 9px;
  width: 1px;
  background-color: #bbbbbb;
  display: block;
}

/* Styling for the third line added as a span */
.custom-bef-slider .noUi-handle .drag-line,
.custom-bef-slider .noUi-handle span.drag-line {
  position: absolute;
  left: 12px;
  top: 5px;
  height: 9px;
  width: 1px;
  background-color: #bbbbbb;
  display: block;
  pointer-events: none;
}

/* Styles for value tooltips */
.custom-bef-slider-tooltips {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
}

.custom-bef-slider-min-tooltip,
.custom-bef-slider-max-tooltip,
.custom-bef-slider-combined-tooltip {
  position: absolute;
  top: 25px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  transition: left 0.1s ease-out;
  z-index: 10;
  white-space: nowrap;
}

.custom-bef-slider-min-value,
.custom-bef-slider-max-value,
.custom-bef-slider-combined-value {
  color: black;
  font-weight: 400;
  font-size: 12px;
}

div.custom-bef-slider-description {
  font-size: 0.9em;
  color: #666;
  display: none;
}
