/* palette.css - accordion, letterhead, and collapse styling for the insert
   palette. Loaded after app.css so these rules refine the base palette look.
   app.css keeps the shared .palette, .items, and .pbtn styles; this file owns
   the collapsible sections and the Letterheads row. */

/* Sections stack with no padding of their own; the header and body carry it. */
.palette .group { padding: 0; }

/* Header bar. A full-width button so the whole strip toggles the section. */
.palette .group-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px var(--sp-2);
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.palette .group-head:hover { background: #242932; }
.palette .group-head:focus-visible { outline: 1px solid #5a8dd6; outline-offset: -1px; }

/* The title sits inside the header now, so drop its standalone padding and let
   it take the free space, pushing the chevron to the right edge. */
.palette .group-head .group-title { flex: 1; padding: 0; }

/* Section accent colours. print/preview come from app.css; add the two new. */
.palette .letterheads .group-title { color: #8fb6d6; }
.palette .dept .group-title { color: #c0a0c9; }

/* Collapse indicator. Points down when open, right when collapsed. */
.palette .group-head .chev {
  flex: none;
  width: 12px;
  text-align: center;
  color: #8a92a0;
  transition: transform 0.12s ease;
}
.palette .group-head .chev::before { content: "\25BE"; }
.palette .group.collapsed .group-head .chev { transform: rotate(-90deg); }

/* Body holds the item buttons and disappears while collapsed, so a closed
   section is just its header bar. */
.palette .group-body { padding: 0 var(--sp-2) var(--sp-2); }
.palette .group.collapsed .group-body { display: none; }

/* Letterhead and department buttons show a colour swatch on the left edge,
   matching the stamp/preview accent so the row reads the same way. */
.palette .letterheads .pbtn,
.palette .dept .pbtn,
.palette .preview .pbtn { border-left-width: 4px; }

/* A saved letterhead pairs its insert chip with a small remove button. */
.palette .letterheads .lh-user { display: inline-flex; align-items: stretch; }
.palette .letterheads .lh-user .pbtn { border-left-width: 4px; }
.palette .letterheads .lh-del {
  border-left: 0;
  margin-left: -1px;
  padding: 0 7px;
  font-size: 14px;
  line-height: 1;
  color: var(--text-muted);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.palette .letterheads .lh-del:hover { color: var(--danger-text); border-color: var(--danger-border); }

/* The "New letterhead" action reads as an add control, not a header chip. */
.palette .letterheads .add-lh {
  border-style: dashed;
  border-left-width: 1px;
  color: var(--text-muted);
}
.palette .letterheads .add-lh:hover { color: var(--text-strong); border-color: var(--accent); }

/* Armed stamp: strong highlight so the pick-then-place step is obvious. */
.palette .preview .pbtn.armed {
  background: #3a4657;
  color: #fff;
  border-color: #5a8dd6;
  box-shadow: inset 0 0 0 1px #5a8dd6;
}
