html,
body {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--pgw-css-editor-body, #f5f5f5);
}

#container {
  height: 100%;
}

/* The shared editor fills the document pane (pgw#4065). */
.junior-editor-document {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.junior-editor-noets {
  flex: 1 1 auto;
  min-height: 0;
}

.junior-editor-banner {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--pgw-css-banner-error-text);
  background: var(--pgw-css-banner-error);
  border-bottom: 1px solid var(--pgw-css-banner-error-rule);
}

/* pgw#4772 D14: a lock is not an error. Amber, like the lock mock-up. */
.junior-editor-lock {
  color: var(--pgw-css-banner-lock-text);
  background: var(--pgw-css-banner-lock);
  border-bottom-color: var(--pgw-css-banner-lock-rule);
}

/* pgw#5559 S1: "Saved to <Matter>." while the page's group is icons, folded or hidden. A quiet
   paper-coloured banner; the errors keep the error banner. Both end with Dismiss. */
.junior-editor-banner:has(> button:last-child) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 4px;
}

.junior-editor-notice {
  color: var(--pgw-ink);
  background: var(--pgw-paper-3);
  border-bottom-color: var(--pgw-rule-field);
}

/* pgw#5559: the page's group in the title row. The engine fits the row (titleBarEnd): the
   group turns into icons, then folds into "⋯"; nothing is drawn over the title block. */
.junior-editor-title-words,
.junior-editor-title-icons {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}

.junior-editor-title-icons {
  gap: 2px;
}

.junior-editor-title-icon[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}

/* pgw#5559 D4: Versions and Review look like the outlined buttons beside them, gold while
   their pane is open. Paper tokens only (D6). */
.junior-editor-noets .noets-review-toggle {
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--pgw-rule-field);
  border-radius: 4px;
  background: var(--pgw-paper-card);
  color: var(--pgw-ink);
  font: 12px/1 var(--pgw-font-ui);
  white-space: nowrap;
  cursor: pointer;
}

.junior-editor-noets .noets-review-toggle:hover {
  background: var(--pgw-paper-hover);
}

.junior-editor-noets .noets-review-toggle[aria-pressed="true"] {
  background: var(--pgw-gold-tint-12);
  color: var(--pgw-gold-deep);
}

/* The page's lock banner says why the editor is read-only (Word, another window, a
   colleague); the editor's own generic "is editing" line would repeat it. */
.junior-editor-document[data-lease-lock] [data-testid="noets-locked"] {
  display: none;
}

/* pgw#4475: the file-key recovery panel shown in place of the editor. */
.junior-editor-key-recovery {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.junior-editor-key-recovery p {
  margin: 0;
}

/* pgw#5198 D2: the access panel, shown in place of the editor when the open fails after the
   quiet retries. The key-recovery layout in the lock's amber. */
.junior-editor-open-failure-code {
  font-size: 12px;
  color: var(--pgw-css-banner-lock-detail);
}

