/** BastionGuard 1.9.8 — PNG badges and globally configured colours. */
body.bbpress .bsg-aurora .bsg-member-badge,
body.bbpress #bbpress-forums .bsg-member-badge,
body.bbpress .bbp-userpop__card .bsg-member-badge {
  display:inline-flex!important; align-items:center; justify-content:center; gap:5px;
  max-width:100%; border:1px solid var(--bsg-badge-color,rgba(8,107,235,0.6))!important;
  background:color-mix(in srgb,var(--bsg-badge-color,#0e7af4) 13%,transparent)!important;
  color:var(--bsg-badge-color,#086beb)!important;
  padding:3px 9px!important; border-radius:999px!important;
  width:max-content; font-size:11px; font-weight:800;
}
/* PNG badges: keep the complete artwork and original aspect ratio. */
body.bbpress .bsg-member-badge .bsg-badge-png,
body.bbpress .bsgx-topic-status .bsg-badge-png,
body.bbpress .bsg-aurora-post__heading .bsg-member-badge .bsg-badge-png {
  display:block!important; flex:0 1 auto!important;
  width:auto!important; height:auto!important;
  max-width:min(100%,150px)!important;
  max-height:58px!important;
  min-width:0!important; object-fit:contain!important; object-position:center!important;
  aspect-ratio:auto!important; border:0!important;border-radius:0!important;
  background:transparent!important; padding:0!important;
  margin:0!important; box-shadow:none!important;vertical-align:middle!important;
}
/* Artwork-only badges are not pills; no border, fill or clipping. */
body.bbpress .bsg-member-badge--image-only,
body.bbpress .bsgx-topic-status--image-only,
body.bbpress .bsg-aurora .bsg-member-badge--image-only,
body.bbpress .bsg-aurora .bsgx-topic-status--image-only {
  border:0!important; border-radius:0!important; background:transparent!important;
  padding:0!important; box-shadow:none!important;
  overflow:visible!important; max-width:100%!important;
}
body.bbpress .bsg-aurora .bsgx-topic-status,
body.bbpress #bbpress-forums .bsgx-topic-status,
body.bbpress .bsgx-topic-status {
  display:inline-flex!important;align-items:center;gap:5px;
  color:var(--bsg-status-color,#086beb)!important;
  border:1px solid var(--bsg-status-color,rgba(8,107,235,0.6))!important;
  background:color-mix(in srgb,var(--bsg-status-color,#0e7af4) 13%,transparent)!important;
  text-shadow:none!important;box-shadow:none!important;
}
/* Stop legacy status rules overriding admin-defined colours. */
body.bbpress .bbp-status-badge[class*="bbp-status-badge--"] {
  color:var(--bsg-status-color,currentColor)!important;
  border-color:var(--bsg-status-color,currentColor)!important;
  background:color-mix(in srgb,var(--bsg-status-color,#0e7af4) 13%,transparent)!important;
}
/* Author column: avatar, name, then badges, then date. */
body.bbpress .bsg-aurora-page .bsg-aurora-post__identity {
  display:flex!important;flex-direction:column!important;align-items:center!important;
  gap:5px!important; min-width:0!important;
}
body.bbpress .bsg-aurora-page .bsg-aurora-author-badges {
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px;
  max-width:100%;min-width:0;
}
body.bbpress .bsg-aurora-page .bsg-aurora-post__body {position:relative!important;padding-top:46px!important;}
body.bbpress .bsg-aurora-page .bsg-aurora-post__body > .bsg-aurora-post__number {
  position:absolute!important;top:13px!important;right:19px!important;
  display:inline-flex!important;align-items:center;justify-content:center;
  margin:0!important;padding:4px 8px!important;min-width:32px;
  border:1px solid rgba(8,107,235,0.28);border-radius:8px;
  background:rgba(8,107,235,0.28);color:var(--bsg-global-secondary,#086beb)!important;
  font-size:12px;font-weight:800;line-height:1.4;z-index:1;
}
@media (max-width:650px) {
  body.bbpress .bsg-aurora-page .bsg-aurora-post__identity{align-items:flex-start!important;text-align:left!important;}
  body.bbpress .bsg-aurora-page .bsg-aurora-author-badges{justify-content:flex-start;}
  body.bbpress .bsg-aurora-page .bsg-aurora-post__body {padding-top:48px!important;}
}

/* Multiple user badges: keep each label and icon distinct and wrap in narrow author columns. */
body.bbpress .bsg-aurora-author-badges,
body.bbpress .bsg-community-member-card .bsg-member-badge,
body.bbpress .bbp-userpop__badges { max-width:100%; }
body.bbpress .bsg-aurora-author-badges { row-gap:6px!important; justify-content:center; }
body.bbpress .bsg-aurora-post__heading .bsg-member-badge { flex:0 1 auto; white-space:normal; overflow-wrap:anywhere; line-height:1.3; }
@media(max-width:650px){body.bbpress .bsg-aurora-author-badges{justify-content:flex-start!important;}}

/* Global admin checkbox: neutral text-only badges without accent backgrounds/borders. */
body.bbpress .bsg-member-badge.bsg-badge--no-color,
body.bbpress .bsg-aurora .bsg-member-badge.bsg-badge--no-color,
body.bbpress #bbpress-forums .bsg-member-badge.bsg-badge--no-color,
body.bbpress .bbp-userpop__card .bsg-member-badge.bsg-badge--no-color,
body.bbpress .bsgx-topic-status.bsg-badge--no-color,
body.bbpress .bsg-aurora .bsgx-topic-status.bsg-badge--no-color,
body.bbpress #bbpress-forums .bsgx-topic-status.bsg-badge--no-color {
  border-color:transparent!important; border-width:0!important;
  background:transparent!important; box-shadow:none!important;
  color:var(--bsg-global-text,#121f32)!important;
  text-shadow:none!important;
}
body.bbpress .bsg-member-badge--image-only .bsg-badge-png,
body.bbpress .bsgx-topic-status--image-only .bsg-badge-png {
  max-height:66px!important; max-width:min(100%,160px)!important;
}
body.bbpress .bsg-aurora-author-badges .bsg-member-badge,
body.bbpress .bsg-aurora-post__heading .bsg-member-badge { overflow:visible!important; min-width:0!important; }


/* BastionGuard 1.10.0: global multi-role badge stacks. Each badge is one row. */
body.bbpress .bsg-member-badge-stack,
body.bbpress #bbpress-forums .bsg-member-badge-stack,
body.bbpress .bbp-userpop__badges .bsg-member-badge-stack {
    display:inline-flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    gap:7px!important;
    max-width:100%!important;
    min-width:0!important;
    vertical-align:middle;
    white-space:normal;
}
body.bbpress .bsg-member-badge-stack > .bsg-member-badge,
body.bbpress #bbpress-forums .bsg-member-badge-stack > .bsg-member-badge {
    flex:0 0 auto!important;
    align-self:center!important;
    display:inline-flex!important;
    margin:0!important;
    max-width:100%!important;
    box-sizing:border-box;
    text-align:center;
}
body.bbpress .bsg-aurora-author-badges,
body.bbpress .bsg-aurora-post__identity,
body.bbpress .bsg-community-member-card {
    min-width:0;
}
body.bbpress .bsg-aurora-post__identity .bsg-member-badge-stack,
body.bbpress .bsg-community-member-card .bsg-member-badge-stack {
    margin:6px auto!important;
}
body.bbpress .bsg-aurora-profile-hero__identity > .bsg-member-badge-stack {
    display:flex!important;
    align-items:flex-start!important;
    margin:7px 0 10px!important;
}
body.bbpress .bsg-aurora-profile-hero__identity > .bsg-member-badge-stack > .bsg-member-badge {
    align-self:flex-start!important;
}
body.bbpress .bbp-userpop__badges .bsg-member-badge-stack {
    flex:0 0 auto!important;
    margin:5px 0!important;
}
body.bbpress .bbp-userpop__badges .bsg-member-badge-stack > .bsg-member-badge {
    align-self:flex-start!important;
}
@media (max-width:650px) {
  body.bbpress .bsg-aurora-post__identity .bsg-member-badge-stack,
  body.bbpress .bsg-aurora-author-badges .bsg-member-badge-stack {
      margin-left:0!important; margin-right:0!important; align-items:flex-start!important;
  }
  body.bbpress .bsg-aurora-author-badges .bsg-member-badge-stack > .bsg-member-badge {
      align-self:flex-start!important;
  }
}


/* BastionGuard 1.10.1 — profile badge placement and cosmetic role display. */
body.bbpress .bsg-aurora-page .bsg-aurora-profile-hero__primary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}
body.bbpress .bsg-aurora-page .bsg-aurora-profile-hero__identity {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    min-width: 0;
}
body.bbpress .bsg-aurora-page .bsg-aurora-profile-hero__identity > small,
body.bbpress .bsg-aurora-page .bsg-aurora-profile-hero__identity > h2,
body.bbpress .bsg-aurora-page .bsg-aurora-profile-hero__identity > p {
    align-self: flex-start;
    text-align: left;
}
body.bbpress .bsg-aurora-page .bsg-aurora-profile-badge-row {
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    align-items: flex-start;
    justify-content: flex-start;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    margin: 6px 0 10px;
    text-align: left;
}
body.bbpress .bsg-aurora-page .bsg-aurora-profile-badge-row > .bsg-member-badge-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    align-self: flex-start !important;
    justify-content: flex-start !important;
    width: max-content;
    max-width: 100%;
    margin: 0 !important;
}
body.bbpress .bsg-aurora-page .bsg-aurora-profile-badge-row .bsg-member-badge {
    align-self: flex-start !important;
    margin: 0 !important;
}
/* Keep the sidebar's avatar / name / badge stack centred, with no plain-text role. */
body.bbpress .bsg-aurora-page .bsg-community-member-card > .bsg-member-badge-stack {
    align-items: center !important;
    margin: 6px auto !important;
}
@media (max-width: 650px) {
    body.bbpress .bsg-aurora-page .bsg-aurora-profile-hero__identity {
        align-items: flex-start;
        text-align: left;
    }
}


/* BastionGuard 1.10.2 — compact badge stacks and left-aligned member identity.
   This overrides the older image-only spacing but preserves PNG proportions. */
.bsg-aurora-page .bsg-member-badge-stack,
body.bbpress .bsg-aurora-page .bsg-member-badge-stack,
body.bbpress #bbpress-forums .bsg-member-badge-stack {
    row-gap: 1px !important;
    column-gap: 0 !important;
    gap: 1px !important;
    line-height: 1 !important;
}
.bsg-aurora-page .bsg-aurora-author-badges .bsg-member-badge-stack,
body.bbpress .bsg-aurora-post__identity .bsg-member-badge-stack {
    margin: 2px auto !important;
}
/* PNGs often include transparent canvas padding. Tighten their boxes without cropping. */
.bsg-aurora-page .bsg-member-badge-stack > .bsg-member-badge--image-only,
body.bbpress .bsg-aurora-page .bsg-member-badge-stack > .bsg-member-badge--image-only,
body.bbpress #bbpress-forums .bsg-member-badge-stack > .bsg-member-badge--image-only {
    margin: -5px 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
    line-height: 1 !important;
}
.bsg-aurora-page .bsg-member-badge-stack > .bsg-member-badge--image-only .bsg-badge-png,
body.bbpress .bsg-aurora-page .bsg-member-badge-stack > .bsg-member-badge--image-only .bsg-badge-png {
    display: block !important;
    max-height: 52px !important;
    height: auto !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    vertical-align: middle !important;
}
/* In the public profile header, badges sit UNDER the username, never in the right column. */
.bsg-aurora-page .bsg-aurora-profile-hero__primary,
body.bbpress .bsg-aurora-page .bsg-aurora-profile-hero__primary {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    margin-right: 0 !important;
}
.bsg-aurora-page .bsg-aurora-profile-hero__identity,
body.bbpress .bsg-aurora-page .bsg-aurora-profile-hero__identity {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    align-self: center !important;
    text-align: left !important;
    min-width: 0 !important;
}
.bsg-aurora-page .bsg-aurora-profile-hero__identity > h2,
.bsg-aurora-page .bsg-aurora-profile-hero__identity > small,
.bsg-aurora-page .bsg-aurora-profile-hero__identity > p {
    align-self: flex-start !important;
    text-align: left !important;
    margin-left: 0 !important;
}
.bsg-aurora-page .bsg-aurora-profile-hero__identity > .bsg-aurora-profile-badge-row,
body.bbpress .bsg-aurora-page .bsg-aurora-profile-hero__identity > .bsg-aurora-profile-badge-row {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: flex-start !important;
    align-self: flex-start !important;
    justify-content: flex-start !important;
    position: static !important;
    float: none !important;
    width: fit-content !important;
    max-width: 100% !important;
    margin: 3px 0 6px 0 !important;
    padding: 0 !important;
    text-align: left !important;
}
.bsg-aurora-page .bsg-aurora-profile-badge-row > .bsg-member-badge-stack,
body.bbpress .bsg-aurora-page .bsg-aurora-profile-badge-row > .bsg-member-badge-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    align-self: flex-start !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    width: fit-content !important;
    max-width: 100% !important;
}
.bsg-aurora-page .bsg-aurora-profile-badge-row .bsg-member-badge,
body.bbpress .bsg-aurora-page .bsg-aurora-profile-badge-row .bsg-member-badge {
    align-self: flex-start !important;
}
@media (max-width: 650px) {
    .bsg-aurora-page .bsg-aurora-author-badges .bsg-member-badge-stack {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .bsg-aurora-page .bsg-aurora-profile-hero__primary {
        align-items: flex-start !important;
    }
}
