/* FC Bricks Toggle Field (v1.2.0)
   UI button that mirrors a hidden input's value (0/1 by default).
*/

button.fc-toggle-btn{
  -webkit-appearance: none;
  appearance: none;

  width: 3em;
  height: 1.65em;
  border-radius: 999px;

  border: 1px solid rgba(0,0,0,.12);
  background-color: var(--fc-toggle-off, #cfd3d7);

  display: inline-block;
  position: relative;
  vertical-align: middle;
  cursor: pointer;

  padding: 0;
  outline: none;

  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

button.fc-toggle-btn::before{
  content: "";
  position: absolute;
  top: 50%;
  left: .2em;

  width: 1.25em;
  height: 1.25em;
  border-radius: 50%;

  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 1px 2px rgba(0,0,0,.22);
  transition: transform .18s ease;
}

button.fc-toggle-btn.is-on{
  background-color: var(--fc-toggle-on, #22c55e);
}

button.fc-toggle-btn.is-on::before{
  transform: translate(1.35em, -50%);
}

button.fc-toggle-btn:focus{
  box-shadow: 0 0 0 3px rgba(0,0,0,.12);
}

button.fc-toggle-btn[disabled]{
  opacity: .55;
  cursor: not-allowed;
}
