/* =========================================================
   BuddyPress (Nouveau) — Habit Community skin
   Activity directory (/guest/), members, profiles.
   ========================================================= */

.habit-bp-shell { background: var(--habit-bg-soft); padding: 40px 0 72px; min-height: 60vh; }

/* Page intro */
.habit-bp-intro { max-width: 1000px; margin: 0 auto 26px; padding: 0 24px; }
.habit-bp-intro h1 { font-size: 34px; font-weight: 800; margin: 0 0 6px; }
.habit-bp-intro p { color: var(--habit-slate); margin: 0; font-size: 16px; }

#buddypress.buddypress-wrap, #buddypress { max-width: 1000px; margin: 0 auto; font-family: var(--habit-font); padding: 0 24px; }

/* ---------- Nav tabs ---------- */
#buddypress .bp-navs { background: none; margin-bottom: 20px; }
#buddypress .bp-navs ul { display: flex; gap: 8px; flex-wrap: wrap; border: 0; }
#buddypress .bp-navs ul li { margin: 0; float: none; }
#buddypress .bp-navs ul li a {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 9px 18px; border-radius: 999px;
	background: #fff; border: 1px solid var(--habit-border);
	color: var(--habit-slate); font-weight: 600; font-size: 14px;
	text-decoration: none; transition: all .15s ease;
}
#buddypress .bp-navs ul li a:hover { border-color: var(--habit-blue-200); color: var(--habit-blue); }
#buddypress .bp-navs ul li.selected a, #buddypress .bp-navs ul li.current a {
	background: var(--habit-blue); border-color: var(--habit-blue); color: #fff;
}
#buddypress .bp-navs ul li a .count {
	background: rgba(255,255,255,.25); border: 0; border-radius: 999px;
	padding: 1px 8px; font-size: 12px; color: inherit;
}
#buddypress .bp-navs ul li:not(.selected) a .count { background: var(--habit-bg); color: var(--habit-slate); }

/* ---------- Filters / search bar ---------- */
#buddypress .subnav-filters {
	background: #fff; border: 1px solid var(--habit-border);
	border-radius: var(--habit-card-radius); box-shadow: var(--habit-shadow);
	padding: 14px 16px; margin-bottom: 22px;
	display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
#buddypress .subnav-filters > div { margin: 0; }
#buddypress .subnav-filters .feed { margin-right: auto; }
#buddypress .dir-search input[type="search"], #buddypress .dir-search input[type="text"],
#buddypress .subnav-filters input[type="search"] {
	border: 1.5px solid var(--habit-border); border-radius: 999px;
	padding: 9px 18px; font-size: 14px; font-family: var(--habit-font); min-width: 220px;
}
#buddypress .dir-search input:focus { outline: none; border-color: var(--habit-blue); box-shadow: 0 0 0 3px var(--habit-blue-100); }
#buddypress .subnav-filters select {
	border: 1.5px solid var(--habit-border); border-radius: 10px;
	padding: 8px 12px; font-size: 14px; font-family: var(--habit-font); background: #fff; color: var(--habit-navy);
}
#buddypress .subnav-filters button[type="submit"], #buddypress .dir-search button {
	background: var(--habit-blue); color: #fff; border: 0; border-radius: 999px;
	padding: 9px 20px; font-weight: 600; font-size: 14px; cursor: pointer;
}

/* ---------- What's new form ---------- */
#buddypress .activity-update-form, #buddypress #whats-new-form {
	background: #fff; border: 1px solid var(--habit-border);
	border-radius: var(--habit-card-radius); box-shadow: var(--habit-shadow);
	padding: 18px; margin-bottom: 24px;
}
#buddypress #whats-new-avatar img { border-radius: 50%; }
#buddypress #whats-new, #buddypress .activity-update-form textarea {
	border: 1.5px solid var(--habit-border) !important; border-radius: 12px !important;
	padding: 12px 14px !important; font-size: 15px !important; font-family: var(--habit-font) !important;
	background: var(--habit-bg-soft) !important;
}
#buddypress #whats-new:focus { outline: none !important; border-color: var(--habit-blue) !important; background: #fff !important; }
#buddypress #aw-whats-new-submit, #buddypress .activity-update-form button[type="submit"] {
	background: var(--habit-blue); color: #fff; border: 0; border-radius: 10px;
	padding: 9px 24px; font-weight: 600; font-size: 14px; cursor: pointer;
}
#buddypress #aw-whats-new-submit:hover { background: var(--habit-blue-dark); }

