.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--grey-100);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.fa-sun {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: #ffc107;
}

.fa-moon {
    position: absolute;
    top: 50%;
    right: 12%;
    transform: translateY(-50%);
    color: #333;
}

input:checked+.slider .fa-sun {
    color: #333;
}

input:checked+.slider .fa-moon {
    color: #ffc107;
}