.color-switcher {
    font-weight: 500;
    font-size: .85em;
    position: relative;
    height: $color-switcher;
    background-color: $color-neutral-25;
    cursor: pointer;
    box-shadow: 0 0 0 2px $color-neutral-15 inset;

    @include border-radius(0.9rem);
    @include inline-flex;
    @include flex-just(center);

    @include lg-screen {

        &:not(.-simple) {
            min-width: 6.5rem;
        } 
    }

    @include tablet-screen {

        &:not(.-left):not(.-right) {
            z-index: 100;
            position: absolute;
        }

        background-color: lighten($color-neutral, 30%);
        height: 2.25rem;

        @include border-radius(1.25rem);

        svg {
            transform: scale(1.1);
        }

        .caption {
            display: none;
        }

        &:not(.color-switcher-mobile) {
            display: none;
        }

        &.color-switcher-mobile {

            &.dark {

                .color-switcher-toddler {
                    transform: initial !important;
                }
            }
        }
    }

    &-item-state {
        margin: 0;
        height: 1.5rem;

        > span {
            line-height: 1;
        }

        @include flex;
        @include align-items(center);
        @include flex-just(center);

        svg {
            fill: currentColor;

            @include lg-screen {

                margin-left: 0.2rem;
                margin-right: -0.2rem;
            }
        }
    }

    &-item,
    &-toddler-item {
        width: 100%;
        height: 100%;
        padding: 0 0.65rem;

        @include flex;
        @include align-items(center);
        @include flex-just(center);

        @include tablet-screen {

            padding: 0;
            width: 2.25rem !important;
            min-width: 2.25rem !important;

            @include border-radius(1.25rem);
        }
    }

    &-toddler {
        position: absolute;
        top: 0;
        right: 0;
        height: 100%;

        @include tablet-screen {

            height: 2.25rem !important;
            width: 2.25rem !important;

            p {
                width: 100% !important;
            }

            &-item {
                padding: 0;
            }
        }

        &-wrap {
            position: relative;
            height: 100%;
        }

        &-item {
            position: absolute;
            background-color: $color-white;
            width: 100%;
            box-shadow: -3px 0px 6px rgba($color-black, 0.05);

            @include border-radius(0.9rem);

            @include tablet-screen {

                box-shadow: 1px 1px 6px rgba($color-black, 0.05);
            }

            &:hover {

                svg {
                    transform: $scale;

                    @include transition(transform);
                }
            }

            .light {
                z-index: 1;
            }
        }
    }

    // Light state

    &:not(.dark) {

        &:not(.-simple) {

            .color-switcher-item {

                &.dark {

                    svg {

                        @include lg-screen {

                            display: none;
                        } 
                    }
                }
            }
        }

        .color-switcher-toddler {

            &-item {

                &.light {
                    z-index: 1;
                }
            }

            @include tablet-screen {
                
				transform: translateX(-100%) !important;
			}
        }
    }

    // Dark state

    &.dark {

        @include tablet-screen {

            background-color: rgba($color-black-lighter, 0.95%);
        }

        &:not(.-simple) {

            .color-switcher-item {

                &.light {

                    svg {
                        fill: rgba($color-white, 0.75);

                        @include lg-screen {

                            display: none;
                        } 
                    }
                }
            }
        }

        .color-switcher-toddler {

            .color-switcher-toddler-item {
                color: $color-white;
                background-color: darken($color-grey, 10%);

                &.dark {
                    z-index: 1;
                }
            }
        }
    }

    // Simple

    @include lg-screen {

        &.-simple {
            height: 2rem;

            @include border-radius(1rem);

            &:not(.dark) {

                .color-switcher-toddler {
                    transform: translateX(-100%) !important;
                }
            }

            &.dark {

                .color-switcher-toddler {
                    transform: initial !important;
                }
            }

            .color-switcher-item-state {

                svg {
                    margin: 0;
                }
            }

            .color-switcher-item,
            .color-switcher-toddler-item {
                width: 2rem;
                min-width: 2rem;

                @include border-radius(1rem);
            }
        } 
    }
}