/* ---------- Activity stream cards ---------- */
#buddypress ul.activity-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 18px; }
#buddypress ul.activity-list li.activity-item {
	background: #fff; border: 1px solid var(--habit-border);
	border-radius: var(--habit-card-radius); box-shadow: var(--habit-shadow);
	padding: 20px; margin: 0; overflow: visible;
	transition: box-shadow .18s ease, transform .18s ease;
}
#buddypress ul.activity-list li.activity-item:hover { box-shadow: var(--habit-shadow-hover); transform: translateY(-2px); }

#buddypress .activity-item .activity-avatar { float: none; margin: 0; }
#buddypress .activity-item .activity-avatar img {
	width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
	box-shadow: 0 2px 8px rgba(15,23,42,.12);
}
#buddypress .activity-item .activity-content { margin: 0; }

/* Card header layout */
#buddypress .activity-item .activity-header {
	display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px;
	font-size: 14.5px; color: var(--habit-slate); margin-bottom: 4px;
}
#buddypress .activity-item .activity-header p { margin: 0; }
#buddypress .activity-item .activity-header a { font-weight: 600; color: var(--habit-navy); text-decoration: none; }
#buddypress .activity-item .activity-header a:hover { color: var(--habit-blue); }
#buddypress .activity-item .activity-header .time-since,
#buddypress .activity-item .activity-header .activity-time-since {
	display: block; width: 100%; font-size: 12.5px; color: var(--habit-slate-light); margin-top: 2px;
}

/* Type badges via activity type classes */
#buddypress li.activity-item .activity-content::before {
	display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
	padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
	background: var(--habit-blue-50); color: var(--habit-blue);
	content: "UPDATE";
}
#buddypress li.bbp_reply_create .activity-content::before { content: "REPLY"; background: var(--habit-green-100); color: #15803d; }
#buddypress li.bbp_topic_create .activity-content::before { content: "NEW TOPIC"; background: var(--habit-orange-100); color: #b45309; }
#buddypress li.new_member .activity-content::before { content: "NEW MEMBER"; background: #ede9fe; color: #6d28d9; }
#buddypress li.updated_profile .activity-content::before { content: "PROFILE"; background: #e0f2fe; color: #0284c7; }
#buddypress li.friendship_created .activity-content::before { content: "FRIENDSHIP"; background: #fce7f3; color: #be185d; }
#buddypress li.new_blog_post .activity-content::before { content: "POST"; background: var(--habit-blue-100); color: var(--habit-blue-dark); }
#buddypress li.new_blog_comment .activity-content::before { content: "COMMENT"; background: var(--habit-bg); color: var(--habit-slate); }

/* Inner content */
#buddypress .activity-item .activity-inner {
	font-size: 15px; line-height: 1.65; color: var(--habit-navy);
	margin: 8px 0 0; padding: 0;
}
#buddypress .activity-item .activity-inner img { border-radius: 12px; margin-top: 10px; }

/* Action buttons */
#buddypress .activity-item .activity-meta { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
#buddypress .activity-item .activity-meta a, #buddypress .activity-item .activity-meta .button {
	background: var(--habit-bg); border: 0; border-radius: 999px;
	padding: 7px 16px; font-size: 13px; font-weight: 600; color: var(--habit-slate);
	text-decoration: none; transition: all .15s ease; box-shadow: none;
}
#buddypress .activity-item .activity-meta a:hover { background: var(--habit-blue-100); color: var(--habit-blue-dark); }
#buddypress .activity-item .activity-meta a.delete-activity:hover { background: #fee2e2; color: #b91c1c; }

