@import "../lib/page.scss";
@import "../lib/table.css";

@import "../../node_modules/@patternfly/patternfly/components/Page/page.css";
@import "../../node_modules/@patternfly/patternfly/components/Alert/alert.scss";
@import "../lib/ct-card.scss";

/* Style the list cards as ct-cards */
.pf-c-page__main-section > .pf-c-card {
    @extend .ct-card;
}

/* Create a hybrid popover with an alert style */
.ct-popover-alert .pf-c-popover__content {
    @extend .pf-c-alert;
    @extend .pf-m-danger;
    display: block;
    box-shadow: none;
}

/* Also style the hybrid popover alert title like an alert */
.ct-popover-alert .pf-c-title {
    @extend .pf-c-alert__title;
    font-size: inherit;
}

.icon-2x-vms {
    font-size: 2em;
}
.icon-3x-vms {
    font-size: 3em;
}

.machines-width-max {
    width: 100%;
}

.usage-donut-caption {
    text-align: center;
    width: 200px;
}

.machines-disks-source {
    &-label {
        border-radius: var(--pf-global--BorderRadius--sm);
        padding: var(--pf-global--spacer--xs) var(--pf-global--spacer--sm);
        margin-right: var(--pf-global--spacer--sm);
        background: var(--pf-global--BackgroundColor--300);
        color: var(--pf-global--Color--300);
    }

    &-label,
    &-value {
        font-size: var(--pf-global--FontSize--sm);
    }
}

.machines-listing-detail-top-column {
    vertical-align: top;
}

.machines-console-frame {
    height: 1px; /* keep at minimum, down-sizing does not work */
    margin-top: 1em;
}

.machines-console-frame-vnc {
    width: 100%;
    height: 100%;
    margin-top: -2em;
}

.left-delimiter {
    padding: 0 13px 0;
}

.left-delimiter + .left-delimiter {
    border-left: 1px solid #d1d1d1;
    padding-left: 15px;
}

.top-right-menu {
    float: right;
    padding-bottom: 5px;
    position: absolute;
    right: 5em;
}

.blue {
    color: var(--color-link);
}

.machines-desktop-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    margin-top: var(--pf-global--spacer--md);
}

.machines-desktop-main-col {
    text-align: center;
    vertical-align: top;

    > button.pf-m-secondary {
        margin-bottom: var(--pf-global--spacer--sm);
    }
}

.machines-desktop-manual-con-details {
    display: inline-block;
    text-align: left;
}

.machines-desktop-shell-command {
    color: var(--color-subtle-copy);
}

.machines-desktop-more-info-container {
    display: inline-block;
    max-width: 40em;
}

.machines-desktop-more-info-text {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.machines-desktop-install-instructs {
    display: inline-block;
    padding: 0;
    margin: 0 2em 10px;
}

.machines-desktop-install-instructs-item {
    text-align: left;
}

.machines-desktop-install-instructs-row {
    display: inline-flex;
}

.machines-network-source-descr {
    color: var(--color-subtle-copy);
    text-align: right;
    padding: 5px 10px 5px 10px !important;
}

.machines-network-source-value {
    padding: 5px 10px 5px 10px !important;
    text-align: left !important;
}

.machines-network-up {
    color: green;
}

.machines-network-down {
    color: red;
}

.machines-network-source-link {
    cursor: pointer;
    text-decoration: underline;
    color: var(--alert-info-text);
}

.machines-listing-actions {
    display: flex;
    justify-content: flex-end;
    margin: -0.25rem 0;
}

.machines-listing-actions > button {
    margin: 0.25rem 0 0.25rem 0.5rem;
}

.panel-heading .btn {
    margin-left: 3px;
}

.console-actions-buttons {
    margin-left: 5px;
}

.console-actions {
    float: right;
    position: relative;
    top: -2em;
}

.machines-status-alert {
    padding-right: 5px;
}

#vcpus-tooltip.pficon-pending, #boot-order-tooltip.pficon-pending,
.machines-disks .pficon-pending, .pficon-ok{
    margin-left: 0.5rem;
}

.pficon-pending {
    color: #ec7a08;
    font-size: 16px;
}

.pf-c-modal-box__footer .pficon-pending, .pficon-warning-triangle-o, .pficon-ok {
    line-height: inherit;
    margin-right: 0.5rem;
}

td > .utilization-bar-pf {
    width: 100%;
    min-width: 4em;

    > .progress {
        margin-bottom: 0;
        height: 0.5rem;
    }
}

.error.listing-ct-item,
table.listing-ct-table > tbody > tr:first-child.error {
    background-color: var(--color-ct-list-critical-bg) !important;  /* keep red background when expanded */
}

virtual-machines-listing .listing-ct-body {
    overflow: visible;
}

.info-circle {
    padding: .5rem
}

.pf-c-dropdown__menu-item.pf-m-danger {
    color: var(--pf-global--danger-color--200);
}

.pf-c-table {
    .btn-group {
        align-items: center;
    }

    > tbody > tr:not(.pf-c-table__expandable-row) > [data-label=Actions] .pf-c-button {
        // vertical: compensate for padding; fixing alignment
        // horizontal: add some needed padding
        margin:  -0.25rem 0.25rem;
    }
}
