input.distrix-switch {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

distrix-switch {
    display: block;
    min-height: 2rem;
    visibility: hidden;
}

.distrix-switch-container {
    display: flex;
    align-items: center;
    min-height: 2rem;
}

.distrix-switch__track {
    display: inline-block;
    position: relative;
    flex: 0 0 38px;
    width: 38px;
    height: 20px;
    padding: 2px;
    border-radius: 20px;
    background-color: #adb5bd;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
    cursor: pointer;
    vertical-align: middle;
    transition: background-color .2s ease;
}

.distrix-switch__label {
    display: flex;
    align-items: center;
    height: 20px;
    margin-left: 8px;
    margin-top: 0;
    margin-bottom: 0;
    line-height: 20px;
    cursor: pointer;
    vertical-align: middle;
}

.distrix-switch__track::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .2s ease;
}

input.distrix-switch:checked + .distrix-switch__track,
.distrix-switch__track.distrix-switch--checked {
    background-color: #28a745;
}

input.distrix-switch:checked + .distrix-switch__track::before {
    transform: translateX(18px);
}

input.distrix-switch:focus + .distrix-switch__track {
    box-shadow: 0 0 0 3px rgba(0, 123, 255, .25);
}

input.distrix-switch:disabled + .distrix-switch__track {
    cursor: not-allowed;
    opacity: .5;
}