/* Comments */
#buddypress .activity-comments { margin: 14px 0 0 60px; padding-left: 14px; border-left: 3px solid var(--habit-blue-100); }
#buddypress .activity-comments ul { list-style: none; padding: 0; }
#buddypress .activity-comments li { background: var(--habit-bg-soft); padding: 12px 14px; border-radius: 12px; margin-bottom: 10px; }
#buddypress .activity-comments .acomment-avatar img { width: 32px; height: 32px; border-radius: 50%; }
#buddypress .ac-form { display: none; margin-top: 12px; background: none; padding: 0; border: 0; }
#buddypress .ac-form .ac-reply-content { display: flex; flex-direction: column; gap: 8px; flex: 1; }
#buddypress .ac-form .ac-reply-avatar img { width: 36px; height: 36px; border-radius: 50%; }
#buddypress .ac-form .ac-textarea { background: none; padding: 0; flex: 1; }
#buddypress .ac-form textarea {
	width: 100%; border: 1.5px solid var(--habit-border); border-radius: 12px;
	padding: 10px 12px; font-size: 14px; font-family: var(--habit-font); background: #fff;
}
#buddypress .ac-form input[type="submit"], #buddypress .ac-form button[type="submit"] {
	background: var(--habit-blue); color: #fff; border: 0; border-radius: 10px;
	padding: 8px 16px; font-weight: 600; font-size: 13.5px; cursor: pointer; margin-top: 8px;
}

/* Load more */
#buddypress .load-more {
	background: none; border: 0; text-align: center; margin-top: 24px; padding: 0;
}
#buddypress .load-more a {
	display: inline-flex; background: var(--habit-blue); color: #fff;
	padding: 12px 32px; border-radius: 12px; font-weight: 600; font-size: 15px;
	text-decoration: none; box-shadow: 0 4px 14px rgba(37,99,235,.35);
	transition: all .18s ease;
}
#buddypress .load-more a:hover { transform: translateY(-1px); background: var(--habit-blue-dark); }

/* ---------- Members directory ---------- */
#buddypress ul.members-list, #buddypress ul#members-list {
	list-style: none; padding: 0;
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
#buddypress ul.members-list li, #buddypress ul#members-list li {
	background: #fff; border: 1px solid var(--habit-border);
	border-radius: var(--habit-card-radius); box-shadow: var(--habit-shadow);
	padding: 22px; text-align: center; width: auto; float: none; margin: 0;
}
#buddypress .members-list .item-avatar img { border-radius: 50%; margin: 0 auto 10px; }
#buddypress .members-list .item-title a { font-weight: 700; color: var(--habit-navy); font-size: 16px; text-decoration: none; }
#buddypress .members-list .item-meta { color: var(--habit-slate-light); font-size: 13px; }

/* ---------- Profile pages ---------- */
#buddypress #item-header { background: #fff; border: 1px solid var(--habit-border); border-radius: var(--habit-card-radius); box-shadow: var(--habit-shadow); padding: 24px; margin-bottom: 20px; }
#buddypress #item-header-avatar img { border-radius: 50%; }
#buddypress #item-body { background: #fff; border: 1px solid var(--habit-border); border-radius: var(--habit-card-radius); box-shadow: var(--habit-shadow); padding: 24px; }

/* Pagination */
#buddypress .bp-pagination, #buddypress .pagination { color: var(--habit-slate); font-size: 14px; }
#buddypress .pagination-links a, #buddypress .pagination-links span {
	display: inline-flex; min-width: 34px; height: 34px; padding: 0 8px;
	align-items: center; justify-content: center;
	border: 1px solid var(--habit-border); border-radius: 10px; margin: 0 2px;
	color: var(--habit-navy); font-weight: 600; text-decoration: none;
}
#buddypress .pagination-links span.current { background: var(--habit-blue); color: #fff; border-color: var(--habit-blue); }

@media (max-width: 767px) {
	.habit-bp-intro h1 { font-size: 26px; }
	#buddypress ul.members-list, #buddypress ul#members-list { grid-template-columns: 1fr; }
	#buddypress .activity-comments { margin-left: 20px; }
	#buddypress .subnav-filters { flex-direction: column; align-items: stretch; }
	#buddypress .dir-search input[type="search"] { min-width: 0; width: 100%; }
}

