/* Style groups (features/style_groups.js, the Styles tab and one style's page). Uses the colours of app.css. */
.sgroup-bar { display: grid; gap: 10px; margin: 4px 0 14px; }
.sgroup-chips { margin: 0; }
button.sgroup-chip { cursor: pointer; font: inherit; font-size: 13px; padding: 5px 12px; min-height: 32px; }
button.sgroup-chip:hover { border-color: var(--brand); }
button.sgroup-chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
button.sgroup-new { border-style: dashed; color: var(--muted); background: transparent; }
.sgroup-none { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sgroup-none p { flex: 1 1 320px; margin: 0; }
.sgroup-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.sgroup-head-text { flex: 1 1 280px; min-width: 0; display: grid; gap: 2px; }
.sgroup-head-text strong { overflow-wrap: anywhere; }
.sgroup-head-text p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.sgroup-head-tools { display: flex; gap: 6px; flex-wrap: wrap; }

/* small labels on a style card */
.st-card .sgroup-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.st-card .sgroup-tag { font-size: 11px; line-height: 1.3; padding: 0 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the dialog */
dialog.sgroup-dialog { width: min(560px, 94vw); max-height: 92vh; overflow-y: auto; box-sizing: border-box; }
.sgroup-form { display: grid; gap: 12px; }
.sgroup-picks { display: grid; gap: 4px; max-height: 40vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
label.sgroup-pick { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 8px; cursor: pointer; min-width: 0; }
label.sgroup-pick:hover { background: var(--soft); }
.sgroup-pick img, .sgroup-pick-blank { width: 32px; height: 40px; object-fit: cover; border-radius: 5px; flex: none; background: var(--soft); border: 1px solid var(--line); }
.sgroup-pick-name { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.sgroup-pick input, .sgroup-tick input { width: auto; flex: none; }

/* the Groups block on a style's page */
.sgroup-block h2 { margin: 0 0 4px; font-size: 17px; }
.sgroup-ticks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0; }
label.sgroup-tick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.sgroup-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .sgroup-ticks { display: grid; }
  .sgroup-head-tools .btn { flex: 1 1 auto; }
}

/* "Ask AI to change the group" (features/style_group_chat.js; the rest of the window is style_edit.css's .schat) */
.gchat-styles { display: grid; gap: 4px; }
.gchat-style { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--panel); }
.gchat-style > summary { cursor: pointer; display: grid; gap: 2px; font-size: 14px; color: var(--ink); list-style-position: outside; }
.gchat-change { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
