@import "inc/bootstrap";

// action bars
.test-runner-scope {

    .action-bar.content-action-bar {
        padding: 2px;
        li {
            margin: 2px 0 0 10px;
            border: none;
            &.btn-info {
                padding-top: 6px;
                height: 36px;
                margin-top: 0;
                border-bottom: solid 2px transparent;
                border-radius: 0;
                &.btn-group {
                    border:none !important;
                    overflow:hidden;
                    padding:0;
                    a {
                        float:left;
                        margin: 0 2px;
                        padding: 0 15px;
                        border: 1px solid white(.3);
                        border-radius: 0px;
                        display: inline-block;
                        height: inherit;
                        &:first-of-type {
                            border-top-left-radius: 3px;
                            border-bottom-left-radius: 3px;
                            margin-left: 0;
                        }
                        &:last-of-type {
                            border-top-right-radius: 3px;
                            border-bottom-right-radius: 3px;
                            margin-right: 0;
                        }
                        &:hover, &.active {
                            border-color: white(.8);
                        }
                        .no-label {
                            padding-right: 0;
                        }
                    }
                }
                &:hover, &.active {
                    border-bottom-color: white(.8);
                }
                &:active,
                &.active {
                    a {
                        color: whiten($info, .1);
                        text-shadow: none;
                    }
                    background: whiten($info, .9);
                    border-color: white(.8);

                    &:hover {
                        background: white(1);
                    }
                }
            }
        }

        &.horizontal-action-bar {
            opacity: 1;
            height: #{(map-get($heights, horizontal-action-bar)) * 1px };
            flex-basis: #{(map-get($heights, horizontal-action-bar)) * 1px }; //IE11 touch

            &.top-action-bar > .control-box {

                height: #{(map-get($heights, horizontal-action-bar) - 2) * 1px };

                display: -ms-flexbox;
                display: -webkit-flex;
                display: flex;

                -webkit-flex-direction: row;
                -ms-flex-direction: row;
                flex-direction: row;

                -webkit-flex-wrap: nowrap;
                -ms-flex-wrap: nowrap;
                flex-wrap: nowrap;

                -webkit-justify-content: space-between;
                -ms-flex-pack: space-between;
                justify-content: space-between;

                padding-left: 10px;
                padding-right: 10px;

                .title-box {
                    @include font-size(14);
                    padding: 4px 0 0;

                    -ms-flex : 0 1 auto;
                    -webkit-flex: 0 1 auto;
                    flex: 0 1 auto;
                }
                .progress-box, .item-number-box {
                    padding-top: 4px;
                    white-space: nowrap;

                    -ms-flex : 0 1 auto;
                    -webkit-flex: 0 1 auto;
                    flex: 0 1 auto;

                    .qti-controls {
                        display: inline-block;
                        margin-left: 20px;
                        white-space: nowrap;
                    }

                }
                .timer-box {
                    /*flex item of control-box */
                    -webkit-flex: 1 0 auto;
                    -ms-flex : 1 0 auto;
                    flex: 1 0 auto;
                }
                .progressbar {
                    margin-top: 5px;
                    min-width: 150px;
                    max-width: 200px;
                    height: 0.6em;
                }
            }

            & > .control-box {
                color: white(.9);
                text-shadow: 1px 1px 0 black;
                .lft, .rgt {
                    padding-left: 20px;
                    &:first-child {
                        padding-left: 0;
                    }
                    &:last-child {
                        //text-align: right;
                        ul {
                            display: inline-block;
                        }
                    }
                }
                [class^="btn-"], [class*=" btn-"] {
                    white-space: nowrap;
                }
            }
            .tools-box {
                .action {
                    position: relative;
                    overflow: visible;
                }

                .menu {
                    color: $textColor;
                    background: $canvas;
                    border: 1px solid blacken($canvas, 0.3);
                    overflow: auto;
                    list-style: none;
                    min-width: 150px;

                    margin: 0;
                    padding: 0;

                    position: absolute;
                    bottom: 36px;
                    left: -3px;

                    .action {
                        display: inline-block;
                        text-align: left;
                        width: 100%;
                        white-space: nowrap;
                        overflow: hidden;
                        color: $textColor;
                        border-bottom: 1px solid blacken($canvas, 0.2);
                        margin: 0;
                        @include border-radius(0);
                        height: auto;
                        padding: 8px 15px 9px;
                        line-height: 1;
                        border-left: solid 3px transparent;

                        .icon-checkbox-checked {
                            display: none;
                        }

                        &.active {
                            background-color: blacken($canvas, 0.1);
                            font-weight: bold;
                        }

                        // display checked icon on hover & active states
                        &.hover,
                        &:hover,
                        &.active {
                            .icon-checkbox {
                                display: none;
                            }
                            .icon-checkbox-checked {
                                display: inline-block;
                            }
                        }

                        &:focus,
                        &.hover,
                        &:hover {
                            background-color: $info;
                            color: $textHighlight;
                            border-left-color: blacken($canvas, 0.8) !important;

                            .label, .icon {
                                color: $textHighlight;
                            }
                            .icon {
                                color: whiten($info, 0.9);
                            }
                        }

                        .label, .icon {
                            @include font-size(14);
                            text-shadow: none;
                            color: $textColor;
                        }
                    }
                }
            }

            &.bottom-action-bar {
                overflow: visible;
                position: relative;
                .action {
                    line-height: 1.6;
                }
                .icon {
                    &.no-label {
                        padding-right: 0;
                    }
                }

                // label masking at toolbar level
                .tool-label-collapsed .btn-info,
                .tool-label-collapsed-hover .btn-info:not(:hover),
                // label masking at tool level
                .btn-info.no-tool-label,
                .btn-info.tool-label-collapsed,
                .btn-info.tool-label-collapsed-over:not(:hover) {
                    .text {
                        display: none;
                    }
                    .icon {
                        padding: 0;
                    }
                }
            }
        }
    }

    [data-control="exit"]{
        margin-left: 20px;
    }

    [data-control="comment-toggle"] {
        display:none;
    }


    &.non-lti-context {
        .title-box {
            display:none;
        }
    }

    [data-control="qti-comment"]{
        background-color: $canvas;
        position: absolute;
        bottom: 33px;
        left: 8px;
        text-align: right;
        padding: 5px;
        @include simple-border();
        @include box-shadow(0, 0, 15px, 1px, rgba(0,0,0,0.20));
        textarea {
            display: block;
            height: 100px;
            resize: none;
            width: 350px;
            padding: 3px;
            margin: 0  0 10px 0;
            border: none;
            @include font-size(13);
            @include simple-border();
        }
    }

    // comment
    .tools-box {
        position: relative;
        overflow:visible
    }
}

