div.ToggleSwitch {
    position: relative;
    display: flex;
    width: 100%;
    height: 2em;
    overflow: hidden;
    border: 1px solid var(--border-color);
    align-items: center;
    cursor: pointer;
}

div.ToggleSwitch.toggle-switch-active {
    background-color: rgb(127, 255, 127);
}

div.ToggleSwitch.toggle-switch-inactive {
    background-color: rgb(255, 127, 127);
}

div.ToggleSwitch.toggle-switch-read-only {
    background-color: var(--text-color-disabled);
}

div.ToggleSwitch > span.toggle-switch-slider {
    flex: 1 1 50%;
    background-color: var(--input-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    text-align: center;
    color: lightgray;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

div.ToggleSwitch > span.toggle-switch-slider > .icon {
    transform: rotate(90deg);
}

div.ToggleSwitch > span.toggle-switch-yes,
div.ToggleSwitch > span.toggle-switch-no {
    color: var(--input-bg-color);
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

div.ToggleSwitch.toggle-switch-active > span.toggle-switch-no {
    display: none;
}

div.ToggleSwitch.toggle-switch-inactive > span.toggle-switch-yes {
    display: none;
}

div.ToggleSwitch > input {
    position: absolute;
    opacity: 0;
    width: 1px;
}
