//@import url('https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css');
@import "bootstrap";
@import "variables";
@import "navbar";

body {
    padding: 60px;
    background-color: @body-bg;
    color: #ffffff;
    font-family: @body-font;

    div.main-view {
        position: absolute;
        left: 0;
        right: 0;
        overflow: auto;

        #content {
            padding: 0 30px 54px;
        }
    }

    button, select {
        border: 1px solid @panel-row-border-color;
        background-color: @body-bg;
        height: 40px;
        line-height: 40px;
        font-family: @body-font;

        &.btn {
            border: 1px solid @panel-row-border-color;
            background-color: @body-bg;
            color: @panel-header-font-color;
            line-height: 18px;

            & i {
                margin-right: 4px;
            }

            &:hover {
                color: @panel-header-font-color;
                background-color: @navbar-bg;
            }

            &.active, &:focus {
                background-color: @panel-row-border-color;
                color: #ffffff;
            }
        }

        &.control-btn {
            background-color: @button-bg;
            border-radius: 6px;
            height: 35px;
            padding: 8px 12px;
            color: white;
            margin-right: 10px;

            &:hover {
                background-color: #3A63F0;
                color: white;
            }

            i, svg {
                padding: 0;
                margin-top: 2px;
                margin-right: 5px;
            }

            &.control-neutral {
                color: @nav-item-font-color;
                background-color: @body-bg;
                border: 1px solid @nav-item-font-color;

                &:hover {
                    background-color: @navbar-bg;
                }
            }

            &.control-negative {
                color: @scheduler-not-running;
                background-color: @body-bg;
                border: 1px solid @scheduler-not-running;

                &:hover {
                    background-color: @navbar-bg;
                }
            }
        }

        &.control-btn-round {
            height: 32px;
            width: 32px;
            border-radius: 16px;
            padding: 0;
            margin-top: 4px;
            margin-right: 12px;

            i, svg {
                font-size: 11px;
                margin: 0;

                &.fa-times {
                    font-size: 14px;
                }
            }
        }
    }

    .job-list-container {
        margin-top: 100px;
    }

    .timeline-container {
        margin-top: 86px;
    }

    .view-controls {
        position: fixed;
        width: 100%;
        z-index: 1000;
        background-color: @body-bg;
        padding-top: 32px;
        padding-bottom: 40px;

        select {
            padding: 0 10px;
            border-radius: 4px;
            margin-left: 16px;
        }

        .search-box {
            display: inline-block;
            position: relative;
            color: @panel-header-font-color;

            & .fa-search {
                position: absolute;
                top: 13px;
                left: 30px;
            }

            input {
                height: 40px;
                border: 1px solid @panel-row-border-color;
                border-radius: 4px;
                padding-left: 36px;
                background: transparent;
                color: white;

                &::placeholder {
                    color: @panel-header-font-color;
                }

                &:focus {
                    box-shadow: none;
                    border-color: @panel-header-font-color;
                }
            }
        }

    }

    .page-header {
        margin-top: 15px;
        font-size: 20px;
        font-weight: 400;
    }

    .panel {
        background-color: @body-bg;
        color: @panel-content-font-color;
        border: none;
        font-size: @font-size;
        line-height: @font-size + 4px;

        a:not(.btn) {
            text-decoration: none;
            color: @panel-content-font-color;
        }

        table {
            margin-bottom: 0;
            border: none;

            thead {
                tr {
                    border: none;
                    color: @panel-header-font-color;
                    font-family: @body-font;
                    font-size: 12px;
                    line-height: 16px;
                }
            }

            tr {
                border: none;
                border-bottom: 1px solid @panel-row-border-color;
                font-family: @monospaced-font;

                td, th {
                    border: none;
                    height: 55px - 8px;
                    line-height: 55px - 8px;
                    padding: 2px 2px;
                }

                div.inline-job-controls {
                    margin: 0 auto;
                    width: 120px;
                    height: 55px - 4px;
                    padding-top: 4px;

                    & button:last-child {
                        margin-right: 0;
                    }
                }
            }
        }
    }

    span.job-status-indicator {
        display: inline-block;
        width: 9px;
        height: 9px;
        border-radius: 9px;
        background-color: @job-status-border;
        border: 1px solid @job-status-border;
    }

    span.job_executed {
        background-color: @job-status-executed;
    }

    span.job_added {
        width: 6px;
        height: 6px;
        border-color: @job-status-executed;
    }

    span.job_modified {
        width: 6px;
        height: 6px;
        border-color: @job-status-submitted;
    }

    span.job_removed {
        width: 6px;
        height: 6px;
        border-color: @job-status-error;
    }

    span.job_error {
        background-color: @job-status-error;
    }

    span.job_missed {
        border-color: @job-status-error;
        border-width: 2px;
    }

    span.job_max_instances {
        border-color: @job-status-error;
        border-width: 2px;
    }

    span.job_submitted {
        background-color: @job-status-submitted;
        box-shadow: 0 0 12px rgba(89, 126, 255, 0.7);
    }

    .fa-spinner {
        animation: spin 4s linear infinite;
        font-size: 30px;
        margin-top: 38px;
    }

    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0;
        height: 54px;
        line-height: 54px;

        color: @panel-header-font-color;
        background-color: @navbar-bg;
    }
}

.panel-heading {
    & > i, span {
        margin-right: 10px;
    }

    & .reload-button {
        font-weight: 400;
        margin-left: 10px;
        margin-top: 2px;
        margin-right: 0;

        i {
            margin-right: 5px;
        }

        &:hover {
            cursor: pointer;
            text-decoration: underline;
        }
    }
}


@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}