/* Premium badge/chip look */
.ptu-badge, .ptu-chip {
    display:inline-flex; align-items:center;
    padding:.125rem .5rem; border-radius:9999px;
    font-size:11px; font-weight:600; letter-spacing:.2px; line-height:1.6;
    border:1px solid rgba(0,0,0,.08);
    background:#f6f7f8; color:#4b5563;
}
.ptu-badge--muted   { background:#f6f7f8; color:#5f6774; border-color:#e5e7eb; }
.ptu-badge--success { background:#ecfdf5; color:#047857; border-color:#a7f3d0; }
.ptu-chip           { background:#eef2ff; color:#4338ca; border-color:#c7d2fe; }

.ptu-badges-wrap { display:flex; gap:.35rem; flex-wrap:wrap; margin-left:.5rem; }
.ptu-badges-list { margin-top:.35rem; display:flex; gap:.35rem; flex-wrap:wrap; }

/* Disclaimer under header */
.ptu-disclaimer{
    margin:.5rem 0 0; padding:.5rem .75rem;
    background:#f8fafc; border:1px solid #e5e7eb; color:#334155;
    font-size:12px; border-radius:8px;
}

/* Optional: avatar watermark for Unclaimed profiles */
.ptu-unclaimed #item-header .member-header-avatar { position:relative; }
.ptu-unclaimed #item-header .member-header-avatar::after{
    content:"Unclaimed"; position:absolute; bottom:6px; right:6px;
    font-size:10px; font-weight:700; color:#fff;
    background:rgba(15,23,42,.66); border:1px solid rgba(255,255,255,.25);
    padding:.2rem .45rem; border-radius:9999px; pointer-events:none;
}

/* Make sure badges line up nicely under the member name/meta */
#buddypress .members-list .ptu-badges-list{
    margin-top:.35rem; display:flex; gap:.35rem; flex-wrap:wrap;
}

/* Badges on their own line under the name, centered */
#buddypress .members-list .ptu-badges-line,
.buddyboss-theme .members-list .ptu-badges-line {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: center;
}

/* Base chip already exists (.ptu-chip). Add distinct looks for PTU types */
.ptu-chip-team {
    background:#e0f2fe;   /* sky-100 */
    color:#0369a1;        /* sky-700 */
    border-color:#bae6fd; /* sky-200 */
    font-weight:700;
}

.ptu-chip-admin {
    background:#efeafc;   /* violet-50-ish */
    color:#5b21b6;        /* violet-700 */
    border-color:#ddd6fe; /* violet-200 */
    font-weight:800;
}

/* --- FIX OVERLAP: badges go on their own row under the buttons (right-aligned) --- */
#buddypress #item-header .ptu-badges-wrap {
    flex-basis: 100%;      /* push to a new line in the actions flex area */
    order: 10;             /* ensure they render after the buttons */
    margin: 6px 0 0 0;     /* space below buttons */
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-start !important;
}

/* remove the generic left offset for header badges so it doesn't shove into buttons */
#buddypress #item-header .ptu-badges-wrap,
.buddyboss-theme #item-header .ptu-badges-wrap {
    margin-left: 0 !important;
}

/* mobile: center them for balance */
@media (max-width: 782px) {
    #buddypress #item-header .ptu-badges-wrap { justify-content: center; }
}

/* Add breathing room under badges in profile header */
#buddypress #item-header .ptu-badges-wrap {
    padding-bottom: 5px;   /* adjust as needed */
    margin-bottom: 5px;    /* extra separation from tabs */
}