/* Reset just around the switch to avoid глобальных побочных эффектов */
.stylemanager-switch-wrap,
.stylemanager-switch-wrap * {
    box-sizing: border-box;
}

.stylemanager-switch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stylemanager-switch {
    position: relative;
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.stylemanager-switch__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.stylemanager-switch__track {
    position: relative;
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: hsl(0deg 0% 100%);
    /* box-shadow: 0 0 0 0 rgb(88 66 66 / 0%), 0 4px 10px rgb(22 22 22); */
    transition: background 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    /* border: 1px solid #ddd; */
}

.stylemanager-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4bb3ff;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.stylemanager-switch__icon {
    position: absolute;
    top: 4px;
    width: 16px;
    height: 17px;
    color: #FFEB3B;
    transition: color 0.3s ease, transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.stylemanager-switch__icon--light {
    left: 4px;
}

.stylemanager-switch__icon--dark {
    right: 4px;
    transform: translateY(18px);
}

.stylemanager-switch__label {
    font-size: 14px;
    line-height: 1.4;
    color: inherit;
}

.stylemanager-switch__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.stylemanager-switch__input:focus-visible + .stylemanager-switch__track {
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.35), 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stylemanager-switch__input:checked + .stylemanager-switch__track {
    background: #405a9d;
}

.stylemanager-switch__input:checked + .stylemanager-switch__track .stylemanager-switch__thumb {
    transform: translateX(20px);
}

.stylemanager-switch__input:checked + .stylemanager-switch__track .stylemanager-switch__icon--light {
    transform: translateY(-18px);
    color: rgba(255, 255, 255, 0.8);
    left: 4px;
    top: 2px;
}

.stylemanager-switch__input:checked + .stylemanager-switch__track .stylemanager-switch__icon--dark {
    transform: translateY(0);
    color: #405a9d;
}
