.toggle-btn {
    margin-top: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 200px;
    font-family: var(--font-family-default);
}

.toggle-btn .switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: 400%;
    height: 50px;
    width: 70px;
    border-radius: 10px;
}


.toggle-btn .switcher:nth-of-type(1) {

    position: absolute;
    left: 20px;
    color: white;
    background-size: 300%;
    background-position: right;
    background-image: url("../images/white-green.jpg");
}

.toggle-btn input ~ .switcher:nth-of-type(1) {

    animation: slide-out-bg-2 300ms forwards;
}

.toggle-btn input:checked ~ .switcher:nth-of-type(1) {

    /* background-color: var(--green); */
    animation: slide-out-bg 300ms forwards;
}

@keyframes slide-out-bg-2 {
    from { background-position: left; color: black;}
    to { background-position: right; color: var(--white)}
}

@keyframes slide-out-bg {
    from { background-position: right;}
    to { background-position: left; color: black;}
}

.toggle-btn .switcher:nth-of-type(2) {

    position: absolute;
    right: 20px;
    background-size: 300%;
    background-position: right;
    background-image: url("../images/green-white.jpg");

}

.toggle-btn input ~ .switcher:nth-of-type(2) {

    animation: slide-in-bg-2 300ms forwards;
}

@keyframes slide-in-bg-2 {
    from { background-position: left; color: var(--white);}
    to { background-position: right; color: black;}
}

.toggle-btn input:checked ~ .switcher:nth-of-type(2) {

    animation: slide-in-bg 300ms forwards;
}

@keyframes slide-in-bg {
    from { background-position: right;}
    to { background-position: left; color: var(--white);}
}

.toggle-btn label {
    position: absolute;
    display: block;
    width: 200px;
    height: 70px;
    background-color: transparent;
    border-radius: 30px;
    transition: all 300ms linear;
    z-index: 2;
}

.toggle-btn input {

    display: none;
}

/* .toggle-btn label::before {
    position: absolute;
    content: "";
    width: 68px;
    height: 48px;
    background-color: var(--green);
    border: 1px solid black;
    display: block;
    border-radius: 10px;
    top: 10px;
    left: 22px;
    transition: all 100ms linear;
    z-index: -1;
    display: none;
} */