.back-link {
    position: fixed;
    z-index: 5;

    @include spacer(top);
    @include spacer(left);
    @include flex;
    @include align-items(center);

    .caption {
        opacity: 0;
        transform: translateX(0.5rem);

        @include transition;
    }

    &:hover {

        .caption {
            opacity: 1;
            transform: none;
        }   
    }

    &.showed {
        opacity: 1;
        visibility: visible;
    }
}

// With regular headers

:not(.with-header-sidebar) {

    .back-link {
        margin-top: $header-height;
    }

    &.with-subheader {

        .back-link {
            margin-top: calc(#{$header-height} + #{$subheader-height});
        }
    }

    // With header type 2

    &.with-header-2 {

        .back-link {
            margin-top: $header-height-2;
        }

        &.with-subheader {

            .back-link {
                margin-top: calc(#{$header-height-2} + #{$subheader-height});
            }
        }
    }
}

// With sidebar headers

.with-header-sidebar {

    // With subheader

    &.with-subheader {

        .back-link {
            margin-top: $subheader-height;
        }
    }
}