/* The always link's colour, on the graph and in its legend: blue in every
   theme, rather than the brand colour, which the Ascender themes make
   green like a success link. */
:root {
  --ascender-workflow-always-link-color: #337ab7;
}

/* Workflow visualizer and workflow job output graph, copied from the old
   UI's component stylesheets (the styling that used to be generated by
   styled-components). Each block names the component it came from. */

/* FullPage: the styling that used to be generated by styled-components. */

.ascender-full-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(
    --pf-t--global--background--color--primary--default,
    var(--pf-v6-global--BackgroundColor--100, #fff)
  );
  z-index: 400;
}

/* Visualizer: the styling that used to be generated by styled-components. */

.ascender-visualizer__centered-content {
  align-items: center;
  display: flex;
  flex-flow: column;
  height: 100%;
  justify-content: center;
}

.ascender-visualizer__wrapper {
  display: flex;
  flex-flow: column;
  height: 100%;
}

/* VisualizerGraph: the styling that used to be generated by styled-components. */

.ascender-visualizer-graph__potential-link {
  pointer-events: none;
}

.ascender-visualizer-graph__workflow-svg {
  background-color: var(--ascender-workflow-graph-bg);
  border: 1px solid var(--pf-v6-global--BorderColor--100);
  border-top: none;
  display: flex;
  height: 100%;
}

.ascender-visualizer-graph__position-top {
  position: absolute;
  top: 75px;
  right: 20px;
  display: flex;
}

.ascender-visualizer-link__link-g--inert {
  pointer-events: none;
}

/* VisualizerNode: the styling that used to be generated by styled-components. */

