input, select, textarea {
  width: 100%;
  height: 40px;
  padding: 8px 16px;
  border-radius: 12px;
  border: solid 1px var(--second-dis);
  font-family: "PT Sans";
  font-size: 20px;
  color: var(--second-act);
  background-color: #fff;
  &:hover{
    border-color: var(--second);
    outline: none;
  }
  &:focus, &:focus-visible {
    border-color: var(--prime);
    outline: none;
    
  }
  &:disabled{
    border-color: #EDEDED;
    outline: none;
  }
}

.invalid {
  input, select, .textbox {
    border-color: #e60046!important;
  }
}


.switch {
  width: 44px;
  height: 24px;
  margin: auto 0;
  padding: 2px;
  border-radius: 12px;
  background-color: #fff;
  border: 1px solid var(--second);
  cursor: pointer;
  transition: background-color 0.3s;
  &:before {
    display: block;
    width: 18px;
    height: 18px;
    background-color: var(--second-dis);
    border-radius: 9px;
    transition: transform 0.3s;
    content: '';
  }
  &.active {
    background-color:var(--prime);
    border-color:var(--prime);
    &:before {
      transform: translateX(20px);
      background-color: #fff;
    }
  }
  &.active{
    &:hover {
      background-color:var(--prime-hov);
      border-color:var(--prime-hov);
      &:before {
        transform: translateX(20px);
      }
    }
    &:focus{
      background-color:var(--prime-act);
      border-color:var(--prime-act);
      &:before {
        transform: translateX(20px);
      }
    }
  }
  &:not(.active):hover {
    border-color:var(--second-hov);
    &:before {
      background-color: var(--second);
    }
  }
  &.disabled {
    opacity: 0.5;
  }
}



.checkbox {
  position: absolute;
  z-index: -1;
  opacity: 0;
}

.checkbox+label {
  display: inline-flex;
  align-items: center;
  user-select: none;
  font-size: 20px;
}
.checkbox+label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  flex-grow: 0;
  margin-right: 0.5em;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  background-image: url("~/src/assets/images/icons/checkbox/checbox_none_base_24dp.svg");
}
.checkbox:checked+label::before {
  background-image: url("~/src/assets/images/icons/checkbox/checbox_check_base_24dp.svg");
}
.checkbox:not(:disabled):not(:checked)+label:hover::before {
  background-image: url("~/src/assets/images/icons/checkbox/checbox_none_hover_24dp.svg");
}
.checkbox:not(:disabled):checked+label:hover::before {
  background-image: url("~/src/assets/images/icons/checkbox/checbox_check_hover_24dp.svg");
}
.checkbox:not(:disabled):checked:active+label::before {
  background-image: url("~/src/assets/images/icons/checkbox/checbox_check_active_24dp.svg");
}
.checkbox:not(:disabled):not(:checked):active+label::before {
  background-image: url("~/src/assets/images/icons/checkbox/checbox_none_active_24dp.svg");
}
.checkbox:focus:checked+label::before {
  background-image: url("~/src/assets/images/icons/checkbox/checbox_check_hover_24dp.svg");
}
.checkbox:focus:not(:checked)+label::before {
  background-image: url("~/src/assets/images/icons/checkbox/checbox_none_hover_24dp.svg");
}
.checkbox:disabled:checked+label::before {
  background-image: url("~/src/assets/images/icons/checkbox/checbox_check_disabled_24dp.svg");
}
.checkbox:disabled:not(:checked)+label::before {
  background-image: url("~/src/assets/images/icons/checkbox/checbox_none_disabled_24dp.svg");
}




switch{
    
  $bull: 18px;
  $offset: 2px;
  $track: 20px;
  >div{
      border: 1px solid var(--second);
      display: inline-flex;
      border-radius: $bull + 3px;
      div{
        width: $bull;
        height: $bull;
        background-color: var(--second-dis); 
        border-radius: 50%;
        margin: $offset $track $offset $offset;
        border: none;
      }
  }
  >div.on{
      border: 1px solid var(--prime);
      background-color: var(--prime);
      div{
          margin: $offset $offset $offset $track;
          background-color: var(--white);
          border: none;
          animation: switch-on 0.1s;
      }
  }
  >div.off{
      div{
          animation: switch-off 0.1s;
      }
  }

  @keyframes switch-on {
      0% {margin:  $offset $track $offset $offset;}
      100% {margin: $offset $offset $offset $track;}
  }

  @keyframes switch-off {
      100% {margin:  $offset $track $offset $offset;}
      0% {margin: $offset $offset $offset $track;}
  }
}

.switch-host{
  cursor: pointer;
}
.switch-host:hover{
  color: var(--prime-act);
  switch{
    >div.on{        
        background-color: var(--prime-act);
        div{
          background-color: var(--white);
          border: none;
        }
    }
    >div{
        border-color: var(--prime-act);
        div{
          background-color: var(--prime-act);
          border: none;
        }
    }
  }
}