@import "../lib/page.scss";
@import "../lib/table.css";
@import "../../node_modules/@patternfly/patternfly/components/Button/button.scss";

#dashboard-hosts {
    /* Dashboard list is narrow enough in extreme mobile mode to not overflow */
    /* This is a work-around to enable tooltips to escape panel bounds. */
    overflow: visible;
}

#dashboard-hosts .list-group-item {
    border-left-width: 7px;
    border-left-style: solid;
    border-top: none;
    position: relative;
    outline: 0;
}

#dashboard-hosts .list-group-item:before {
    content: "";
    position: absolute;
    border-top: 1px solid #BABABA;
    top: 0px;
    left: 0px;
    right: 0px;
    height: 1px;
}

#dashboard-hosts .list-group-item:first-child:before {
    border-top-color: transparent;
}

#dashboard-hosts .list-group button {
    margin-right: 0.3rem;
    margin-left: 0.3rem;
    float: right;
}

/* Per server buttons not visible by default */
#dashboard-hosts .list-group button {
    display: none;
}

/* When panel is editable, then buttons are visible */
#dashboard-hosts.editable .list-group button {
    display: inline-block;
}

#dashboard-hosts.editable .list-group-item:hover {
    background-color: var(--color-gray-1);
    cursor: auto;
}

#dashboard-hosts .spinner {
    float: left;
    margin: 6px 13px 4px 3px;
}

#dashboard-hosts .list-group-item span.reconnecting {
    color: var(--color-subtle-copy);
    display: inline;
    padding-left: 20px;
}

.host-avatar {
    border-radius: 3px;
    margin-right: 10px;
    width: 32px;
    height: 32px;
}

#dashboard-hosts .list-group-item .host-avatar {
    float: left;
    border-style: none;
}

#dashboard-hosts .list-group-item > span {
    padding-top: 6px;
    padding-bottom: 4px;
    display: inline-block;
}

#dashboard-hosts .list-group-item div.os {
    padding-top: 6px;
    padding-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    color: var(--color-subtle-copy);
    float: right;
}

#dashboard-toolbar > div.ct-select,
#dashboard-toolbar > div.dropdown {
    display: inline-flex;
}

#dashboard-toolbar .dropdown-toggle span {
    display: inline-block;
    width: 6em;
    text-align: left;
    padding-left: 5px;
}

@media (max-width: 400px) {
    #dashboard-hosts .list-group-item div.os {
        display: none;
    }
    #dashboard-hosts .list-group-item span.reconnecting {
        display: none;
    }
}

.zoom-controls {
    --dropdown-max: 1fr;
    display: none;
}

@media (min-width: 640px) {
    .zoom-controls {
        --dropdown-max: 10rem;
    }
}

.show-zoom-controls .zoom-controls {
    display: grid;
    grid-auto-flow: column;
    grid-gap: 0.5rem;
    justify-content: end;
    margin: 0 0 0.5rem 0;
    position: relative;
    /* Put size constraints on the first column, the dropdown */
    grid-template-columns: minmax(5rem, var(--dropdown-max)) 2.5rem min-content;
    min-height: 2.25rem;
}

/* Make the dropdown take up space vertically */
.zoom-controls > .dropdown,
.standard-zoom-controls > .dropdown {
    display: inline-flex;
}

/* Ensure zoom button is proper width */
.zoom-controls > .pf-c-button {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Make the custom dropdown button properly stretchy */
.zoom-controls > .dropdown > .pf-c-button,
.standard-zoom-controls > .dropdown > .pf-c-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.show-zoom-cursor .zoomable-plot {
    cursor: ew-resize;
}

.dashboard-plot {
    margin-bottom: 10px;
    height: 250px;
}

#host-edit-avatar {
    margin-top: 10px;
}

#host-edit-avatar canvas:hover {
    cursor: pointer;
    box-shadow: inset 0px 0px 0px 1px #7BB2DD;
}

#host-edit-apply {
    min-width: 55px;
}

#host-edit-file-input {
    display: none;
}

/* Make the time range buttons equal width */

#dashboard-range-buttons button {
    width: 70px;
}
