@use "ct-card";
@use "page";

// Import utilities for `pf-u...` classes
@import "@patternfly/patternfly/utilities/Spacing/spacing.css";
@import "global-variables.scss";

#account .pf-v5-c-card {
  @extend .ct-card;
}

.account-details .pf-v5-c-card__header {
  margin-block-end: var(--pf-v5-global--spacer--lg);
}

#account .pf-v5-l-gallery {
  --pf-v5-l-gallery--GridTemplateColumns: 1fr;
}

#account .pf-v5-c-page__main-section,
#account .pf-v5-c-page__main-nav {
  padding: var(--pf-v5-global--gutter);
}

.delete-resource-red {
  color: var(--pf-v5-global--danger-color--200);
}

#account-details div.checkbox:first-child {
  margin-block-start: 0;
}

#account-details div.checkbox:last-child {
  margin-block-end: 0;
}

.size-text-ct {
  display: inline;
  inline-size: 8em;
  text-align: start;
  margin: 2px;
}

@media (min-width: 500px) {
  .modal-sm-ct {
    inline-size: 32rem;
  }
}

.account-column-one {
  min-inline-size: 280px;
  display: inline-block;
}

.expiration-modal .pf-v5-c-form__group-control {
  .pf-v5-c-radio:first-child {
    padding-block-end: var(--pf-v5-global--spacer--sm);
  }
  // Work around for https://github.com/patternfly/patternfly/issues/4061
  .pf-v5-c-radio:nth-child(2) input {
    align-self: center;
  }
}

.help-block {
  white-space: pre-wrap;
}

.outline-question-circle-icon {
  margin-inline-start: var(--pf-v5-global--spacer--sm);
}

.accounts-toolbar-header > .pf-v5-c-toolbar__content-section {
  row-gap: var(--pf-v5-global--spacer--sm);
}

.dot {
  block-size: 20px;
  inline-size: 20px;
  border-radius: 50%;
  display: inline-block;
}

// Iterate through supported PF color names for light and dark modes
@each $color in cyan gold {
  .group-#{"" + $color} {
    background-color: var(--pf-v5-global--palette--#{$color}-100);

    .pf-v5-theme-dark & {
      background-color: var(--pf-v5-global--palette--#{$color}-300);
    }
  }
}
// PF adapts this color properly across light and dark
.group-grey {
  background-color: var(--pf-v5-global--BorderColor--100);
}

.group-more-btn {
  font-size: var(--pf-v5-global--FontSize--sm);
}

#groups-list td:first-child {
  vertical-align: middle;
}

#groups-create, #account-create {
  min-inline-size: 11rem;
}

#group-confirm-delete-dialog .list-item {
  margin-inline-end: var(--pf-v5-global--spacer--lg);
}

// We cannot use the PF helper pf-v5-u-ml-lg here, as it doesn't support RTL yet
#current-account-badge {
  margin-inline-start: var(--pf-v5-global--spacer--lg);
}

// Pretty sure paths are LTR, even in an RTL display
output {
  direction: ltr;
}
