.switch{position:relative;display:inline-block;width:34px;height:20px}.switch input{opacity:0;width:0;height:0}.slider{cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;border-radius:34px}.slider,.slider:before{position:absolute;transition:.4s}.slider:before{content:"";height:12px;width:12px;left:4px;bottom:4px;background-color:#fff;border-radius:50%}input:checked+.slider{background-color:#38a169}input:checked+.slider:before{transform:translateX(14px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}