/* ── Like button + reaction popup (ReadyLaunch light theme) ── */

.bbat-reactions-button-wrap {
	display: inline-flex;
	vertical-align: middle;
}

.bbat-reactions-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.bbat-like-trigger {
	cursor: pointer;
}

.bbat-like-trigger .bbat-user-reaction-emoji {
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
}

.bbat-reactions-wrap.has-user-vote .bbat-like-trigger .like-count {
	color: var(--bb-rl-text-color, #0c0c0d);
}

/* Reaction picker tray */
.bbat-reactions-popup {
	position: absolute;
	bottom: calc(100% + 10px);
	left: 0;
	z-index: 200;
	display: none;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 2px;
	min-width: max-content;
	overflow: visible;
	padding: 6px 8px;
	background: var(--bb-rl-background-color, #fff);
	border: 1px solid var(--bb-rl-border-secondary-color, #e7e7e9);
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(12, 12, 13, 0.12), 0 2px 6px rgba(12, 12, 13, 0.06);
	opacity: 0;
	transform: translateY(8px) scale(0.94);
	transform-origin: bottom left;
	transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
	pointer-events: none;
	white-space: nowrap;
}

.bbat-reactions-popup::after {
	content: "";
	position: absolute;
	bottom: -5px;
	left: 22px;
	width: 10px;
	height: 10px;
	background: var(--bb-rl-background-color, #fff);
	border-right: 1px solid var(--bb-rl-border-secondary-color, #e7e7e9);
	border-bottom: 1px solid var(--bb-rl-border-secondary-color, #e7e7e9);
	transform: rotate(45deg);
}

.bbat-reactions-popup.is-open {
	display: flex;
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.bbat-reactions-popup[hidden]:not(.is-open) {
	display: none !important;
}

.bbat-reaction-option {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	min-width: 32px;
	flex: 0 0 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	opacity: 1;
	transform: scale(1) translateY(0);
	transition: transform 0.15s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.bbat-reactions-popup:not(.is-open) .bbat-reaction-option {
	opacity: 0;
	transform: scale(0.92) translateY(4px);
	pointer-events: none;
}

.bbat-reactions-popup.is-open .bbat-reaction-option {
	opacity: 1;
	transform: scale(1) translateY(0);
	pointer-events: auto;
	animation: bbat-reaction-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) both;
	animation-delay: var(--bbat-delay, 0ms);
}

.bbat-reaction-option:hover,
.bbat-reaction-option:focus-visible {
	transform: scale(1.15) translateY(-2px);
	background: var(--bb-rl-background-secondary-color, #f6f6f6);
}

.bbat-reaction-option.is-active {
	background: rgba(239, 93, 51, 0.12);
	box-shadow: inset 0 0 0 1.5px rgba(239, 93, 51, 0.35);
}

.bbat-reaction-emoji {
	font-size: 18px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
}

@keyframes bbat-reaction-pop {
	from {
		transform: scale(0.72) translateY(4px);
	}
	to {
		transform: scale(1) translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bbat-reactions-popup.is-open .bbat-reaction-option {
		animation: none;
	}
}

.bbat-reactions-wrap.bbat-is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.bbat-reactions-wrap.bbat-vote-pulse .bbat-like-trigger .bbat-user-reaction-emoji,
.bbat-reactions-wrap.bbat-vote-pulse .bbat-like-trigger i {
	transform: scale(1.15);
	transition: transform 0.2s ease;
}

/* Stats row — reactions + views above action buttons */
.bbat-activity-stats-row {
	padding: var(--bb-rl-space-100, 8px) 0 0;
	border-top: 1px solid var(--bb-rl-border-secondary-color, #e7e7e9);
}

.bbat-activity-stats-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--bb-rl-space-100, 8px);
	width: 100%;
	min-height: 28px;
}

.bbat-activity-stats-left {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	flex: 1 1 auto;
	min-width: 0;
}

.bbat-activity-stats-right {
	flex: 0 0 auto;
	margin-left: auto;
	text-align: right;
}

.bbat-activity-stats-right.bbat-is-empty {
	display: none;
}

.bbat-comment-stats-link {
	display: inline-flex;
	align-items: center;
	color: var(--bb-rl-text-tertiary-color, #65676b);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.15s ease;
}

.bbat-comment-stats-link:hover,
.bbat-comment-stats-link:focus-visible {
	color: var(--bb-rl-text-color, #0c0c0d);
	text-decoration: underline;
	outline: none;
}

.bbat-comment-stats-link .comments-count {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.bb-rl-activity-footer-actions.bbat-has-stats-row {
	border-top: 0;
	padding-top: var(--bb-rl-space-100, 8px);
}

.bbat-activity-stats-left .bbat-vote-badges {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
}

.bbat-activity-stats-left .bbat-view-badge {
	margin-right: 0;
}

/* Legacy footer injection (fallback) */
.bb-rl-activity-footer-actions .activity-state .bbat-vote-badges {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	margin-right: var(--bb-rl-space-100, 8px);
}

.bb-rl-activity-footer-actions .activity-state .bbat-vote-badges ~ .activity-state-comments:before,
.bb-rl-activity-footer-actions .activity-state .bbat-vote-badges.activity-state-reactions ~ a:before {
	content: "";
	display: inline-block;
	vertical-align: middle;
	background-color: var(--bb-rl-background-tertiary-color, #dbdbdb);
	height: 4px;
	width: 4px;
	border-radius: 999px;
	margin: 0 var(--bb-rl-space-100, 8px);
}

.bbat-vote-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: var(--bb-rl-background-secondary-color, #f6f6f6);
	border-radius: 999px;
	padding: 2px 8px;
	font-size: 13px;
	line-height: 1.3;
	color: var(--bb-rl-text-tertiary-color, #5c5c62);
}

.bbat-vote-emoji,
.bbat-reaction-icon {
	font-size: 18px;
	line-height: 1;
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.bbat-reaction-icon:before {
	margin: 0;
	color: var(--bb-rl-text-color, #0c0c0d);
	font-size: 18px;
	line-height: 1;
}

.bbat-reaction-option .bbat-reaction-icon:before {
	color: #0f1419;
	font-size: 18px;
	font-weight: 300;
}

.bbat-like-trigger .bbat-reaction-icon:before,
.bbat-like-trigger [class*="bb-icon"]:before {
	color: #0f1419;
	font-size: 18px;
}

.bbat-view-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: var(--bb-rl-background-secondary-color, #f6f6f6);
	border-radius: 999px;
	padding: 2px 8px;
	font-size: 13px;
	line-height: 1.3;
	color: var(--bb-rl-text-tertiary-color, #5c5c62);
	margin-right: var(--bb-rl-space-100, 8px);
}

.bbat-view-icon:before {
	margin: 0;
	font-size: 16px;
	color: var(--bb-rl-icon-tertiary-color, #5c5c62);
}

.bbat-view-count {
	font-weight: 600;
	color: var(--bb-rl-text-secondary-color, #3a3a3c);
}

.bbat-public-activity-state .bbat-vote-badge {
	margin-right: 0;
}

.bbat-vote-count {
	font-weight: 600;
	font-size: 13px;
	color: var(--bb-rl-text-secondary-color, #3a3a3c);
}

.bbat-login-trigger .like-count {
	color: var(--bb-rl-text-tertiary-color, #5c5c62);
	font-weight: 500;
}

@media (max-width: 480px) {
	.bbat-reactions-popup {
		left: 0;
		max-width: calc(100vw - 32px);
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.bbat-reactions-popup::-webkit-scrollbar {
		display: none;
	}

	.bbat-reaction-option {
		width: 34px;
		height: 34px;
		flex-shrink: 0;
	}
}

/* Composer helpers (shared file) */
.bbat-char-counter {
	font-size: 12px;
	color: #666;
	text-align: right;
	padding: 4px 8px 0;
}

.bbat-char-counter.bbat-char-over {
	color: #d93b31;
	font-weight: 600;
}

.bbat-rate-limit-notice {
	background: #fff4e5;
	color: #8a4b00;
	border-radius: 8px;
	padding: 8px 12px;
	margin-bottom: 8px;
	font-size: 13px;
}