/* ---------- v1.5: gradient intro band for the activity page ---------- */
.habit-bp-shell { padding-top: 0; }
.habit-bp-intro {
	max-width: none; margin: 0 0 30px; padding: 44px 24px 38px;
	background:
		radial-gradient(900px 400px at 90% -20%, #c7ddfb 0%, rgba(199,221,251,0) 60%),
		linear-gradient(135deg, #eaf2fe 0%, #dbeafe 60%, #e7f0fd 100%);
}
.habit-bp-intro > * { max-width: 1000px; margin-left: auto; margin-right: auto; }
.habit-bp-intro h1 { margin-bottom: 6px; }
.habit-bp-intro p { font-size: 16.5px; }

/* ---------- v2.0: green & cream reskin for the activity hub ---------- */
.habit-bp-shell { background: #f7f5f0; }
.habit-bp-intro {
	background: #f7f5f0;
	padding-top: 40px; padding-bottom: 8px;
}
.habit-bp-intro h1 {
	font-family: 'Fraunces', Georgia, serif;
	font-size: 42px; font-weight: 800; letter-spacing: -.015em; color: #161513;
}
.habit-bp-intro p { color: #6b6962; }
#buddypress .bp-navs ul li.selected a, #buddypress .bp-navs ul li.current a {
	background: #132028; border-color: #132028;
}
#buddypress .bp-navs ul li a:hover { border-color: #ffc800; color: #132028; }
#buddypress ul.activity-list li.activity-item { border-color: #d9d3c4; }
#buddypress #aw-whats-new-submit, #buddypress .activity-update-form button[type="submit"],
#buddypress .ac-form input[type="submit"], #buddypress .ac-form button[type="submit"],
#buddypress .subnav-filters button[type="submit"], #buddypress .dir-search button {
	background: #132028;
}
#buddypress .load-more a { background: #132028; box-shadow: 0 6px 16px rgba(19,32,40,.3); }
#buddypress .load-more a:hover { background: #000; }
#buddypress .activity-item .activity-meta a:hover { background: #efe3f6; color: #132028; }


/* =========================================================
   v2.2.1 — two-column layout + tightened feed
   ========================================================= */
.hxg.hfx-shell { padding-top: 32px; }
.hxg-intro { margin-bottom: 22px; }
.hxg-intro .hfx-display--md { margin-bottom: 6px; }
.hxg-intro .hfx-lede--sm { margin-bottom: 0; }

/* Kill the old full-bleed intro band styles */
.habit-bp-shell { padding: 0; background: none; }
.habit-bp-intro { display: none; }

.hxg-cols { display: grid; grid-template-columns: 1.9fr 1fr; gap: 26px; align-items: start; }
.hxg-single { display: block; }

/* BP content fills its column */
.hxg-main #buddypress, .hxg-main #buddypress.buddypress-wrap {
	max-width: none;
	padding: 0;
	margin: 0;
}

/* Tighter activity cards */
#buddypress ul.activity-list { gap: 12px; }
#buddypress ul.activity-list li.activity-item { padding: 16px 18px; border-radius: 14px; }
#buddypress ul.activity-list li.activity-item:hover { transform: none; }
#buddypress .activity-item .activity-avatar img { width: 44px; height: 44px; }
#buddypress .activity-comments { margin-left: 44px; }
#buddypress .activity-meta.action { margin-left: 0; }
#buddypress .activity-item .activity-meta { margin-top: 10px; }
#buddypress li.activity-item .activity-content::before { margin-bottom: 5px; }
#buddypress .subnav-filters { padding: 10px 12px; margin-bottom: 16px; border-radius: 14px; }
#buddypress .activity-update-form, #buddypress #whats-new-form { padding: 14px 16px; margin-bottom: 16px; border-radius: 14px; }
#buddypress .bp-navs { margin-bottom: 14px; }

@media (max-width: 960px) {
	.hxg-cols { grid-template-columns: 1fr; }
	.hxg-side { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
	.hxg-side .hfx-sidecard { margin-bottom: 0; }
}
@media (max-width: 640px) {
	.hxg-side { grid-template-columns: 1fr; }
}


/* v2.2.3 — mobile: compact nav pills + tighter composer */
@media (max-width: 640px) {
	#buddypress .bp-navs ul { gap: 6px; }
	#buddypress .bp-navs ul li a { padding: 7px 13px; font-size: 13px; }
	#buddypress .activity-update-form, #buddypress #whats-new-form { padding: 12px; }
	#buddypress #whats-new-avatar img { width: 36px; height: 36px; }
	#buddypress ul.activity-list li.activity-item { padding: 13px 14px; }
	#buddypress .activity-item .activity-avatar img { width: 38px; height: 38px; }
}
