/* PatternFly 6 provides the components; this file only carries the app shell
   layout and a few compact adjustments for the three-pane editor. */

/* PatternFly sets display on its components, which beats the hidden attribute. */
[hidden] { display: none !important; }

.kb-main-section { min-height: calc(100vh - 76px); }

/* Brand: the icon doubles as the favicon. */
.kb-brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.kb-brand-icon { width: 30px; height: 30px; display: block; }
.kb-brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--pf-t--global--text--color--regular);
}

.kb-workspace { align-items: flex-start; }

/* Each pane scrolls on its own so the page itself never grows. */
.kb-column {
  max-height: calc(100vh - 116px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.kb-column > .pf-v6-c-card__title { flex: 0 0 auto; }
.kb-column > .pf-v6-c-card__body { flex: 1 1 auto; overflow-y: auto; }

.kb-name .pf-v6-c-form-control > input { min-width: 14rem; }
#version-select { min-width: 9rem; }
#preview { white-space: pre; }
.kb-share .pf-v6-c-form-control > input { font-size: .8rem; }

.kb-status-item { min-height: 1.5rem; }
.kb-status-item .pf-v6-c-helper-text__item-text { white-space: nowrap; }
.kb-status-error { color: var(--pf-t--global--color--status--danger--default); }

/* Palette */
.kb-palette { display: flex; flex-direction: column; gap: 2px; }
.kb-cat {
  margin: .75rem 0 .25rem;
  color: var(--pf-t--global--text--color--subtle);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kb-cat:first-child { margin-top: 0; }
.kb-cmd { justify-content: flex-start; }

/* Command cards */
.kb-cmd-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: nowrap;
}
.kb-cmd-name {
  font-family: var(--pf-t--global--font--family--mono, monospace);
  font-weight: 700;
}
.kb-cmd-summary {
  color: var(--pf-t--global--text--color--subtle);
  font-family: var(--pf-t--global--font--family--mono, monospace);
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kb-cmd-actions { margin-left: auto; display: flex; gap: 2px; }

.kb-cmd-card .fa-caret-down { display: none; }
.kb-cmd-card.pf-m-expanded .fa-caret-down { display: inline; }
.kb-cmd-card.pf-m-expanded .fa-caret-right { display: none; }

.kb-cmd-body { display: none; }
.kb-cmd-card.pf-m-expanded .kb-cmd-body { display: block; }

.kb-opt-help { margin-top: .25rem; }
.kb-pos-block { margin-top: .75rem; }
.kb-opt-note {
  font-family: var(--pf-t--global--font--family--mono, monospace);
  font-size: .8rem;
}

.kb-blocks { margin-top: 1.5rem; }
.kb-block { margin-bottom: 1rem; }
.kb-block-head {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.kb-block-head .pf-v6-c-button { margin-left: auto; }

.kb-share { margin-bottom: .75rem; }
.kb-errors:not(:empty) { margin-bottom: .75rem; }
.kb-hint { color: var(--pf-t--global--text--color--subtle); }
.mono { font-family: var(--pf-t--global--font--family--mono, monospace); }