.ascender-visualizer-node__resource-name {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ascender-visualizer-node__convergence-label {
  font-size: 12px;
  color: #ffffff;
}

.ascender-visualizer-node__node-g--has-job {
  cursor: pointer;
}

.ascender-visualizer-node__node-g--inert {
  pointer-events: none;
}

.ascender-visualizer-node__contents {
  font-size: 13px;
  padding: 0px 10px;
  background-color: var(--ascender-workflow-node-bg);
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ascender-visualizer-node__contents--invalid-link-target {
  background-color: var(--ascender-workflow-graph-bg);
}

/* VisualizerStartScreen: the styling that used to be generated by styled-components. */

.ascender-visualizer-start-screen__button.ascender-visualizer-start-screen__button {
  background-color: #5cb85c;
  padding: 5px 8px;
  --pf-v6-global--FontSize--md: 14px;
  margin-top: 20px;
}

.ascender-visualizer-start-screen__panel {
  background-color: var(--pf-v6-global--BackgroundColor--100);
  border: 1px solid var(--pf-v6-global--BorderColor--100);
  padding: 60px 80px;
  text-align: center;
}

.ascender-visualizer-start-screen__panel-wrapper {
  align-items: center;
  background-color: var(--pf-v6-global--BackgroundColor--200);
  display: flex;
  height: 100%;
  justify-content: center;
}

.ascender-visualizer-start-screen__flex-1 {
  flex: 1;
}

/* VisualizerToolbar: the styling that used to be generated by styled-components. */

.ascender-visualizer-toolbar__badge {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-left: 10px;
}

.ascender-visualizer-toolbar__action-button {
  padding: 6px 10px;
  margin: 0px 6px;
  border: none;
}

.ascender-visualizer-toolbar__action-button:hover {
  background-color: var(--pf-v6-global--primary-color--100);
  color: #fff;
}

.ascender-visualizer-toolbar__action-button.pf-m-active {
  background-color: var(--pf-v6-global--primary-color--100);
  color: #fff;
}

.ascender-visualizer-toolbar__display-align-items {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--pf-t--global--border--color--default);
  padding: 8px 16px;
}

.ascender-visualizer-toolbar__white-space-margin {
  white-space: nowrap;
  margin: 0;
}

.ascender-visualizer-toolbar__align-items-display {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: flex-end;
}

.ascender-visualizer-toolbar__margin-0-32 {
  margin: 0 32px;
}

/* NodeModal: the styling that used to be generated by styled-components. */

.ascender-node-modal__overflow-scroll {
  overflow: scroll;
}

/* RunStep: the styling that used to be generated by styled-components. */

.ascender-run-step__grid {
  display: grid;
  grid-auto-rows: minmax(100px, auto);
  grid-gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  margin: 20px 0px;
  width: 100%;
}

.ascender-run-step__condition-fields {
  display: grid;
  grid-gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  margin-bottom: 20px;
  width: 100%;
}

/* NodeTypeStep: the styling that used to be generated by styled-components. */

.ascender-node-type-step__error-alert {
  margin-bottom: 20px;
}

.ascender-node-type-step__timeout-input {
  width: 200px !important;
}

.ascender-node-type-step__timeout-input :not(:first-of-type) {
  margin-left: 20px;
}

.ascender-node-type-step__timeout-label {
  margin-left: 10px;
  min-width: fit-content;
}

.ascender-node-type-step__display-align-items {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.ascender-node-type-step__margin-right-24 {
  margin-right: 24px;
}

.ascender-node-type-step__margin-top-20 {
  margin-top: 20px;
}

.ascender-node-type-step__display-align-items-2 {
  display: flex;
  align-items: center;
}

/* WorkflowActionTooltip: the styling that used to be generated by styled-components. */

.ascender-workflow-action-tooltip__contents {
  display: flex;
}

.ascender-workflow-action-tooltip__arrow {
  width: 10px;
}

.ascender-workflow-action-tooltip__arrow-outer {
  border-bottom: 10px solid transparent;
  border-right: 10px solid var(--pf-v6-global--BorderColor--100);
  border-top: 10px solid transparent;
  height: 0;
  margin: auto;
  position: absolute;
  top: calc(50% - 10px);
  width: 0;
}

.ascender-workflow-action-tooltip__arrow-inner {
  border-bottom: 10px solid transparent;
  border-right: 10px solid var(--pf-v6-global--BackgroundColor--100);
  border-top: 10px solid transparent;
  height: 0;
  left: 2px;
  margin: auto;
  position: absolute;
  top: calc(50% - 10px);
  width: 0;
}

.ascender-workflow-action-tooltip__actions {
  background-color: var(--pf-v6-global--BackgroundColor--100);
  border-radius: 2px;
  border: 1px solid var(--pf-v6-global--BorderColor--100);
  padding: 5px;
}

/* WorkflowActionTooltipItem: the styling that used to be generated by styled-components. */

.ascender-workflow-action-tooltip-item__item {
  /* a button, so the browser's own chrome is cleared first */
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  align-items: center;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.ascender-workflow-action-tooltip-item__item:hover {
  color: var(--pf-v6-global--Color--100);
  background-color: var(--pf-v6-global--BackgroundColor--200);
}

.ascender-workflow-action-tooltip-item__item:not(:last-of-type) {
  margin-bottom: 5px;
}

.ascender-workflow-action-tooltip-item__item:focus-visible {
  outline: 2px solid var(--pf-v6-global--primary-color--100);
  outline-offset: 1px;
}

/* WorkflowHelp: the styling that used to be generated by styled-components. */

.ascender-workflow-help__outer {
  height: 0;
  pointer-events: none;
  position: relative;
}

.ascender-workflow-help__inner {
  background-color: #383f44;
  border-radius: 2px;
  color: white;
  left: 10px;
  max-width: 300px;
  padding: 5px 10px;
  position: absolute;
  top: 10px;
}

/* WorkflowLegend: the styling that used to be generated by styled-components. */

.ascender-workflow-legend__wrapper {
  background-color: var(--ascender-workflow-node-bg);
  border: 1px solid var(--pf-v6-global--BorderColor--100);
  margin-left: 20px;
  min-width: 100px;
  position: relative;
}

.ascender-workflow-legend__header {
  border-bottom: 1px solid var(--pf-v6-global--BorderColor--100);
  padding: 10px;
  position: relative;
}

.ascender-workflow-legend__legend {
  padding: 5px 10px;
}

.ascender-workflow-legend__legend li {
  align-items: center;
  display: flex;
  padding: 5px 0px;
}

.ascender-workflow-legend__node-type-letter {
  background-color: #393f43;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  height: 20px;
  line-height: 20px;
  margin-right: 10px;
  text-align: center;
  width: 20px;
}

.ascender-workflow-legend__styled-exclamation-triangle-icon {
  color: var(--pf-v6-global--warning-color--100);
  height: 20px;
  margin-right: 10px;
  width: 20px;
}

.ascender-workflow-legend__link {
  height: 5px;
  margin-right: 10px;
  width: 20px;
}

.ascender-workflow-legend__success-link {
  background-color: #5cb85c;
}

.ascender-workflow-legend__failure-link {
  background-color: #d9534f;
}

.ascender-workflow-legend__always-link {
  background-color: var(--ascender-workflow-always-link-color);
}

.ascender-workflow-legend__condition-link {
  background-color: #f0ab00;
}

.ascender-workflow-legend__close {
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 15px;
}

/* WorkflowLinkHelp: the styling that used to be generated by styled-components. */

.ascender-workflow-link-help__grid-dl {
  column-gap: 15px;
  display: grid;
  grid-template-columns: max-content;
  row-gap: 0px;
}

.ascender-workflow-link-help__grid-dl dt {
  grid-column-start: 1;
}

.ascender-workflow-link-help__grid-dl dd {
  grid-column-start: 2;
}

/* WorkflowNodeHelp: the styling that used to be generated by styled-components. */

.ascender-workflow-node-help__grid-dl {
  column-gap: 15px;
  display: grid;
  grid-template-columns: max-content;
  row-gap: 0px;
}

.ascender-workflow-node-help__grid-dl dt {
  grid-column-start: 1;
}

.ascender-workflow-node-help__grid-dl dd {
  grid-column-start: 2;
}

.ascender-workflow-node-help__styled-exclamation-triangle-icon {
  color: var(--pf-v6-global--warning-color--100);
  height: 20px;
  margin-right: 10px;
  width: 20px;
}

.ascender-workflow-node-help__resource-deleted {
  margin-bottom: 0px;
}

.ascender-workflow-node-help__resource-deleted--has-job {
  margin-bottom: 10px;
}

.ascender-workflow-node-help__margin-top-10 {
  margin-top: 10px;
}

#workflow-node-help-forced-reason {
  max-width: 320px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* WorkflowNodeTypeLetter: the styling that used to be generated by styled-components. */

.ascender-workflow-node-type-letter__letter {
  background-color: #393f43;
  border-radius: 50%;
  color: white;
  font-size: 10px;
  line-height: 20px;
  text-align: center;
  height: 20px;
  width: 20px;
}

.ascender-workflow-node-type-letter__centered-pause-icon {
  vertical-align: middle !important;
}

/* WorkflowStartNode: the styling that used to be generated by styled-components. */

.ascender-workflow-start-node__foreign-object {
  overflow: visible;
}

.ascender-workflow-start-node__div {
  background-color: #0279bc;
  color: white;
  width: max-content;
  min-width: 80px;
  height: 40px;
  border-radius: 0.35em;
  text-align: center;
  line-height: 40px;
  padding: 0px 10px;
}

.ascender-workflow-start-node__start-g--inert {
  pointer-events: none;
}

/* WorkflowTools: the styling that used to be generated by styled-components. */

.ascender-workflow-tools__wrapper {
  background-color: var(--ascender-workflow-node-bg);
  border: 1px solid var(--pf-v6-global--BorderColor--100);
  height: 215px;
  position: relative;
}

.ascender-workflow-tools__header {
  border-bottom: 1px solid var(--pf-v6-global--BorderColor--100);
  padding: 10px;
}

.ascender-workflow-tools__pan {
  align-items: center;
  display: flex;
}

.ascender-workflow-tools__pan-center {
  display: flex;
  flex-direction: column;
}

.ascender-workflow-tools__tools {
  align-items: center;
  display: flex;
  padding: 20px;
}

.ascender-workflow-tools__close {
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 15px;
}

.ascender-workflow-tools__margin-right-30 {
  margin-right: 30px;
}

.ascender-workflow-tools__margin-right-10 {
  margin-right: 10px;
}

.ascender-workflow-tools__margin-0-25-0-10 {
  margin: 0px 25px 0px 10px;
}

.ascender-workflow-tools__margin-bottom-10 {
  margin-bottom: 10px;
}

.ascender-workflow-tools__margin-top-10 {
  margin-top: 10px;
}

.ascender-workflow-tools__margin-left-10 {
  margin-left: 10px;
}

/* WorkflowOutput: the styling that used to be generated by styled-components. */

.ascender-workflow-output__card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ascender-workflow-output__wrapper {
  display: flex;
  flex-flow: column;
  height: 100%;
  position: relative;
}

/* WorkflowOutputGraph: the styling that used to be generated by styled-components. */

.ascender-workflow-output-graph__flex-width {
  flex: 1;
  width: 100%;
  background-color: var(--ascender-workflow-graph-bg);
  border: 1px solid var(--pf-v6-global--BorderColor--100);
  border-top: none;
}

.ascender-workflow-output-graph__position-top {
  position: absolute;
  top: 75px;
  right: 20px;
  display: flex;
}

/* WorkflowOutputNode: the styling that used to be generated by styled-components. */

.ascender-workflow-output-node__job-top-line {
  align-items: center;
  display: flex;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ascender-workflow-output-node__job-top-line p {
  margin-left: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.ascender-workflow-output-node__elapsed {
  margin-top: 5px;
  text-align: center;
}

.ascender-workflow-output-node__elapsed span {
  font-size: 12px;
  font-weight: bold;
  background-color: var(--pf-v6-global--BackgroundColor--200);
  padding: 3px 12px;
  border-radius: 14px;
}

.ascender-workflow-output-node__contents {
  font-size: 13px;
  padding: 0px 10px;
}

.ascender-workflow-output-node__default-label {
  margin-top: 20px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ascender-workflow-output-node__convergence-label {
  font-size: 12px;
  color: #ffffff;
}

.ascender-workflow-output-node__node-g--has-job {
  cursor: pointer;
}

/* A failed node forced as successful on relaunch: half green, half red, the
   same split its border has. */
.ascender-workflow-output-node__forced-icon {
  background: linear-gradient(
    135deg,
    var(--pf-t--global--color--status--success--default) 50%,
    var(--pf-t--global--color--status--danger--default) 50%
  );
  border-radius: 50%;
  display: inline-block;
  flex: none;
  height: 14px;
  width: 14px;
}

/* WorkflowOutputToolbar: the styling that used to be generated by styled-components. */

.ascender-workflow-output-toolbar__toolbar {
  align-items: center;
  border-bottom: 1px solid var(--pf-v6-global--BorderColor--100);
  display: flex;
  height: 56px;
}

.ascender-workflow-output-toolbar__job {
  display: inline-flex;
  align-items: center;
}

.ascender-workflow-output-toolbar__job h1 {
  font-weight: var(--pf-v6-global--FontWeight--bold);
}

.ascender-workflow-output-toolbar__actions {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: flex-end;
}

/* uniform width/spacing for every action button (incl. the relaunch dropdown
   toggle, which is wider by default) */
.ascender-workflow-output-toolbar__actions button {
  margin: 0px 6px;
  padding: 6px 10px;
  font-size: 1.1rem;
}

/* hover background only on enabled action buttons, so disabled controls
   (relaunch while launching, delete while disabled) don't look interactive
   (badges aren't buttons; modals portal out) */
.ascender-workflow-output-toolbar__actions
  button:not(:disabled):not([aria-disabled='true']):hover {
  background-color: var(--pf-v6-global--primary-color--100);
  color: #fff;
}

/* whiten the icon; the dropdown toggle colors its icon separately */
.ascender-workflow-output-toolbar__actions
  button:not(:disabled):not([aria-disabled='true']):hover
  svg {
  fill: #fff;
}

.ascender-workflow-output-toolbar__badge {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-left: 10px;
  /* enlarge the badge value from PatternFly's small default */
  font-size: 14px;
}

.ascender-workflow-output-toolbar__elapsed-badge {
  margin-right: 20px;
  min-width: 70px;
  font-variant-numeric: tabular-nums;
}

.ascender-workflow-output-toolbar__badge-label {
  margin-left: 20px;
}

.ascender-workflow-output-toolbar__action-button {
  border: none;
}

.ascender-workflow-output-toolbar__action-button.pf-m-active {
  background-color: var(--pf-v6-global--primary-color--100);
  color: #fff;
}

/* CheckboxListItem: the styling that used to be generated by styled-components. */

.ascender-checkbox-list-item__cursor-default {
  cursor: default;
}

/* Job.css */
.ascender-job__workflow-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
}

/* Go additions. The node wizard keeps PatternFly's modal wizard height
   (47.625rem), which a shared rule for the launch wizard caps at 720px. Its
   body keeps the default min-height (auto) rather than the launch wizard's:
   it grows with the step, so the main area scrolls it whole, bottom padding
   and all, and the last field (Max Retries) is not left on the edge. */
.pf-v6-c-modal-box .pf-v6-c-wizard.ascender-node-modal__overflow-scroll {
  height: var(--pf-v6-c-wizard--Height, var(--pf-v6-c-wizard--Height--base));
  max-height: none;
  min-height: 0;
}
.pf-v6-c-modal-box .pf-v6-c-wizard.ascender-node-modal__overflow-scroll .pf-v6-c-wizard__main-body {
  min-height: auto;
}
