$helpbar-width: 250px;
$border-width: 4px;

.helpbar-toggler {
    width: 24px;
    height: 24px;
    overflow: hidden;

    display: inline-block;
}

.helpbar-container {
    clear: both;
    height: 28px;
    position: relative;
    top: 1px;
    min-width: 32px;
    right: 10px;

    float: right;

    h2, h3 {
        border-bottom: 0;
        color: var(--white);
        font-size: 1em;
        font-weight: normal;
        margin: 0;
        padding: 0;
    }

    h2 {
        font-size: 1.2em;
    }

    h3 {
        border-bottom: 1px dotted var(--base-color-80);
        font-size: 1.1em;
        margin-bottom: 2px;
        padding-bottom: 2px;
    }

    > .helpbar-toggler {
        float: right;
        margin-top: 2px;
        margin-right: 5px;
    }
}

.helpbar {
    background-color: var(--base-color);
    padding: 8px;
    box-sizing: border-box;
    position: absolute;
    right: -2px;
    top: 0;

    width: $helpbar-width;
    z-index: 1000;

    overflow: auto;
    max-height: calc(100vh - 200px);

    &::before {
        border-bottom: 2px solid var(--base-color-80);
        border-left: $border-width solid transparent;
        border-right: $border-width solid transparent;
        content: '';
        display: none;
        position: absolute;
        top: -1px;
        left: 0;
        right: 0;
    }

    .helpbar-title {
        display: flex;
        justify-content: space-between;
    }

    .helpbar-toggler {
        margin-top: -5px;
        margin-right: -1px;
    }

    .helpbar-widgets {
        color: var(--white);
        list-style: none;
        padding: 0;

        a {
            vertical-align: text-bottom;
        }

        a:link, a:visited {
            color: var(--white);
        }

        a:hover, a:active {
            color: var(--white);
            text-decoration: underline;
        }

        > li {
            border-top: 1px solid var(--content-color);
            padding: 3px 0;
            margin: .4em .25em;
        }
    }

    .help-tours {
        list-style: none;
        margin: 0;
        padding: 0;

        a {
            @include background-icon(play, info_alt);
            background-position: left 2px;
            background-repeat: no-repeat;
            display: block;
            padding-left: 20px;

            &.tour-paused {
                @include background-icon(pause, info_alt);
            }

            &.tour-completed {
                @include background-icon(accept, info_alt);
            }
        }
    }

    a.link-extern {
        @include icon(before, link-extern, info_alt);
    }

    a.link-intern {
        @include icon(before, link-intern, info_alt);
    }
}

section.big-help-box {
    background-color: var(--content-color-40);
    border: 1px solid var(--content-color-80);
    padding: 0.5em;
    margin-top: 0.5em;
    text-align: center;
    display: flex;
    flex-direction: row;

    .icon {
        flex-grow: 1;
    }

    .text {
        flex-grow: 5;
    }
}