@use "ct-card.scss";
@use "page.scss";
// For pf-line-clamp
@import "@patternfly/patternfly/sass-utilities/mixins.scss";

#app .pf-c-card.containers-containers, #app .pf-c-card.containers-images {
    @extend .ct-card;
}

#containers-images, #containers-containers {
    // Decrease padding for the image/container toggle button list
    .pf-c-table.pf-m-compact .pf-c-table__toggle {
        padding-left: 0px;
    }

    // Ensure there's adequate space between detail groups
    .ct-listing-panel-body > .pf-l-flex {
        gap: var(--pf-l-flex--spacer--lg);
    }

    // Limit details width to 80 characters or 2/3 the width of the page,
    // whichever is larger
    .pf-c-description-list:not(:only-child) {
        max-width: max(80ch,66vw);
    }
}

@media screen and (max-width: 768px) {
    // Badges should not stretch in mobile mode
    .pf-c-table [data-label] > .pf-c-badge {
        justify-self: start;
    }
}

.container-block {
    display: flex;
    flex-direction: column;
}

.container-block small {
    @include pf-line-clamp("1");
    color: var(--pf-global--Color--200);
}

.container-name {
    font-size: var(--pf-global--FontSize--lg);
    font-weight: 400;
}

.containers-run-onbuildvarclaim input {
    max-width: 15em;
}

.pf-c-alert__description {
    overflow-wrap: anywhere;
}

.listing-action {
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.ct-badge-container-running, .ct-badge-pod-running {
  background-color: var(--pf-global--info-color--100);
  color: white;
}

// Hide the header nav from the expandable rows - this should be better done with JS but the current cockpit-listing-panel implementation does not support this variant
#containers-images .ct-listing-panel-head {
    display: none;
}

.ct-grey-text {
   color: var(--pf-global--Color--200);
}

// Add  borders to no pod containers list and images list
.container-section.pf-m-plain tbody,
.containers-images tbody {
    border: var(--pf-c-card--m-flat--BorderWidth) solid var(--pf-c-card--m-flat--BorderColor);
}
