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

.#{$namespace}hero {
    @include teaser();
    @include hero();
    $root: &;
    $sliderWidth: 77%;
    $navArrowSize: 5.8rem;
    margin-bottom: 3rem;

    &__wrapper {
        position: static;
    }

    &__content-wrapper {
        padding: 1rem 1.5rem;
        width: 50%;
        @include media('>=phone-lg') {
            padding: 4rem 2.5rem;
        }

        @include media('>=tablet') {
            padding: 3rem 3.5rem;
            width: 60%;
        }

        @include media('>=laptop') {
            padding: 2.5rem 3.5rem 5.5rem;
        }

        @include media('>=desktop') {
            padding: 7rem 3.5rem;
        }
    }

    &__slide {
        background-color: $colorWhite;

        &--prev,
        &--next {
            cursor: pointer;
        }

        &--scheme-dark {
            background-color: $colorWhite;
        }

        &--scheme-light:not(#{$root}__slide--image-uploaded) {
            background-color: $colorMineShaft;
        }
    }

    &__content {
        color: $colorAlto;
        font-weight: 300;
    }

    &__headline {
        margin: 0.5rem 0 0;
        line-height: 110%;
        font-weight: 900;
        color: $colorMineShaft;
        font-size: 5vw;

        #{$root}__slide--scheme-light & {
            color: $colorWhite;
        }

        @include media('>=tablet') {
            font-size: 4vw;
        }

        @include media('>=laptop') {
            font-size: 5.3rem;
            line-height: 5rem;
        }

        @include media('>=desktop') {
            font-size: 6rem;
        }

        @include media('>=tv') {
            font-size: 6.5rem;
            margin-bottom: 1rem;
        }
    }

    &__subheadline {
        margin: 0;
        line-height: 110%;
        font-weight: 400;
        color: $colorMineShaft;
        font-size: 3.9vw;

        #{$root}__slide--scheme-light & {
            color: $colorWhite;
        }

        @include media('>=tablet') {
            font-size: 3.1vw;
        }

        @include media('>=laptop') {
            font-size: 3.3rem;
            line-height: 1.25;
        }

        @include media('>=desktop') {
            font-size: 3.8rem;
        }

        @include media('>=tv') {
            font-size: 4.5rem;
            margin-bottom: 1rem;
        }
    }

    &__text {
        font-size: 4vw;
        font-weight: 400;
        color: $colorMineShaft;
        line-height: 110%;
        margin-top: 1rem;
        margin-bottom: 0.2rem;
        display: none;

        #{$root}__slide--scheme-light & {
            color: $colorWhite;
        }

        @include media('>=tablet') {
            font-size: 2vw;
            display: block;
            margin-bottom: 1rem;
        }

        @include media('>=laptop') {
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
        }

        @include media('>=desktop') {
            margin: 1rem 0 4rem !important;
            line-height: 1.1;
        }

        + #{$root}__cta {
            margin-top: 0;
        }
    }

    &__cta {
        margin-top: 2rem;

        @include media('<tablet') {
            display: none;
        }

        @include media('<laptop') {
            transform: scale(0.9);
            transform-origin: left bottom;
        }

        @include media('<phone-lg') {
            transform: scale(0.7);
        }
    }

    &__nav {
        background: $colorWhite;
        top: 50%;
        transform: translateY(-50%);
        outline: none;
        transition: transform 0.15s ease-in-out;
        border-radius: 6px;
        background-color: $colorWhite;
        box-shadow: 1px 1px 3px 0 rgba(0, 0, 0, 0.35);
        display: none;
        text-align: center;

        @include media('>=tablet') {
            display: block;
            width: 5.5rem;
            height: 5.5rem;
        }

        &:hover,
        &:active,
        &:focus {
            background: $colorWhite;
            border: none;
            box-shadow: 1px 2px 1px -1px rgba(0, 0, 0, 0.35);
        }

        &:hover:not(#{$root}__nav--disabled) {
            transform: translateY(-50%) scale(1.15);
        }

        &-icon {
            fill: $colorCeruleanBlue;

            #{$root}__nav--large & {
                width: 1.2rem;
                height: 2rem;

                @include media('>=phone-lg') {
                    width: 1.5rem;
                    height: 2.5rem;
                }

                @include media('>=tablet') {
                    width: calc((#{$navArrowSize} * 0.95) / 2);
                    height: calc(#{$navArrowSize} * 0.95);
                }
            }
        }

        &--prev {
            left: 0.5rem;

            @include media('>=tablet') {
                left: 0;
            }
        }

        &--next {
            right: 0.5rem;

            @include media('>=tablet') {
                right: 0;
            }
        }

        &--disabled {
            opacity: 0.38;
        }
    }

    &__pagination {
        bottom: 1.5rem;

        @include media('<tablet') {
            position: static;
            transform: none;
            display: flex;
            justify-content: center;
            margin-top: 1rem;
        }

        &-item {
            border-radius: 2px;
            background-color: $colorGallery;
            width: 2.1rem;
            height: 0.8rem;
            transform: skew(-18deg);
            margin: 0 0.9rem 0 0;
            border: none;
            display: inline-block;
            transition: background-color 0.15s, border-color 0.15s;

            &:hover,
            &:focus,
            &:active {
                background-color: $colorGallery;
                border: none;
                box-shadow: none;

                @include media('>=tablet') {
                    background: $colorWhite;
                }
            }

            &--active {
                background: $colorGold;

                &:hover,
                &:focus,
                &:active {
                    background: $colorGold;
                }
            }
        }

        &-button {
            display: block;
            font-size: 0;
            opacity: 0;
            width: 2.1rem;
            height: 0.8rem;
            padding: 0;
            border: 0;
            margin: 0;
        }
    }

    &--centered {
        width: 100%;
        padding: 0;

        @include media('>=tablet') {
            width: $sliderWidth;
            padding: 0 (100% - $sliderWidth) / 2;
        }
    }

    &--as-list-mobile {
        @include media('<tablet') {
            width: 100%;
            padding-left: 0;
            padding-right: 0;

            #{$root}__slides {
                flex-wrap: wrap;
            }

            #{$root}__slide {
                width: 100% !important;
                opacity: 1 !important;
                margin-bottom: 0.5rem;
            }

            #{$root}__pagination {
                display: none;
            }
        }
    }
}
