/* Statistics - Volume / Value toggle */

.c-viewToggle {
  display: inline-flex;
  position: relative;
  vertical-align: middle;
  pointer-events: auto !important;
}

.c-viewToggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 124px;
  height: 45px;
  border-radius: 100px;
  border: 1px solid #1E1E1C;
  background-color: #FFFFFF;
  padding: 2px;
  cursor: pointer;
  position: relative;
  outline: none;
  
  overflow: hidden;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  pointer-events: auto !important;
}

.c-viewToggle__btn:focus-visible {
  outline: 2px solid #0094ff;
  outline-offset: 2px;
}

.c-viewToggle__track {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
}

.c-viewToggle__knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid #1E1E1C;
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  
  transform: translateY(-50%) translateX(82px);
  transition: transform 0.35s cubic-bezier(0.34, 1.25, 0.64, 1);
  z-index: 2;
  pointer-events: none;
}

.c-viewToggle__arrow {
  width: 16px;
  height: 16px;
  transform: rotate(0deg);
}

.c-viewToggle__label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 100%;
  letter-spacing: -0.6px;
  color: #1E1E1C;
  white-space: nowrap;
  pointer-events: none;
  /* transition: left 0.35s cubic-bezier(0.34, 1.25, 0.64, 1), opacity 0.2s ease; */
  z-index: 1;
}

.c-viewToggle.-isValue .c-viewToggle__knob {
  transform: translateY(-50%) translateX(2px);
}

.c-viewToggle.-isValue .c-viewToggle__arrow {
  transform: rotate(180deg);
}

.c-viewToggle.-isValue .c-viewToggle__label {
  left: 54px;
}

/* The toggle keeps the section's original Volume/Value <select> (and its custom dropdown) for the filter JS
   and screen readers - it must never be visible. Hidden here independently of main.min.css / page scripts,
   so an older shared stylesheet or a script that re-shows .c-selectCustom cannot draw a second "select" in the pill. */
html[data-page=statistics] .c-viewToggle .c-selectWrapper {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

html[data-page=statistics] .c-viewToggle .c-selectCustom {
  display: none !important;
}
