.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%);
}

/*
* Just for presentation 
*/
section {
  margin: 0 auto;
  max-width: 700px;
  min-width: 380px;
  width: 50vw;
}

/* 
 * SEGMENTED CONTROLS LAYOUT
 */
/*
 * Container
 */
.segmented-controls {
  display: flex;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/*
 * Vissualy hidden radiobuttons
 */
.segmented-controls input {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; /* added line */
}

/* 
 * Labels need to be the same size
 */
.segmented-controls label {
  grid-row: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  flex: 1 1 0px;
  position: relative;
  z-index: 2;
  transition: inherit;
}

/* 
 * Adjust z-index of last label since that contains 
 * the paddle that needs to go beneath all other labels 
 */
.segmented-controls label:last-of-type {
  z-index: 1;
}

/*
 * Paddle 
 */
.segmented-controls label:last-of-type::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -2;
  background-color: black;
  transition: inherit;
}

/*
 * Move paddle depending on which option is selected
 */
/*
 * IOS 13 Theme
 * Special thanks to https://www.figma.com/community/file/768365747273056340
 */
/*
 * Container
 */
.segmented-controls {
  border-radius: 0.5rem;
  background: #f5f5f7;
  height: 2rem;
  padding: 0.125rem;
}

/*
 * Labels 
 */
.segmented-controls label {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
}

/*
 * Dividers
 */
.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: #d2d2d7;
  transition: inherit;
}

/*
 * Selected option 
 */
.segmented-controls input:checked + label {
  font-weight: 600;
  font-size: 0.875rem;
}

/*
 * Hide dividers before and after the selected option
 */
.segmented-controls input:checked + label::before,
.segmented-controls input:checked + label + input + label::before {
  opacity: 0;
}

/*
 * Focus style for keyboard navigation
 */
.segmented-controls:focus-within {
  box-shadow: 0 0 0 0.2rem #5865f1;
}

/*
 * Paddle
 */
.segmented-controls label:last-of-type::after {
  background: white;
  border-radius: 0.4275rem;
  border: 0.5px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.04), 0px 3px 8px rgba(0, 0, 0, 0.12);
}/*# sourceMappingURL=seg.css.map */