﻿.ms-Toggle {
    margin-bottom: 8px;
}
.ms-Toggle--inlineLabel {
    display: flex;
    align-items: center;
}
.ms-Toggle--disabled ::deep .ms-Toggle-label {
    color: var(--semanticTextColors-DisabledText);
}
.ms-Toggle--inlineLabel ::deep .ms-Toggle-label {
    margin-right: 16px;
}
.ms-Toggle--inlineLabel.ms-Toggle--onOffMissing ::deep .ms-Toggle-label {
    margin-right: initial;
    margin-left: 16px;
    order: 1;
}
.ms-Toggle-container {
    display: inline-flex;
    position: relative;
}

.ms-Toggle-pill {
    outline: transparent;
    position: relative;
    font-size: 20px;
    box-sizing: border-box;
    width: 40px;
    height: 20px;
    border-radius: 10px;
    transition: all 0.1s ease;
    border: 1px solid var(--semanticColors-SmallInputBorder);
    background: var(--semanticColors-BodyBackground);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 3px;
}

    .ms-Toggle-pill::-moz-focus-inner {
        border: 0;
    }

.ms-Fabric--isFocusVisible .ms-Toggle-pill:focus:after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    bottom: 2px;
    right: 2px;
    border: 1px solid var(--palette-White);
    outline: 1px solid var(--palette-NeutralSecondary);
    z-index: var(--zIndex-FocusStyle);
}

.ms-Toggle--enabled.ms-Toggle--unchecked .ms-Toggle-pill:hover {
    border-color: var(--semanticColors-InputBorderHovered);
}

    .ms-Toggle--enabled.ms-Toggle--unchecked .ms-Toggle-pill:hover .ms-Toggle-thumb {
        background-color: var(--palette-NeutralDark);
    }

.ms-Toggle--enabled.ms-Toggle--checked .ms-Toggle-pill {
    background: var(--semanticColors-InputBackgroundChecked);
    border-color: transparent;
    justify-content: flex-end;
}

    .ms-Toggle--enabled.ms-Toggle--checked .ms-Toggle-pill:hover {
        background-color: var(--palette-ThemeDark);
        border-color: transparent;
    }

.ms-Toggle--disabled .ms-Toggle-pill {
    cursor: default;
}

.ms-Toggle--disabled.ms-Toggle--unchecked .ms-Toggle-pill {
    border-color: var(--semanticTextColors-DisabledBodySubtext);
}

.ms-Toggle--disabled.ms-Toggle--checked .ms-Toggle-pill {
    background-color: var(--semanticTextColors-DisabledBodySubtext);
    border-color: transparent;
    justify-content: flex-end;
}

.ms-Toggle-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.1s ease;
    background-color: var(--semanticColors-SmallInputBorder);
    border-color: transparent;
    border-width: .28em;
    border-style: solid;
    box-sizing: border-box;
}

.ms-Toggle--enabled.ms-Toggle--checked .ms-Toggle-thumb {
    background-color: var(--semanticColors-InputForegroundChecked);
}

.ms-Toggle--disabled.ms-Toggle--unchecked .ms-Toggle-thumb {
    background-color: var(--semanticTextColors-DisabledBodySubtext);
}

.ms-Toggle--disabled.ms-Toggle--checked .ms-Toggle-thumb {
    background-color: var(--semanticColors-DisabledBackground);
}
::deep .ms-Label.ms-Toggle-stateText {
    padding: 0;
    margin: 0 8px;
    user-select: none;
    font-weight: var(--fontWeight-Regular);
}
.ms-Toggle--disabled ::deep .ms-Label.ms-Toggle-stateText {
    color: var(--semanticTextColors-DisabledText);
}
@media screen and (-ms-high-contrast: active) {
    .ms-Toggle--disabled ::deep .ms-Toggle-label {
        color: GrayText;
    }

    .ms-Toggle--enabled.ms-Toggle--unchecked .ms-Toggle-pill:hover.ms-Toggle-thumb {
        border-color: Highlight;
    }

    .ms-Toggle--enabled.ms-Toggle--checked .ms-Toggle-pill:hover {
        background-color: Highlight;
    }

    .ms-Toggle--enabled.ms-Toggle--checked .ms-Toggle-pill {
        background-color: WindowText;
    }

    .ms-Toggle--enabled.ms-Toggle-pill:hover {
        border-color: Highlight;
    }

    .ms-Toggle--enabled.ms-Toggle--checked .ms-Toggle-thumb {
        background-color: Window;
        border-color: Window;
    }

    .ms-Toggle--disabled ::deep .ms-Toggle-stateText {
        color: GrayText;
    }
}
