/* BuddyX integration for BestBay community features. */

/* Keep featured images within the rounded BuddyX activity card. */
.activity-list .activity-item.has-featured-image > .activity-feature-image {
	margin: 0 0 15px;
	border-top-left-radius: inherit;
	border-top-right-radius: inherit;
	overflow: hidden;
}

/* Match BuddyBoss: preserve the generated state classes and keep actions clickable. */
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button) {
	pointer-events: auto;
	position: relative;
	color: transparent;
	opacity: .7;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button):hover,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button):focus-visible {
	color: transparent;
	opacity: 1;
	background: transparent;
	border: 0;
	box-shadow: none;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button):hover > i,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button):focus-visible > i {
	color: var(--bx-color-primary, var(--bb-primary-color, #385dff));
	opacity: 1;
}

/* Match the personal Timeline canvas to the site-wide News Feed. */
body.bp-user.my-activity #buddypress.buddypress-wrap #item-body:not(#group-create-body),
body.single-item.groups.activity #buddypress.buddypress-wrap #item-body:not(#group-create-body) {
	padding: 0;
	border: 0;
	border-radius: 0 !important;
	background: transparent;
	box-shadow: none;
}

/* Messages layout and composer. */
.bp-messages-content-wrapper {
	display: flex;
	flex-flow: column;
	height: 80vh;
	max-height: 80vh;
	min-height: 670px;
}

.bp-messages-content,
.bp-messages-threads-list {
	flex: 1;
	min-width: 0;
}

.bp-messages-content #bp-message-thread-list {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
}

.bp-messages-content #send-reply {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-end;
	margin: 0 -20px;
	width: auto;
	height: auto;
	min-height: 0;
}

.bp-messages-content #send_message_form {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	position: relative;
	height: 80vh;
	max-height: 80vh;
	min-height: 670px;
	margin: 0;
	padding: 20px;
}

.bp-messages-content #send-reply .message-box {
	width: 100%;
}

.bp-messages-content #send-reply #bp-message-content,
.bp-messages-content #send_message_form #bp-message-content {
	margin: auto 0 0;
}

/* Composer editor and GIF attachment layout. */
:is(.bp-messages-content, #send_message_form, #send-reply) #bp-message-content {
	margin: 20px;
	padding: 0;
	border: 1px solid var(--global-border-color);
	border-radius: var(--global-border-radius-inner);
}

#bp-message-content .medium-editor-element:not(.emojionearea) {
	border: 0;
	min-height: auto;
	max-height: 120px;
	margin: 0;
	overflow: auto;
	padding: 20px 15px;
	border-radius: var(--global-border-radius-inner);
	position: relative;
	outline: none;
}

:is(.bp-messages-content, #send_message_form, #send-reply) #bp-message-content #whats-new-messages-attachments {
	margin-top: 0;
	padding: 0 9px;
}

.attachments--small [class*="attached-gif-container"] {
	display: table;
	height: auto !important;
	width: auto !important;
	margin-bottom: 0;
	background: none !important;
}

.attachments--small [class*="messages-attached-gif-container"] .gif-image-container img {
	height: 100px;
	width: 100px;
	margin: 0 0 15px 6px;
	object-fit: cover;
	border-radius: var(--global-border-radius-inner);
}

.bp-messages-content #bp-message-thread-list > li {
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
}

.bp-messages-content #bp-message-thread-list .message-metadata time,
.bp-messages-content #message-thread .message-metadata time {
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	border-radius: 0 !important;
	padding: 0 0 0 3px;
	font-size: 13px;
	line-height: 1.5;
}

/* Keep the GIF picker above the message composer, as in BuddyBoss. */
#whats-new-messages-toolbar .gif-media-search-dropdown.open {
	top: auto;
	bottom: 100%;
	margin: 0 0 10px -20px;
	z-index: 999;
}

#whats-new-messages-toolbar .gif-media-search-dropdown::before {
	top: auto;
	bottom: -11px;
	left: 38px;
	transform: rotate(135deg);
}

#whats-new-messages-toolbar .gif-search-content {
	display: flex;
	flex-flow: column;
}

#whats-new-messages-toolbar .gif-search-content .gif-search-results-list {
	margin: 0;
}

#whats-new-messages-toolbar .messages-attached-gif-container {
	margin-bottom: 0;
}

