:root {
  /* background-color: #00b33c; /* green bg color ON button */
  --knob_travel_distance: 32%;
  --knob_color_on: #0f0;
  --knob_color_off: #eee;
  --knob_color_on_text: #333;
  --sliding_space_width: 70px;
  --sliding_space_height: 34px;
  --sliding_space_ypos: 34px;
  --knob_xpos: 8px;
  --knob_ypos: 5px;
  --knob_font_size: 14px;
  --knob_width: 40px;
  --knob_height: 25px;
  --text_knob_height: 25px;
}

.ToggleContainerWhite
{
  display:flex;
  align-items:center;
  justify-content:center;
  position: relative; /* Make it the reference for the absolute positioned icon */
}

.ToggleContainerWhiteResp {
  display: flex;
  /* If width narrow, elements are stacked vertically */
  flex-direction: column; 
}

/* Only to be used if single button is shown */
.ToggleContainerWhiteRespSingle
{
  display: flex;
  /* If width narrow, elements are stacked vertically */
  flex-direction: column; 
}

.element1,
.element2 {
  margin-bottom: 10px; /* Add spacing between stacked elements */
}

@media screen and (min-width: 600px) {
  /* Apply styles when screen width is larger than 768px */
  .ToggleContainerWhiteResp {
    flex-direction: row; /* Switch to horizontal alignment */
    align-items: center; /* Center align elements vertically */
    justify-content:center;
  }

  .element1,
  .element2 {
    margin-right: 10px; /* Add spacing between horizontally aligned elements */
    margin-bottom: 0; /* Reset margin for horizontal alignment */
  }

  .element2 {
    margin-right: 0; /* Remove margin from the last element */
  }
}
.switch_holder {
  width: var(--button_width);
  height: var(--button_height);
  display: flex;
  padding: 20px 10px;
  border-radius: var(--button_radius);
  justify-content: space-between;
  align-items: center;
  font-size: var(--button_select_text_size);
  color: var(--button_select_text_color);
  background-color: var(--button_select_color);
}

.info_icon {
  position: relative;
  top: 0px;
  right: 0px;
  left: 0px;
  font-size: 12px;
  color: #000; /* Icon color */
  cursor: pointer;
  opacity: 0.7;
}

.info_icon_low {
  top: 15px;
}

.info_icon::before {
  content: "ℹ️"; /* Info icon symbol */
}

/* Tooltip styling */
.info_icon:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.tooltip-container {
  /* Keep low height, such that only on the info
   * symbol tooltip appears */
  width :3px;
  height:3px;
  position: relative;
  display: inline-block; /* Adjust based on your layout needs */
}

.overlay, .tooltip {
  visibility: hidden; /* Start hidden */
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s; /* Delay visibility change */
}

.tooltip-container:hover .overlay,
.tooltip-container:hover .tooltip {
  visibility: visible; /* Show immediately on hover */
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0s linear 0s; /* Immediate visibility */
}

.overlay {
  position: fixed; /* Cover the entire viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
  z-index: 19; /* Lower than the tooltip */
  pointer-events: none; /* Prevent the overlay from blocking interactions */
}

.tooltip {
  position: fixed; /* Center in the viewport */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centering */
  background-color: #fff;
  color: #000;
  padding: 15px 20px;
  border-radius: 6px;
  font-size: 16px;
  text-align: left;
  white-space: normal;
  word-wrap: break-word;
  z-index: 20; /* Higher than the overlay */
  max-width: 40vw;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


@media screen and (max-width:300px) {
    .tooltip
    {
      min-width: 95vw;
      max-width: 95vw;
      font-size: 14px;
    }
}

@media screen and (min-width:301px) and (max-width:800px) {
    .tooltip
    {
      min-width: 95vw;
      max-width: 95vw;
      font-size: 14px;
    }
}

@media screen and (min-width:801px) and (max-width:1200px) {
    .tooltip
    {
      min-width: 20vw;
      max-width: 60vw;
    }
}

@media screen and (min-width:1201px) {
    .tooltip
    {
      min-width: 20vw;
      max-width: 60vw;
    }
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%; /* Arrow pointing down from the tooltip */
  right: 10px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.switch_holder_wide
{
  width:var(--button_width_wide);
}

.switch_holder_high
{
  width:var(--button_width_wide);
  height:var(--button_height_high);
}

.switch_label {
  padding: 0 20px 0 10px;
  color: var(--toggle_unchecked_text_color);  /* Text color of button label */
  position: relative; /* Ensure the info icon is positioned relative to the toggle */
}

.switch_label i {
  margin-right: 5px;
}

.switch_toggle {
  height: var(--sliding_space_ypos);
}

.switch_toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  z-index: -2;
}

.switch_toggle input[type="checkbox"]+label {
  position: relative;
  display: inline-block;
  width: var(--sliding_space_width);
  height: var(--sliding_space_height);
  border-radius: 20px;
  margin: 0;
  cursor: pointer;
}

.switch_toggle input[type="checkbox"]+label::before {
  position: absolute;
  content: var(--toggle_text_off);
  color: #555; /* Text color OFF */
  font-size: var(--knob_font_size); /* Text size OFF */
  text-align: center;
  line-height: var(--text_knob_height);
  top: var(--knob_ypos);
  left: var(--knob_xpos);
  width: var(--knob_width);
  height: var(--knob_height);
  border-radius: 20px;
  background-color: var(--knob_color_off); /* Background color OFF button */
  transition: .3s ease-in-out;
}

.switch_toggle input[type="checkbox"]:checked+label::before {
  left: var(--knob_travel_distance); /* Distance the knob travels in ON state */
  content: var(--toggle_text_on);
  color: var(--knob_color_on_text); /* Color of ON text */
  background-color: var(--knob_color_on); /* Background color ON button */
}

/* Different toggles */
.on_off_toggle {
  --toggle_text_off: 'OFF';
  --toggle_text_on: 'ON';
  --knob_color_on: #0f0;
  --knob_color_off: #eee;
  --sliding_space_width: 70px;
  --knob_travel_distance: 32%;
  --knob_width: 40px;
  --knob_height: 25px;
  --knob_xpos: 8px;
  --knob_ypos: 5px;
  --text_knob_height: 25px;
}

.time_gps_toggle {
  --toggle_text_off: 'TIME';
  --toggle_text_on: 'GPS';
  --knob_color_on: #0ff;
  --knob_color_off: #0f0;
  --sliding_space_width: 100px;
  --knob_travel_distance: 40px;
  --knob_width: 50px;
  --knob_height: 30px;
  --knob_xpos: 40px;
  --knob_ypos: 2px;
  --text_knob_height: 30px;
}

/* CSS */
.button-container {
    display: flex;
    align-items: center;
}

.action-button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    margin-right: 8px; /* Space between button and icon */
}

.info-icon {
    font-size: 16px;
    cursor: help; /* Change cursor to indicate it's an info icon */
}

.info-icon:hover::after {
    content: attr(title);
    display: block;
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 5px;
    position: absolute;
    margin-top: 5px;
    font-size: 12px;
    white-space: nowrap;
}

