.e-switch {
    position: relative;
    display: inline-block;
    width: fit-content;
    height: 14px;
    min-width: 38px;
    min-height: 38px;
    line-height: 38px;
    display: flex; 
    flex-direction: row;
}

.e-switch .box {
    position: relative;
    min-width: 38px;
    min-height: 38px;
    line-height: 38px;
    z-index: 999;
}

.e-switch .content {
    position: relative;
    min-width: 38px;
    min-height: 38px;
    line-height: 38px;
    z-index: 999;
    flex-basis: 100%;
}

.e-switch .checkbox , .e-switch .box .checkbox {
    position: absolute; 
    width: 100%; 
    height: 100%;
    min-width: 38px;
    min-height: 21px;
    opacity: 0;
    left: 0;
    top: 0;
    z-index: 999; 
    cursor: pointer; 
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
}
.e-switch .checkbox:focus , .e-switch .checkbox:focus-visible  , .e-switch .box .checkbox:focus {
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.e-switch .toggle {
    position: absolute;
    cursor: pointer; 
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
    width: 38px;
    height: 14px;
    top: 50%;
    margin-top: -7px; 
    flex-basis: 38px;
}

.e-switch.iphone .toggle {
    width: 42px;
    height: 26px; 
}

.e-switch .toggle:before {
    position: absolute;
    content: " ";
    height: 21px;
    width: 21px;
    left: 0px; 
    top: -3px; 
    bottom: 4px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 0 20px rgb(148, 148, 148); 
}

.e-switch.iphone .toggle::before {
    top: 2px;
    left: 2px;
}

.e-switch .checkbox:checked + .toggle {
    background-color: var(--bs-primary);
}

.e-switch .checkbox:checked + .toggle:before {
    left: 19px !important;
}