/* Theme Switch Component */

.theme-switch {
    display: inline-flex;
}

.theme-switch__checkbox {
    display: none;
}

.theme-switch__label {
    height: 36px;
    width: 72px;
    background-color: var(--primary-bg);
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    box-shadow:
        inset 0 0 5px 4px rgba(255, 255, 255, 1),
        inset 0 0 16px 1px rgba(0, 0, 0, 0.32),
        0 10px 18px rgba(0, 0, 0, 0.10),
        inset 0 0 0 2px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.4s;
}

.theme-switch__label:hover {
    transform: perspective(100px) rotateX(5deg) rotateY(-5deg);
}

.theme-switch__checkbox:checked ~ .theme-switch__label:hover {
    transform: perspective(100px) rotateX(-5deg) rotateY(5deg);
}

.theme-switch__label::before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background-color: var(--primary-text);
    background-image: none;
    left: 8px;
    box-shadow: 0 2px 1px rgba(0, 0, 0, 0.3), 10px 10px 10px rgba(0, 0, 0, 0.20);
    transition: 0.4s;
}

.theme-switch__checkbox:checked ~ .theme-switch__label::before {
    left: 40px;
    background-color: var(--primary-text);
    background-image: none;
    transition: 0.4s;
}

body[data-theme="dark"] .theme-switch__label {
    border-color: rgba(255, 255, 255, 0.35);
}
