/* ================================================ */
/* ======== SYSTEM STATUS SHOWN IN HEADER ========= */
/* ================================================ */

/* we show a little icon before the text */
.header-system-status a:before {
    font-size: 12px;
    font-family: "FontAwesome";
}

/* allow for space for the icon before the text */
.header-system-status a span {
    margin-left: 5px;
}

/* font awesome icons for each state */
.header-system-status a.up-to-date:before {
    /* http://fontawesome.io/icon/check/ */
    content: "\f00c";
}

.header-system-status a.out-of-date:before {
    /* http://fontawesome.io/icon/info-circle/ */
    content: "\f05a";
}

.header-system-status a.update-in-progress:before {
    /* http://fontawesome.io/icon/refresh/ */
    content: "\f021";
    /* this one rotates so must be inline block */
    display: inline-block;
    -webkit-animation: spin 1500ms infinite linear;
    animation: spin 1500ms infinite linear;
}

.header-system-status a.system-error:before {
    /* http://fontawesome.io/icon/exclamation-triangle/ */
    content: "\f071";
}

.header-system-status a.reload:before {
    /* http://fontawesome.io/icon/repeat/ */
    content: "\f01e";
}

/* fixing the hover state - bg colour was reset on hover*/
.header-system-status .label[href]:hover,
.header-system-status .label[href]:focus {
    background-color: #9e9e9e !important;
}
.header-system-status .label-danger[href]:hover,
.header-system-status .label-danger[href]:focus {
    background-color: #f44336 !important;
}
.header-system-status .label-info[href]:hover,
.header-system-status .label-info[href]:focus {
    background-color: #03a9f4 !important;
}
.header-system-status .label-warning[href]:hover,
.header-system-status .label-warning[href]:focus {
    background-color: #ff5722 !important;
}
.header-system-status .label-success[href]:hover,
.header-system-status .label-success[href]:focus {
    background-color: #4caf50 !important;
}

/* the toast colours dont match with our them - fix that */
.header-system-status .toast-error {
    background-color: #f44336;
}

/* link to show the errors */
.header-system-status .toast-error a {
    text-decoration: underline;
}
.header-system-status .toast-error a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* force it to use the font awesome warning icon */
.header-system-status .toast-error:before {
    content: "\f071";
    font-family: "FontAwesome";
    float: left;
    margin-left: -30px;
}
.header-system-status#toast-container > .toast-error {
    background-image: none !important;
}

/* the modal dialog for the system errors */
.header-system-status.bootbox .modal-dialog {
    width: 630px;
}
.header-system-status.bootbox .modal-content .modal-body {
    padding-top: 0px;
}

/* loading state - sometimes the iframe takes a while to load */
.header-system-status.bootbox .bootbox-body:before {
    /* read from a data attr so that the javascript can turn the loader off */
    content: attr(data-content);
    font-family: "FontAwesome";
    display: inline-block;
    -webkit-animation: spin 1500ms infinite linear;
    animation: spin 1500ms infinite linear;
    position: absolute;
    right: calc(50% - 15px);
    top: calc(50% - 15px);
    font-size: 30px;
}

.header-system-status.bootbox .bootbox-body iframe {
    width: 100%;
    height: 200px;
    background-color: #ffffff;
}