/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : Aug 8, 2024, 2:21:44 PM
    Author     : 17113
*/

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



/*
 * Container
 */
.segmented-controls {
  /*border-radius: 0.5rem;*/
  /*background: #e2e2e9;*/
  border-radius: 1rem;
  background: #ffffff;
  height: 1.8rem;
  padding: 0.125rem;
  border: 1px solid #e2e2e9;
  width: 70px;
  margin: 0;
}

/*
 * Labels 
 */
.segmented-controls label {
  font-size: 0.8125rem;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  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: rgba(0, 0, 0, 0.15);
  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 rgba(0, 122, 255, 0.75);
}

/*
 * Paddle
 */
.segmented-controls label:last-of-type::after {
  background: lightblue;
  /*background: white;*/
  /*border-radius: 0.4275rem;*/
  border-radius: 1rem;
  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);*/
}


.segmented-controls, .segmented-controls:focus {
    outline: none !important;
    box-shadow:none !important;
}
.segmented-controls label {
    border-radius: 1rem;
}