input, select, textarea {
  width: 100%;
  height: 32px;
  padding: 4px 8px ;
  border-radius: 4px;
  border: solid 1px var(--second);
  background-color: #fff;
  font-size: 15px;
  &:hover{
    border-color: var(--active);
    outline: none;
  }
  &:focus, &:focus-visible {
    border-color: var(--prime);
    outline: none;
    
  }
  &:disabled{
    border-color: #EDEDED;
    outline: none;
  }
}

.invalid {
  input, select, .textbox {
    border-color: var(--active)!important;
  }
}


.toggle {
  cursor: pointer;
  &:hover{
    color: var(--active);
    .switch{
      background-color: white;
      border-color:var(--active);
      &:before {
        background-color: var(--active);
      }
      &.active{
        background-color:var(--active);
        border-color:var(--active);
        &:before {
          background-color: white;
        }
      }
    }
  }
  .switch {
    width: 28px;
    height: 16px;
    margin: auto 0;
    padding: 1px;
    border-radius: 8px;
    background-color: white;
    border: 1px solid var(--second);
    cursor: pointer;
    transition: background-color 0.3s;
    &:before {
      display: block;
      width: 12px;
      height: 12px;
      background-color: var(--second);
      border-radius: 6px;
      transition: transform 0.3s;
      content: '';
    }
    &.active{
      background-color:var(--prime);
      border-color:var(--prime);
      &:before {
        background-color: white;
        transform: translateX(12px);
      }
    }
  }
}



switch{
  
$bull: 12px;
$offset: 2px;
$track: 14px;
div{
    border: 1px solid var(--second);
    display: inline-flex;
    border-radius: $bull + 3px;
    div{
       width: $bull;
       height: $bull;
       background-color: var(--second); 
       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:hover switch{
  div.on{        
      background-color: var(--active);
      div{
         background-color: var(--white);
         border: none;
      }
  }
  div{
      border-color: var(--active);
      div{
         background-color: var(--active);
         border: none;
      }
  }
}