/* BuddyBoss-style icon actions in member directory cards. */
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap {
	display: flex;
	align-items: center;
	width: 100%;
	border-top: 1px solid var(--bx-color-border, #e5e7eb);
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button {
	display: flex;
	flex: 1 1 50%;
	align-items: center;
	justify-content: center;
	min-height: 45px;
	margin: 0;
	padding: 10px 15px;
	border-right: 1px solid var(--bx-color-border, #e5e7eb);
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button:last-child {
	border-right: 0;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > a,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > button {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 24px;
	min-width: 24px;
	height: 24px;
	min-height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: transparent;
	font-size: 0;
	line-height: 1;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button):hover,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button):focus {
	border: 0;
	background: transparent;
	box-shadow: none;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button) > i {
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
	color: var(--bx-color-fg, #1f2937);
	font-style: normal;
	line-height: 1;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button) > i::before {
	color: var(--bx-color-fg, #1f2937);
	font-family: bb-icons;
	font-size: 24px;
	font-weight: 400;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).following > i::before,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).not_following > i::before {
	content: "\ee03";
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).following > i::before {
	content: "\ee03";
	font-weight: 300;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).following:hover > i::before,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).following:focus-visible > i::before {
	font-weight: 400;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).not_following:hover > i::before,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).not_following:focus-visible > i::before {
	font-weight: 300;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).not_friends > i::before {
	content: "\ef60";
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).is_friend > i::before {
	content: "\ef56";
	font-weight: 300;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).is_friend:hover > i::before,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).is_friend:focus-visible > i::before {
	font-weight: 400;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).pending_friend > i::before,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).awaiting_response_friend > i::before {
	content: "\ef57";
	font-weight: 300;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button).send-message > i::before {
	content: "\ee62";
}

/* BuddyX/BuddyBoss balloon tooltip pattern for the generated action labels. */
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button)[data-balloon] {
	position: relative;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button)[data-balloon]::before,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button)[data-balloon]::after {
	position: absolute;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity .15s ease, visibility .15s ease;
	 z-index: 100;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button)[data-balloon]::after {
	content: attr(data-balloon);
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	width: max-content;
	max-width: 220px;
	padding: 6px 10px;
	border-radius: 4px;
	background: var(--bb-tooltip-background, #1f2937);
	color: var(--bb-tooltip-color, #fff);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button)[data-balloon]::before {
	content: "";
	bottom: calc(100% + 2px);
	left: 50%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: var(--bb-tooltip-background, #1f2937);
}

body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button)[data-balloon]:hover::before,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button)[data-balloon]:hover::after,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button)[data-balloon]:focus-visible::before,
body.directory.members #buddypress .members-list.grid .member-action-bottom-wrapper .footer-button-wrap > .generic-button > :is(a, button)[data-balloon]:focus-visible::after {
	visibility: visible;
	opacity: 1;
}

/* BuddyBoss threaded activity connector: parent avatar to child avatar. */
.buddypress-wrap .activity-comments.threaded-comments > ul > li.has-child-comments > .acomment-display::before {
	content: "";
	position: absolute;
	top: 50px;
	left: 18px;
	width: 2px;
	height: calc(100% - 50px);
	background-color: #d6d9dd;
}

/* Repeat the parent vertical for an intermediate reply with its own child. */
.buddypress-wrap .activity-comments.threaded-comments > ul > li > ul .has-child-comments > .acomment-display::before {
	content: "";
	position: absolute;
	top: 50px;
	left: 18px;
	width: 2px;
	height: calc(100% - 50px);
	background-color: #d6d9dd;
}

/* Keep the connector continuous across sibling replies, as in BuddyBoss. */
.buddypress-wrap .activity-comments.threaded-comments > ul > li > ul li::before {
	content: "";
	position: absolute;
	top: 0;
	left: -33px;
	display: inline-block;
	width: 2px;
	height: 100%;
	background-color: #d6d9dd;
}

.buddypress-wrap .activity-comments.threaded-comments > ul > li > ul li:not(.acomments-view-more):last-of-type::before {
	display: none;
}

/* A collapsed reply placeholder gets BuddyBoss's curved endpoint. */
.buddypress-wrap .activity-comments.threaded-comments > ul > li > ul .acomments-view-more {
	position: relative;
	padding: 0;
}

.buddypress-wrap .activity-comments.threaded-comments > ul > li > ul .acomments-view-more::before {
	content: "";
	position: absolute;
	top: -15px;
	left: -33px;
	display: block;
	width: 23px;
	height: 30px;
	background-color: transparent;
	border-left: 2px solid #d6d9dd;
	border-bottom: 2px solid #d6d9dd;
	border-bottom-left-radius: 10px;
}

/* BuddyBoss-style connectors for regular WordPress post comments. */
.comments-area .comment-list .comment > .children {
	position: relative;
	border-left: 0;
}

.comments-area .comment-list li.comment.parent > .comment-body {
	position: relative;
}

.comments-area .comment-list li.comment.parent > .comment-body::after {
	content: "";
	position: absolute;
	top: 50px;
	left: 25px;
	width: 2px;
	height: calc(100% - 34px);
	background-color: #d6d9dd;
}

/* The first-level avatar is 50px; deeper replies use the 40px avatar. */
.comments-area .comment-list > li.comment.parent > .comment-body::after {
	top: 64px;
	left: 30px;
	height: calc(100% - 48px);
}

.comments-area .comment-list .children > li.comment {
	position: relative;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.comments-area .comment-list .children > li.comment:not(:last-child)::before {
	content: "";
	position: absolute;
	top: 0;
	left: 2px;
	width: 2px;
	height: calc(100% + 30px);
	background-color: #d6d9dd;
}

/* Nested reply lists sit 44px farther in; keep their branch on the parent line. */
.comments-area .comment-list .children .children > li.comment:not(:last-child)::before {
	left: -3px;
}

.comments-area .comment-list .children > li.comment > .comment-body {
	position: relative;
}

.comments-area .comment-list .children > li.comment > .comment-body::before {
	content: "";
	position: absolute;
	top: -16px;
	left: -14px;
	width: 12px;
	height: 30px;
	background-color: transparent;
	border-left: 2px solid #d6d9dd;
	border-bottom: 2px solid #d6d9dd;
	border-bottom-left-radius: 10px;
}

/* Replies below the first nested level align with the 40px reply connector. */
.comments-area .comment-list .children .children > li.comment > .comment-body::before {
	left: -19px;
}

.buddypress-wrap .activity-comments.threaded-comments li > ul > li .acomment_inner > .acomment-avatar {
	position: relative;
}

.buddypress-wrap .activity-comments.threaded-comments li > ul > li .acomment_inner > .acomment-avatar::before {
	content: "";
	position: absolute;
	top: -15px;
	left: -33px;
	width: 23px;
	height: 30px;
	border-left: 2px solid #d6d9dd;
	border-bottom: 2px solid #d6d9dd;
	border-bottom-left-radius: 10px;
}
