$namespace: 'cs-';
@import '../../../node_modules/creative-patterns/packages/components/indicators/src/indicators';

.#{$namespace}indicators {
    @include indicators();

    $root: &;

    &__low-stock {
        margin: -0.5rem 0 0.5rem;
        background: $colorAlto;
        padding: 0.7rem 0.8rem;
        border-radius: 4px;
        position: relative;
        color: $colorCeruleanBlue;
        font-size: 1.3rem;

        &:after {
            bottom: 100%;
            left: 50%;
            border: solid transparent;
            content: '';
            height: 0;
            width: 0;
            position: absolute;
            pointer-events: none;
            border-bottom-color: $colorAlto;
            border-width: 7px;
            margin-left: -7px;

            .ie11 {
                bottom: calc(100% - 0.03rem);
            }
        }

        &-icon {
            position: absolute;
            top: 50%;
            margin-top: -1.3rem;
            left: 0.7rem;
            width: 2.4rem;
            height: 2.6rem;
            fill: currentColor;
        }

        &-text {
            display: inline-block;
            padding-left: 3.3rem;
            line-height: 1.25;
        }
    }

    &__recently-bought {
        margin: 1rem 0;
        position: relative;
        color: $colorApple;

        &-icon {
            position: absolute;
            transform: translateY(-50%);
            top: 50%;
            left: 0;
            width: 2.2rem;
            height: 2.3rem;
            fill: currentColor;
        }

        &-text {
            display: inline-block;
            padding-left: 3.5rem;
            line-height: 1.25;
        }
    }

    &__top-attribute {
        position: relative !important;
        margin: 0 0 0 1.2rem !important;
        text-indent: 0.2rem;
        top: -0.2rem;
        left: 0;
        box-shadow: none !important;
        margin-left: 1.2rem !important;
    }

    &__fast-shipping,
    &__free-shipping {
        &-element {
            &--visible {
                display: flex;
                align-items: center;
            }
        }

        &-label {
            align-items: center;

            &:after {
                display: none;
            }

            @include media('<tablet') {
                display: inline-flex !important;
                padding-right: 1rem;
            }
        }

        &-text {
            width: 78%;
            padding-left: 0.3rem;
            color: $colorGray;
            line-height: 1.25;
            font-size: 1.3rem;
        }

        &-important {
            display: block;
            font-weight: 600;
            text-transform: uppercase;

            &--positive {
                color: $colorApple;
            }
        }

        &-icon {
            fill: $colorApple;
            width: 3.3rem;
            height: 2.8rem;

            #{$root}__fast-shipping-element--tomorrow & {
                height: 3rem;
            }

            &--disabled {
                fill: $colorGray;
            }
        }
    }

    &__free-shipping {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 1.2rem 0 0;

        &-icon {
            width: 4rem;
            height: 2.3rem;
        }

        &-text {
            color: $colorApple;
        }

        &-important {
            display: inline;
        }
    }
}
