/* BuddyPress (Nouveau) in the TeachmeAmine glass style. Loaded only on BuddyPress pages. */
body.tma-bp .tma-page { max-width: 1080px; }
body.tma-bp .tma-pagehead { padding-bottom: 0; }
body.tma-bp .tma-content { padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
#buddypress, .buddypress-wrap { font-family: var(--tma-font); color: var(--tma-ink); }
.buddypress-wrap :is(a) { color: var(--tma-primary); }

/* Navigation tabs */
.buddypress-wrap .bp-navs { background: none !important; border: 0 !important; }
.buddypress-wrap .bp-navs ul { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding: 6px !important; margin: 0 0 14px !important; border-radius: 18px; background: rgba(var(--tma-surf-rgb), .65); box-shadow: 0 0 0 1px var(--tma-line); scrollbar-width: none; }
.buddypress-wrap .bp-navs ul::-webkit-scrollbar { display: none; }
.buddypress-wrap .bp-navs ul li { float: none !important; flex: none; border: 0 !important; background: none !important; }
.buddypress-wrap .bp-navs ul li a { display: flex; align-items: center; gap: 6px; padding: 9px 14px !important; border-radius: 13px; color: var(--tma-muted) !important; font-weight: 400; white-space: nowrap; background: none !important; border: 0 !important; }
.buddypress-wrap .bp-navs ul li:is(.current, .selected) a, .buddypress-wrap .bp-navs ul li a:hover { color: var(--tma-ink) !important; background: var(--tma-card) !important; box-shadow: var(--tma-sh-sm); }
.buddypress-wrap .bp-navs .count { border-radius: 99px !important; padding: 1px 8px !important; background: rgba(var(--tma-primary-rgb), .1) !important; color: var(--tma-primary) !important; border: 0 !important; font-size: 12px !important; }
.buddypress-wrap .bp-subnavs, .buddypress-wrap .subnav-filters { border: 0 !important; background: none !important; }

/* Cards */
.buddypress-wrap :is(.activity-list > li, .bp-list > li, #whats-new-form, .standard-form, .profile, .bp-feedback, #item-header, .bp-single-plugin-content, .group-create-body) {
	border-radius: 24px !important; border: 1px solid var(--tma-hair) !important;
	background: linear-gradient(160deg, rgba(var(--tma-surf-rgb), .9), rgba(var(--tma-surf-rgb), .65)) !important;
	-webkit-backdrop-filter: var(--tma-glass); backdrop-filter: var(--tma-glass);
	box-shadow: inset 0 1px 0 var(--tma-hl), 0 0 0 1px var(--tma-line), var(--tma-sh-sm) !important;
}
.buddypress-wrap .bp-list { border: 0 !important; display: grid; gap: 12px; padding: 0 !important; }
.buddypress-wrap .bp-list > li { padding: 16px !important; margin: 0 !important; }
.buddypress-wrap .activity-list > li { transition: transform .5s var(--tma-ease), box-shadow .5s; }
@media (hover: hover) { .buddypress-wrap .activity-list > li:hover { box-shadow: inset 0 1px 0 var(--tma-hl), 0 0 0 1px var(--tma-line), var(--tma-sh-md) !important; } }
.buddypress-wrap .activity-header { font-size: 14.5px; color: var(--tma-muted); }
.buddypress-wrap .activity-header a { font-weight: 500; color: var(--tma-ink); }
.buddypress-wrap .activity-inner { font-size: 16px; line-height: 1.8; background: none !important; border: 0 !important; }
.buddypress-wrap .activity-inner img { border-radius: 16px; }
.buddypress-wrap :is(.item-avatar, .activity-avatar) img.avatar { border-radius: 50% !important; box-shadow: 0 0 0 2px var(--tma-card), 0 0 0 3px var(--tma-line) !important; }
.buddypress-wrap .activity-comments { border-inline-start: 2px solid var(--tma-line); margin-inline-start: 18px; padding-inline-start: 12px; }

/* Post box */
.buddypress-wrap #whats-new-form { padding: 16px !important; }
.buddypress-wrap #whats-new { min-height: 56px; border-radius: 16px !important; border: 1px solid var(--tma-hair) !important; background: var(--tma-card) !important; box-shadow: 0 0 0 1px var(--tma-line) !important; padding: 12px 14px !important; font: inherit; }
.buddypress-wrap #whats-new:focus { box-shadow: 0 0 0 2px var(--tma-primary), 0 0 0 6px rgba(var(--tma-primary-rgb), .14) !important; }

/* Buttons */
.buddypress-wrap :is(.button, .generic-button a, .generic-button button, input[type="submit"], button[type="submit"]):not(.tma-btn, .tma-wsend, .tma-prof__friend *) {
	border: 0 !important; border-radius: 13px !important; padding: 8px 16px !important; font-weight: 500 !important; font-size: 14px !important;
	color: #fff !important; background: var(--tma-btn-bg) !important; text-shadow: none !important;
	box-shadow: 0 10px 18px -10px rgba(var(--tma-primary-rgb), .75) !important; transition: transform .25s var(--tma-ease);
}
.buddypress-wrap :is(.button, .generic-button a, .generic-button button):hover { transform: translateY(-1px); }
.buddypress-wrap .activity-meta :is(.button, a.button) { color: var(--tma-muted) !important; background: rgba(var(--tma-primary-rgb), .06) !important; box-shadow: none !important; }
.buddypress-wrap .activity-meta :is(.button, a.button):hover { color: var(--tma-primary) !important; }

/* Inputs */
.buddypress-wrap :is(input[type="text"], input[type="search"], input[type="email"], input[type="password"], textarea, select) { border-radius: 14px !important; border: 1px solid var(--tma-hair) !important; background: rgba(var(--tma-surf-rgb), .9) !important; box-shadow: 0 0 0 1px var(--tma-line) !important; }
.buddypress-wrap .dir-search form, .buddypress-wrap .bp-dir-search-form { border: 0 !important; background: none !important; }

/* Profile header */
.buddypress-wrap #item-header { padding: 18px !important; overflow: hidden; }
.buddypress-wrap #cover-image-container { border-radius: 24px; overflow: hidden; }
.buddypress-wrap #item-header-avatar img.avatar { border-radius: 50% !important; border: 4px solid var(--tma-card) !important; box-shadow: var(--tma-sh-md) !important; }
.tma-bphead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.tma-bphead .tma-rankchip { text-decoration: none !important; }
.tma-bphead__n { font-size: 14px; color: var(--tma-muted); }
.tma-bphead__n b { color: var(--tma-ink); }

/* Members directory grid */
.buddypress-wrap .members-list.grid > li, .buddypress-wrap .groups-list.grid > li { text-align: center; }
.buddypress-wrap .members-list li .tma-btn { margin-top: 6px; }

/* Notices & pagination */
.buddypress-wrap .bp-feedback { padding: 12px 16px !important; }
.buddypress-wrap .bp-feedback .bp-icon { border-radius: 12px; }
.buddypress-wrap .bp-pagination { border: 0 !important; background: none !important; }
.buddypress-wrap .load-more a { display: block; text-align: center; border-radius: 16px; background: rgba(var(--tma-surf-rgb), .7) !important; box-shadow: 0 0 0 1px var(--tma-line); }

.buddypress-wrap :is(ul, ol) { list-style: none; }
.buddypress-wrap .bp-navs li::marker, .buddypress-wrap .bp-list li::marker { content: none; }
.buddypress-wrap a { text-decoration: none !important; }
.buddypress-wrap :is(.feed, .bp-screen-reader-text) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.buddypress-wrap .subnav-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.buddypress-wrap .subnav-filters > * { margin: 0 !important; }
.buddypress-wrap .component-filters select { min-height: 42px; }
.buddypress-wrap #item-header-content { text-align: center; }
.buddypress-wrap .user-nicename { color: var(--tma-muted); font-weight: 300; }
.buddypress-wrap .activity-update-form .activity-form { display: grid; gap: 10px; }
@media (max-width: 600px) { .buddypress-wrap .bp-list > li { padding: 12px !important; } }

/* ==========================================================================
   Profile (theme template buddypress/members/single/home.php)
   ========================================================================== */
body.tma-bp .tma-pagehead { display: none; }
.tma-profile { max-width: 900px; margin: 14px auto 0; }
.tma-prof { border-radius: 30px; overflow: hidden; background: linear-gradient(160deg, rgba(var(--tma-surf-rgb), .94), rgba(var(--tma-surf-rgb), .74)); -webkit-backdrop-filter: var(--tma-glass); backdrop-filter: var(--tma-glass); border: 1px solid var(--tma-hair); box-shadow: inset 0 1px 0 var(--tma-hl), 0 0 0 1px var(--tma-line), var(--tma-sh-md); }
.tma-prof__cover { position: relative; height: clamp(130px, 26vw, 230px); background: radial-gradient(120% 120% at 85% 0%, rgba(var(--tma-primary-rgb), .9), transparent 60%), radial-gradient(80% 90% at 0% 100%, rgba(var(--tma-accent-rgb), .7), transparent 70%), linear-gradient(140deg, var(--tma-night), color-mix(in srgb, var(--tma-night) 60%, var(--tma-primary))); background-size: cover; background-position: center; }
.tma-prof__covbtn { position: absolute; bottom: 12px; inset-inline-end: 12px; padding: 7px 14px; border-radius: 12px; font-size: 13px; color: #fff !important; text-decoration: none !important; background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tma-prof__main { display: grid; gap: 12px; padding: 0 20px 14px; text-align: center; justify-items: center; }
.tma-prof__av { position: relative; margin-top: -70px; display: block; width: 132px; height: 132px; border-radius: 50%; padding: 4px; background: conic-gradient(from 200deg, var(--tma-accent), var(--tma-primary), #ff6b9a, var(--tma-accent)); box-shadow: var(--tma-sh-lg); }
.tma-prof__av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid var(--tma-card); display: block; background: var(--tma-card); }
.tma-prof__cam { position: absolute; bottom: 6px; inset-inline-end: 6px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--tma-card); box-shadow: var(--tma-sh-sm); font-size: 17px; }
.tma-prof__name { font-size: clamp(22px, 3.4vw, 30px); margin: 0; }
.tma-prof__handle { margin: 0; color: var(--tma-muted); font-size: 14px; }
.tma-prof__chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.tma-prof__chips .tma-rankchip { text-decoration: none !important; font-size: 13px; }
.tma-prof__stats { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; color: var(--tma-muted); font-size: 14px; }
.tma-prof__stats b { color: var(--tma-ink); font-size: 17px; font-weight: 600; margin-inline-end: 3px; }
.tma-prof__act { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tma-prof__friend .friendship-button, .tma-prof__friend a, .tma-prof__friend button { display: inline-flex !important; align-items: center; min-height: 38px; padding: 0 16px !important; border-radius: 13px !important; border: 0 !important; font: inherit !important; font-size: 14px !important; font-weight: 500 !important; color: var(--tma-ink) !important; background: var(--tma-fill-2) !important; box-shadow: 0 0 0 1px var(--tma-line) !important; text-decoration: none !important; cursor: pointer; }
.tma-prof__friend .generic-button { display: inline; margin: 0; }
.tma-prof__tabs { display: flex; gap: 2px; overflow-x: auto; padding: 4px 10px 0; border-top: 1px solid var(--tma-line); scrollbar-width: none; }
.tma-prof__tabs::-webkit-scrollbar { display: none; }
.tma-prof__tabs a { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 13px 14px; color: var(--tma-muted) !important; text-decoration: none !important; font-size: 14.5px; font-weight: 500; }
.tma-prof__tabs a::after { content: ""; position: absolute; inset-inline: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; transition: background-color .2s; }
.tma-prof__tabs a.is-on { color: var(--tma-primary) !important; }
.tma-prof__tabs a.is-on::after { background: var(--tma-primary); }
.tma-prof__tabs a:hover { color: var(--tma-ink) !important; }
.tma-prof__tabs em { font-style: normal; font-size: 11.5px; padding: 0 7px; border-radius: 99px; background: rgba(var(--tma-primary-rgb), .1); color: var(--tma-primary); }
.tma-prof__sub { display: flex; gap: 6px; overflow-x: auto; margin: 14px auto 0; max-width: 680px; scrollbar-width: none; }
.tma-prof__sub a { flex: none; padding: 8px 16px; border-radius: 99px; font-size: 14px; text-decoration: none !important; color: var(--tma-ink) !important; background: rgba(var(--tma-surf-rgb), .8); box-shadow: 0 0 0 1px var(--tma-line); }
.tma-prof__sub a.is-on { color: #fff !important; background: var(--tma-btn-bg); box-shadow: 0 8px 16px -10px rgba(var(--tma-primary-rgb), .8); }
.tma-prof__body { margin-top: 14px; }
.tma-prof__panel { padding: 18px; border-radius: 24px; background: linear-gradient(160deg, rgba(var(--tma-surf-rgb), .92), rgba(var(--tma-surf-rgb), .7)); box-shadow: 0 0 0 1px var(--tma-line), var(--tma-sh-sm); }
@media (min-width: 760px) {
	.tma-prof__main { grid-template-columns: auto 1fr auto; align-items: end; text-align: start; justify-items: start; }
	.tma-prof__chips, .tma-prof__stats { justify-content: flex-start; }
	.tma-prof__act { align-self: center; }
}

/* Members directory cards */
.tma-mgrid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .tma-mgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tma-mcard { display: grid; justify-items: center; gap: 4px; padding: 18px 12px; border-radius: 24px; text-align: center; background: linear-gradient(160deg, rgba(var(--tma-surf-rgb), .94), rgba(var(--tma-surf-rgb), .7)); box-shadow: inset 0 1px 0 var(--tma-hl), 0 0 0 1px var(--tma-line), var(--tma-sh-sm); transition: transform .4s var(--tma-ease), box-shadow .4s; }
@media (hover: hover) { .tma-mcard:hover { transform: translateY(-4px); box-shadow: inset 0 1px 0 var(--tma-hl), 0 0 0 1px var(--tma-line), var(--tma-sh-lg); } }
.tma-mcard__av { display: block; width: 84px; height: 84px; padding: 3px; border-radius: 50%; background: conic-gradient(from 200deg, var(--tma-accent), var(--tma-primary), var(--tma-accent)); }
.tma-mcard__av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--tma-card); display: block; }
.tma-mcard__name { font-weight: 600; color: var(--tma-ink) !important; text-decoration: none !important; }
.tma-mcard__meta { font-size: 12.5px; color: var(--tma-primary); }
.tma-mcard__last { font-size: 12px; color: var(--tma-muted); margin-bottom: 6px; }
.tma-mpager { display: flex; justify-content: center; gap: 6px; margin: 18px 0; }
.tma-mpager .page-numbers { min-width: 40px; height: 40px; }

/* BuddyPress Legacy template pack (older sites) */
#buddypress div.item-list-tabs { background: none; border: 0; }
#buddypress div.item-list-tabs ul { display: flex; gap: 6px; overflow-x: auto; padding: 6px; border-radius: 18px; background: rgba(var(--tma-surf-rgb), .7); box-shadow: 0 0 0 1px var(--tma-line); }
#buddypress div.item-list-tabs ul li { float: none; list-style: none; }
#buddypress div.item-list-tabs ul li a { display: block; padding: 8px 14px; border-radius: 13px; text-decoration: none; color: var(--tma-muted); }
#buddypress div.item-list-tabs ul li:is(.current, .selected) a { background: var(--tma-card); color: var(--tma-ink); box-shadow: var(--tma-sh-sm); }
#buddypress :is(.standard-form, table.notifications, table.messages-notices, table.profile-fields) { border-radius: 20px; overflow: hidden; background: rgba(var(--tma-surf-rgb), .85); box-shadow: 0 0 0 1px var(--tma-line); }
#buddypress :is(a.button, input[type="submit"], .generic-button a):not(.tma-btn) { border: 0; border-radius: 13px; padding: 8px 16px; color: #fff; background: var(--tma-btn-bg); text-decoration: none; }
#buddypress :is(input[type="text"], input[type="email"], input[type="password"], textarea, select) { border-radius: 14px; border: 1px solid var(--tma-hair); box-shadow: 0 0 0 1px var(--tma-line); padding: 10px 12px; }

/* v1.4: BuddyPress pages use the full width (no reading-width limit) */
body.tma-bp .entry-content > * { max-width: none; }
body.tma-bp.tma-bp-wall .tma-page { max-width: 1280px; }
body.tma-bp .tma-page .tma-content { max-width: none; }
.tma-commu__r .tma-sec { overflow: hidden; }
.tma-commu__r .tma-lb li { gap: 8px; padding: 6px 8px; }
.tma-commu__r .tma-lb img { width: 30px; height: 30px; }
