/* ============================================================================
   Rule Builder — "revising a returned rule" banner.

   One slim line above the builder: the admin's email and the comment they left.
   Nothing else. It sits inside the .builder-layout grid and spans all of its
   columns, so it is exactly as wide as the cards below it.
   Every class is prefixed rb-rev-. Colours, radii and shadows come only from the
   tokens in styles.css :root, so the dark theme needs no overrides here.
   ============================================================================ */

.rb-rev {
  box-sizing: border-box;
  position: relative;
  z-index: 20;
  display: flex; align-items: center; gap: 12px;
  /* A row of the .builder-layout grid spanning every column, so its width and
     side margins are the cards' own at every breakpoint and panel size. */
  grid-column: 1 / -1;
  margin: 0 0 16px;
  padding: 6px 12px;
  min-height: 36px;
  background: var(--neg-soft);
  border: 1px solid var(--neg-border);
  border-left: 3px solid var(--neg);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.35;
}
.rb-rev[hidden] { display: none; }

/* the admin's email */
.rb-rev-label {
  flex: none; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--neg); white-space: nowrap;
}

/* the admin's comment: one line, click to read it in full */
.rb-rev-note {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent;
  font: inherit; color: var(--ink); text-align: left; cursor: pointer;
}
.rb-rev-note--none { color: var(--ink-2); cursor: default; }
.rb-rev-note-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-rev--note-open .rb-rev-note-text { white-space: normal; overflow-wrap: anywhere; }
.rb-rev-note:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* narrow screens: email above, comment below */
@media (max-width: 719px) {
  .rb-rev { flex-wrap: wrap; row-gap: 4px; }
  .rb-rev-note { flex-basis: 100%; }
}