@use "page.scss";
@use "ct-card.scss";
/* Imports 'pf-u-pt-md' class used for Expander in Add Disk dialog */
@use "../node_modules/@patternfly/patternfly/utilities/Spacing/spacing.css";

 // for $alert
@import "@patternfly/patternfly/components/Alert/alert.scss";

/* Utilities */
@import "@patternfly/patternfly/utilities/Text/text.css";

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

/* Create a hybrid popover with an alert style */
.ct-popover-alert .pf-v6-c-popover__content {
    @extend .pf-v6-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-v6-c-title {
    @extend .pf-v6-c-alert__title;
    font-size: inherit;
}

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

.machines-listing-actions button:not(.pf-v6-c-menu-toggle) {
    margin-block: 0.25rem;
    margin-inline: 0.5rem 0;
}


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

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

.machines-connection-selector > .pf-v6-c-radio:first-child {
    padding-inline-end: var(--pf-t--global--spacer--md);
}

// Limit width for GiB/MiB dropdowns and inputs
.ct-machines-select-unit, .ct-machines-size-input {
    max-inline-size: 5rem;
}

.ct-external-docs-link.pf-v6-c-button.pf-m-link.pf-m-inline {
  padding-inline-start: var(--pf-t--global--spacer--sm);
}

.ct-monospace {
    font-family: var(--pf-t--global--font--family--mono);
}

// Do not add a box-shadow to a "subsection", while it's technically correct it looks weird.
.pf-v6-c-page__main-section.pf-m-light.actions-pagesection {
    box-shadow: none;
}

.virtualization-disabled-empty-state {
  // Use a max width of 60 0-characters across and let it size for mobile too
   --pf-v6-c-empty-state__content--MaxWidth: min(60ch, 100%);
}

// remove oversized gap between checkbox label and checkbox body
#storage-pool-delete-modal span.pf-v6-c-check__body {
    margin-block-start: 0;
}

.vm-description {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.pf-v6-c-modal-box__body .pf-v6-c-alert {
    margin-block-end: var(--pf-t--global--spacer--md);
}

// FIXME: links in labels needs a redesign in the future
.resource-state-text .pf-v6-c-button {
    color: inherit;
}
