@charset 'utf-8';

@col-white: #ffffff;
@col-red-500: #f44336;
@col-red-800: #c62828;
@col-amber-800: #ff8f00;
@col-green-500: #4caf50;
@col-grey-200: #eeeeee;
@col-grey-800: #424242;

@col-text: @col-grey-800;
@col-text-fail: @col-red-800;
@col-back-hover: @col-grey-200;
@col-pending: @col-grey-800;
@col-pass: @col-green-500;
@col-fail: @col-red-500;
@col-medium: @col-amber-800;
@col-slow: @col-red-800;
@col-progress: rgba(255,255,255,0.2);

#mocha {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    font-family: 'Ubuntu', 'Roboto', 'Helvetica', 'Arial', 'sans-serif';
    background: @col-white;

    #mocha-bar {
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        height: 32px;
        color: @col-white;
        background: @col-pending;
        font-size: 14px;
        font-weight: bold;
        line-height: 32px;
        padding: 0 8px;

        &.pass {
            background: @col-pass;
        }
        &.fail {
            background: @col-fail;
        }
        .stats {
            display: block;
            position: absolute;
            right: 8px;
            top: 0;
            cursor: pointer;
        }
        .progress {
            display: block;
            position: absolute;
            right: 0;
            top: 0;
            height: 100%;
            background: @col-progress;
        }
    }

    #mocha-stats {
        display: none;
    }

    #mocha-report {
        position: absolute;
        left: 0;
        top: 32px;
        right: 0;
        bottom: 0;
        overflow-x: auto;
        overflow-y: scroll;

        > .suite {
            margin: 0 auto;
            padding: 32px;
            max-width: 900px;

            > .toggle {
                display: none;
            }
        }
    }

    a, a:active, a:visited, a:hover {
        display: block;
        color: inherit;
        text-decoration: none;
    }

    ul, li, h1, h2 {
        margin: 0;
        padding: 0;
    }

    ul {
        list-style: none;
    }

    h1 {
        color: @col-text;
        height: 24px;
        line-height: 24px;
        font-size: 16px;
        font-weight: bold;

        &:hover {
            background: @col-back-hover;
        }
        a, a:active, a:visited, a:hover {
            padding: 0 8px;
        }
        .count {
            font-size: 0.85em;
        }
        .passed {
            color: @col-pass;
            margin-left: 1em;
        }
        .failed {
            color: @col-fail;
            margin-left: 0.5em;
        }
    }

    h2 {
        font-size: 12px;
        font-weight: normal;
        cursor: pointer;
    }

    pre {
        display: block;
        font-family: 'Ubuntu Mono', 'Monaco', 'Lucida Sans Typewriter', 'monospace';
        font-size: 12px;
        margin: 4px 0 16px 18px;
        padding: 0 8px;
        word-wrap: break-word;
        border-left: 2px solid @col-text;

        &.error {
            color: @col-text-fail;
        }
    }

    .suite {
        position: relative;
        margin: 16px 0 8px 24px;

        .toggle {
            position: absolute;
            left: -24px;
            top: 0;
            width: 24px;
            height: 24px;
            line-height: 24px;
            color: @col-text;
            font-size: 16px;
            font-weight: bold;
            text-align: center;
            cursor: pointer;

            &:hover {
                background: @col-back-hover;
            }
        }
    }

    .test {
        margin-left: 15px;
        padding: 2px 4px;
        overflow: hidden;

        &:hover {
            background: @col-back-hover;
        }
        &.fail {
            color: @col-text-fail;
        }

        &::before {
            content: ' ';
            display: block;
            width: 10px;
            height: 10px;
            float: left;
            margin-right: 8px;
            background: @col-pending;
            border-radius: 20px;
            position: relative;
            top: 3px;
        }
        &.pass::before {
            background: @col-pass;
        }
        &.fail::before {
            background: @col-fail;
        }
        &.pending::before {
            background: @col-pending;
        }

        .duration {
            display: inline-block;
            color: @col-text;
            border: none;
            box-shadow: none;
            font-size: 10px;
            margin-left: 12px;
            float: right;
        }
        &.medium .duration {
            color: @col-medium;
        }
        &.slow .duration {
            color: @col-slow;
        }
    }

    .replay {
        display: none;
    }
}
