/* Name badges: one look everywhere (chat, user lists, messages, member pages, panels). The colours of each badge come from the classes .sb-<key> that the site prints from the admin's choices (Admin > Site and look > Badges). */
.sb { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 3px; box-sizing: border-box; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--sb-bg, var(--msg-accent)); color: var(--sb-fg, var(--msg-on-accent)); font-size: 11px; font-weight: 800; line-height: 1; letter-spacing: .04em; white-space: nowrap; vertical-align: middle; border: 0; font-family: inherit; }
.sb svg { width: 13px; height: 13px; flex: none; fill: currentColor; }
.sb-n { font-size: 11px; font-weight: 800; letter-spacing: 0; }
button.sb { cursor: pointer; }
button.sb:focus-visible, .sb[role="button"]:focus-visible, .sb[role="link"]:focus-visible { outline: 2px solid var(--msg-link); outline-offset: 2px; }
.sb.is-own { cursor: pointer; box-shadow: 0 0 0 2px color-mix(in srgb, var(--sb-bg) 45%, transparent); }
.sb-lg { height: 26px; min-width: 28px; padding: 0 9px; font-size: 13px; border-radius: 8px; }
.sb-lg svg { width: 17px; height: 17px; }
.sb-lg .sb-n { font-size: 13px; }

/* The VIP Membership window a VIP badge opens: slides in from the right on a wide screen, up from the bottom on a phone. */
.sb-pan { position: fixed; inset: 0; z-index: 1300; display: flex; justify-content: flex-end; background: transparent; transition: background .25s ease; }
.sb-pan.is-open { background: color-mix(in srgb, var(--msg-scrim, var(--msg-black)) 62%, transparent); }
.sb-pan-box { position: relative; box-sizing: border-box; width: min(440px, 100%); height: 100%; overflow-y: auto; background: var(--msg-bg); color: var(--msg-text); border-left: 1px solid var(--msg-border); transform: translateX(100%); transition: transform .25s ease; }
.sb-pan.is-open .sb-pan-box { transform: none; }
.sb-pan-x { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; width: 44px; height: 44px; border-radius: var(--btn-rc, 50%); border: 1px solid var(--msg-border); background: var(--msg-surface-2); color: var(--msg-text); font-size: 24px; line-height: 1; cursor: pointer; }
.sb-pan-body { padding: 64px 20px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; }
.sb-pan-h { margin: 0; font-size: 24px; color: var(--msg-accent); }
.sb-pan-muted { margin: 0; color: var(--msg-muted); line-height: 1.5; }
.sb-pan-ok { margin: 0; font-weight: 700; color: var(--msg-accent); }
.sb-pan-card { display: grid; gap: 6px; padding: 14px; border-radius: 12px; border: 1px solid var(--msg-border); background: var(--msg-surface); }
.sb-pan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sb-pan-n { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; }
.sb-pan-p { color: var(--msg-accent); font-weight: 700; white-space: nowrap; }
.sb-pan-l { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.sb-pan-go { display: flex; align-items: center; justify-content: center; min-height: var(--btn-hl, 48px); padding: 0 20px; border-radius: var(--btn-r, 999px); background: var(--msg-accent); color: var(--msg-on-accent) !important; /* links elsewhere force their own colour */ font-weight: 700; text-decoration: none; }
@media (max-width: 600px) {
  .sb-pan { align-items: flex-end; }
  .sb-pan-box { width: 100%; height: auto; max-height: 88vh; border-left: 0; border-top: 1px solid var(--msg-border); border-radius: 16px 16px 0 0; transform: translateY(100%); }
  .sb-pan-body { padding-top: 60px; }
}
@media (prefers-reduced-motion: reduce) { .sb-pan, .sb-pan-box { transition: none; } }
