$namespace: 'cs-';

.#{$namespace}brands-index {
    $root: &;

    display: block;
    background: $colorWhite;
    margin: 2rem auto 0;
    max-width: 40rem;
    @include media('>=phone-lg') {
        max-width: none;
    }
    @include media('>=tablet') {
        margin: 0 auto;
        max-width: 93rem;
    }

    &__icons-wrapper {
        width: 100%;
        margin: 0 0 2rem;
        display: flex;
        flex-wrap: wrap;
    }

    &__icon {
        width: calc(50% - 1rem);
        height: 5rem;
        margin: 0.5rem;
        padding: 0.5rem;
        display: flex;
        box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.27);
        position: relative;
        box-sizing: border-box;
        @include media('>=tablet') {
            width: calc(25% - 1rem);
        }
        @include media('>=laptop') {
            width: calc(20% - 1rem);
        }
    }

    &__img {
        width: auto;
        position: absolute;
        max-width: 90%;
        max-height: 90%;
        left: 50%;
        top: 50%;
        transform: translate3d(-50%, -50%, 0);
    }

    &__list {
        position: relative;

        &-item {
            display: flex;
            box-sizing: border-box;
            width: 100%;
            padding: 2rem 1rem;
            border-bottom: 1px solid $colorGallery;

            @include media('>=tablet') {
                padding: 4rem 2rem;
            }

            &:last-child {
                border-bottom: 0;
            }
        }
    }

    &__section {
        &-left {
            display: inline-block;
            width: 15%;
            line-height: 1.2;

            p {
                font-size: 3rem;
            }

            @include media('>=tablet') {
                width: 25%;

                p {
                    font-size: 11rem;
                }
            }
        }

        &-right {
            display: inline-block;
            width: 70%;
        }
    }

    &__brands {
        display: flex;
        flex-flow: row wrap;
    }

    &__brand {
        color: $colorMineShaft;
        padding-bottom: 0.5rem;
        width: 50%;

        @include media('<tablet') {
            overflow: hidden;
            text-overflow: ellipsis;
        }

        @include media('>=tablet') {
            width: 33.333%;
        }
    }

    &__desc {
        display: block;
        margin: 2rem 0;
    }

    &__letters {
        margin: 2rem 0;
        @include media('>=tablet') {
            margin: 4rem 0;
        }
    }

    &__letters-wrapper {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 0.5rem 1rem;
        border-top: 1px solid $colorGallery;
        border-bottom: 1px solid $colorGallery;
        @include media('>=tablet') {
            flex-wrap: nowrap;
        }
    }

    &__letter-link {
        display: block;
        padding: 1rem 1.5rem;
        cursor: pointer;
        color: $colorMineShaft;
        @include media('>=tablet') {
            padding: 1rem 1.25rem;
        }
    }

    &__button-wrapper {
        position: fixed;
        width: 100%;
        display: none;
        bottom: 4rem;
        margin: 0 auto;
        max-width: 40rem;
        @include media('>=phone-lg') {
            max-width: none;
        }
        @include media('>=tablet') {
            max-width: 93rem;
        }

        &--update-position {
            position: absolute;
            bottom: 1rem;
        }
    }

    &__button {
        position: absolute !important;
        right: 3rem;
        bottom: 0;

        #{$root}__button-wrapper--update-position & {
            @include media('<tablet') {
                right: 1.8rem;
            }
        }
    }
}
