@import "../../styles/index";
.dnn-switch-container {
    float: left;
    padding: 5px 0;
    .dnn-ui-common-tooltip {
        float: left;
        margin-left: 10px;
        .tooltip-text {
            max-width: 255px;
            text-align: center;
            padding: 7px 15px;
        }
        svg {
            width: 20px;
            height: 20px;
        }
    }
    .switch-label {
        padding-top: 1px;
        color: var(--dnn-color-foreground, @bulgarianRose);
        font-size: 13px;
        font-weight: bold;
        float: left;
    }
    .switch-button {
        float: right;
        .on-off-text {
            margin-top: 2px;
            color: var(--dnn-color-foreground, @bulgarianRose);
            &.place-left {
                float: left;
            }
            &.place-right {
                float: right;
            }
        }
    }
    .dnn-switch {
        display: inline-block;
        position: relative;
        width: 45px;
        height: 21px;
        border-radius: var(--dnn-controls-radius, 14px);
        border: 1px solid var(--dnn-color-foreground-light, @mountainMist);
        background-color: var(--dnn-color-background-dark, @alto);
        margin: 0;
        cursor: pointer;
        transition: background 100ms linear;
        -moz-box-sizing: content-box !important;
        box-sizing: content-box !important;
        &.place-left {
            margin-left: 8px;
        }
        &.place-right {
            margin-right: 8px;
        }
        &.dnn-switch-active {
            background-color: var(--dnn-color-primary, @cerulean);
            .mark {
                left: 24px;
                border-color: var(--dnn-color-foreground-light, @matisse);
            }
        }
        &.dnn-switch-readonly {
            border: 1px solid var(--dnn-color-neutral, @mercury);
            cursor: not-allowed;
            background-color: var(--dnn-color-neutral, @mercury);
            opacity: 0.5;
            .mark {
                border: 1px solid var(--dnn-color-neutral-dark, @mercury);
                background-color: var(--dnn-color-neutral-light, @gallery);
            }
        }
        .mark {
            width: 21px;
            height: 21px;
            display: inline-block;
            border-radius: var(--dnn-controls-radius, 13px);
            background-color: var(--dnn-color-background, @white);
            border: 1px solid var(--dnn-color-foreground-light, @mountainMist);
            position: absolute;
            top: 0px;
            left: 0px;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
            -webkit-transition: left 100ms linear, background-color 100ms linear, border-color 100ms linear;
            -moz-transition: left 100ms linear, background-color 100ms linear, border-color 100ms linear;
            -o-transition: left 100ms linear, background-color 100ms linear, border-color 100ms linear;
            transition: left 100ms linear, background-color 100ms linear, border-color 100ms linear;
            img {
                display: none;
            }
        }
    }
}