.dark-mode-switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 24px;
    margin: 0;
    cursor: pointer;
}

.dark-mode-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

/* Make the toggle item not act like a button */
#darkModeToggle {
    cursor: default !important;
    background: transparent !important;
}

#darkModeToggle:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] #darkModeToggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.dark-mode-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.dark-mode-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .dark-mode-slider {
    background-color: #2196F3;
}

input:checked + .dark-mode-slider:before {
    transform: translateX(21px);
}

/* Dark mode styles for the switch in dark mode */
[data-theme="dark"] .dark-mode-slider {
    background-color: #4a4a4a;
}

[data-theme="dark"] input:checked + .dark-mode-slider {
    background-color: #3366ff;
}
