.segmented-controls {
  box-sizing: border-box;
  display: flex;
  position: relative;
  overflow: hidden;
  transition: all .2s ease;  
  border: 1px solid var(--Thin-line);
  border-radius: 6px;
  background: var(--Bg-light-lighter);
  color: var(--Primary-font-lighter);
  height: 2rem;
  user-select: none;
  
}

.segmented-controls-disabled {
  /* A lazy disabled state style... */
  opacity: 0.35;
}

/* Smaller version */

.segmented-controls.segmented-controls-sm {
  height: auto;
  padding: 2px;
}
.segmented-controls.segmented-controls-sm label {
  padding: 0.25rem 0.5rem;
}
.segmented-controls.segmented-controls-sm label:last-of-type {
  padding-inline-end: 0.125rem ;
}

/* --- */

.segmented-controls input {
  display: none;
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px);
  /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);  
  /* added line */
}

.segmented-controls label {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  flex: 1 1 0px;
  position: relative;
  z-index: 2;
  transition: inherit;
  font-size: var(--fs-400);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  padding: 0.5rem;
  border: 1px solid transparent; 
}

.segmented-controls label:last-of-type {
  z-index: 1;
}

.segmented-controls label:last-of-type::after {
  content: "";
/*  position: absolute;*/
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -2;
  background: #D0D1D2;
  transition: inherit;
}

.segmented-controls label:last-of-type::after {
  background: rgba(var(--Primary-color)); 
  border-radius: 6px;
}

.segmented-controls input:nth-last-of-type(2):checked~label:last-of-type::after {
  transform: translateX(-100%);
}

.segmented-controls input:nth-last-of-type(3):checked~label:last-of-type::after {
  transform: translateX(-200%);
}

.segmented-controls input:nth-last-of-type(4):checked~label:last-of-type::after {
  transform: translateX(-300%);
}

.segmented-controls input:nth-last-of-type(5):checked~label:last-of-type::after {
  transform: translateX(-400%);
}

.segmented-controls input:nth-last-of-type(6):checked~label:last-of-type::after {
  transform: translateX(-500%);
}

.segmented-controls input:nth-last-of-type(7):checked~label:last-of-type::after {
  transform: translateX(-600%);
}

.segmented-controls input:nth-last-of-type(8):checked~label:last-of-type::after {
  transform: translateX(-700%);
}

.segmented-controls input:nth-last-of-type(9):checked~label:last-of-type::after {
  transform: translateX(-800%);
}

.segmented-controls input:nth-last-of-type(10):checked~label:last-of-type::after {
  transform: translateX(-900%);
}

.segmented-controls label:not(:first-of-type)::before {
  content: "";
  position: absolute;
  z-index: -3;
  top: 0.5rem;
  left: 0;
  bottom: 0.5rem;
  width: 1px;
  background: var(--Thin-line);
  transition: inherit;
}

.segmented-controls input:checked+label {
/*  background: rgba(var(--Primary-color));*/  
/*  color: rgba(var(--Primary-font));*/
  color: rgba(var(--Primary-color));
  background: var(--Bg-light-lightest);
/*  border: 1px solid var(--Thin-line);*/
  border-radius: 4px;  
  box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);
}

.segmented-controls#stat-type-switch label {
    white-space: normal;
}

.segmented-controls input:checked+label::before,
.segmented-controls input:checked+label+input+label::before {
  opacity: 0;
}
@media (max-width: 768px) {

  .segmented-controls {
    height: 2.75rem;    
  }
}