.status-display-bar-container {
    width: 100%;
    height: 40px;
    display: flex;
}

.status-display-bar {
    width: 5px;
    height: 100%;
    margin: 0 4px;
    display: inline-block;
    position: relative;
}

/* Bar colours */
.status-display-bar-state-unknown {
    background-color: #888888;
}
.status-display-bar-state-unknown:hover {
    background-color: #444444;
}
.status-display-bar-state-ok {
    background-color: #00ff00;
}
.status-display-bar-state-ok:hover {
    background-color: #008800;
}
.status-display-bar-state-fail {
    background-color: #ff0000;
}
.status-display-bar-state-fail:hover {
    background-color: #880000;
}
.status-display-bar-state-part {
    background-color: #ffff00;
}
.status-display-bar-state-part:hover {
    background-color: #888800;
}

/* Details popup */
.status-display-details {
    position: absolute;
    background-color: #eee;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    z-index: 2;
    bottom: 100%;
    /* Centre the box */
    transform: translateX(-50%);
    visibility: hidden;
    margin-bottom: 8px;
    border: #888888 2px solid;
}

/* Popup arrow */
.status-display-bar::before {
    visibility: hidden;
    width: 10px;
    height: 10px;
    background-color: #888888;
    position: absolute;
    bottom: calc(100% + 5px);
    content: '';
    transform: translateX(-3px) rotate(45deg) scale(1);
    z-index: 1;
}
.status-display-bar:hover::before {
    visibility: visible;
}

.status-display-bar:hover .status-display-details {
    visibility: visible;
}

.status-display-details-contents {
    width: 100%;
    height: 100%;
    color: #1a1a1a;
}

.status-display-details-timerange-hours, .status-display-details-timerange-days {
    display: inline-block;
    font-weight: bold;
}

.status-display-details-results-table-time {
    text-align: left;
}
.status-display-details-results-table-result {
    text-align: right;
    padding-left: 1em;
}

/* Dark mode hours */
@media (prefers-color-scheme: dark) {
    .status-display-details {
        background-color: #1a1a1a;
    }

    .status-display-details-contents {
        color: #eee;
    }
}

