.#{$namespace}table {
    $root: &;
    $rootNoChangeMobile: #{$root}--no-change-mobile;
    font-size: 1rem;
    max-width: 100%;
    width: 100%;

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

    &--tablet-small {
        @include media('<laptop') {
            border: none;
            font-size: 1.4rem;
            padding: 0;

            &:last-child {
                padding-bottom: 1.2rem;
            }
        }

        #{$root}__head {
            @include media('<laptop') {
                display: none;
            }
        }

        #{$root}__col {
            @include media('<laptop') {
                border: none;
                display: block;
                font-size: 1.4rem;
                padding: 0.2rem;

                &:first-child {
                    padding-top: 2rem;
                }

                &:last-child {
                    padding-bottom: 1rem;
                }
            }

            &:before {
                @include media('<laptop') {
                    padding-right: 10px;
                    content: attr(data-th) ': ';
                    display: inline-block;
                    color: $colorMineShaft;
                    font-weight: 700;
                }
            }

            &--actions {
                @include media('<laptop') {
                    border-bottom: 1px solid $colorAlto;
                }

                &:before {
                    @include media('<laptop') {
                        /* stylelint-disable-line */
                        @include visually-hidden; /* stylelint-disable-line */
                    }
                }
            }
        }
    }

    &--cart {
        @include media('>=tablet') {
            border-top: 1px solid $colorAlto;
            margin-top: 2rem;

            #{$root}--cart & {
                border-top: none;
            }
        }

        @include media('<tablet') {
            padding: 0.4rem 0;
        }
    }

    &--footer {
        table-layout: fixed;
        @include media('<tablet') {
            #{$root}__foot {
                display: block;

                tr {
                    display: flex;
                    justify-content: flex-end;
                }
            }
        }
    }

    &--no-change-mobile {
        #{$root}__col {
            vertical-align: middle;
        }
    }

    &.grouped {
        tbody:last-child {
            #{$root}__col {
                border-bottom: none;
            }
        }
    }

    &__head {
        border-bottom: 2px solid $colorAlto;
        @include media('<tablet') {
            display: none;
        }

        &--spacious {
            th {
                padding: 1.3rem 1.5rem 1.3rem 0.1rem;
            }
        }
    }

    &__col-head {
        @extend .#{$namespace}t-headline;
        @extend .#{$namespace}t-headline--size_4;

        &--right {
            text-align: right;
        }
    }

    &__row {
        &--no-border {
            #{$root}__col {
                border-top: none;
                border-bottom: none;
            }
        }
    }

    &__col {
        font-size: 1.4rem;
        color: $colorDoveGray;
        font-weight: 300;
        border-bottom: 1px solid $colorAlto;
        padding: 0.8rem 1rem;

        #{$root}:not(#{$rootNoChangeMobile}) & {
            @include media('<tablet') {
                border: none;
                display: block;
                padding: 0.4rem 2rem;

                &:first-child {
                    padding-top: 2rem;
                }

                &:last-child {
                    padding-bottom: 1.2rem;
                }
            }

            &:before {
                @include media('<tablet') {
                    padding-right: 10px;
                    content: attr(data-th) ': ';
                    display: inline-block;
                    color: $colorMineShaft;
                    font-weight: 700;
                }
            }
        }

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

        &--attention {
            font-weight: 700;
            color: $colorMineShaft;
        }

        &--actions {
            @include media('<tablet') {
                border-bottom: 1px solid $colorAlto;
            }

            &:before {
                @include media('<tablet') {
                    @include visually-hidden;
                }
            }
        }

        &--label {
            @include media('<tablet') {
                display: none !important;
            }
        }

        &.price {
            .price {
                font-weight: 400;
                font-size: 1.4rem;
            }
        }

        &.subtotal,
        &.total {
            .price {
                color: $colorMineShaft;
                font-size: 1.4rem;
            }
        }

        &.qty {
            ul {
                list-style: none inside none;
                padding-left: 0;
                margin-bottom: 0;
            }

            li {
                margin-bottom: 0;
            }
        }
    }

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

        &--right {
            text-align: right;
        }
    }

    &__tbody {
        border-bottom: 1px solid $colorAlto;
    }

    &__foot {
        font-size: 1.4rem;
        @include media('<tablet') {
            background: $colorGallery;
        }

        .mark {
            text-align: right;
        }

        @include media('<tablet') {
            .amount {
                text-align: right;
            }
        }
    }
}

.account .#{$namespace}table tr:first-child .#{$namespace}table__col {
    @include media('<laptop') {
        padding-top: 0 !important;
    }
}
