/*  cBB Reactions StyleSheet
    --------------------------------------------------------------
	Style:	All
	Copyright (c) 2025 CaniDev ( https://www.canidev.com )
    --------------------------------------------------------------
*/

.reactions-dropdown {
	z-index: 1060; /* Prevents it from hovering above the tooltip */
}

.reactions-launcher,
li.reactions-launcher {
	float: left;
}

.reactions-launcher > .reaction-button {
	align-items: center;
	background: none;
	border: none;
	box-shadow: none;
	display: flex;
	gap: 5px;
	height: 18px;
	width: auto;
	margin-left: 0;
	padding: 0;
	position: relative;
	text-shadow: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}

.reactions-launcher > .reaction-button:hover {
	background: none;
	box-shadow: none;
	text-shadow: none;
}

.reactions-launcher > .reaction-button.default-icon {
	width: 20px;
}

.reactions-launcher > .default-icon img {
	filter: grayscale(1);
	opacity: .7;
}

.reactions-launcher > .default-icon:hover img {
	filter: grayscale(.3);
	opacity: .8;
}

.reactions-launcher > .reaction-button span {
	font-size: 0.85em;
	font-weight: bold;
	text-transform: none;
}




.reaction-launcher-wrapper {
	display: flex;
	list-style: none;
	position: relative;
    justify-content: center;
}

.reaction-launcher-wrapper .reactions-launcher {
	float: none;
}

.reaction-score-list:not(.empty) + .reaction-launcher-wrapper {
	margin-left: 0;
	padding-left: 0;
}

.reaction-score-list:not(.empty) + .reaction-launcher-wrapper::before {
    display: none;
}

.reaction-button img {
	height: 100%;
	width: auto;
}

.reaction-selector {
	margin: 0;
	padding: 0;
	text-align: center;
}

.reaction-selector li {
	display: inline-block;
	margin: 4px 6px 4px 4px;
}

.reaction-selector img {
	height: 32px;
	transition: transform 200ms linear;
	width: 32px;
}

.reaction-selector a:hover img {
	transform: scale(1.3);
}

.reaction-post-bar {
    align-items: flex-start;
	clear: both;
	display: flex;
	justify-content: flex-start;
	margin: 12px 0;
    margin-left: -2px;
    flex-direction: column;
}

.reaction-post-bar::after {
    content: "";
    clear: both;
    display: block;
}

.reaction-score-list {
    display: flex;
    align-items: center;
    padding: 0;
}

.reaction-score-list.empty {
	display: none;
}

.reaction-score-list:after {
	content: "";
	clear: both;
	display: block;
}

.reaction-score-list a {
	border: 2px solid transparent;
	border-radius: 50%;
	float: left;
	line-height: 1px;
    position: relative;
}

.reaction-score-list .list-scores a:not(:first-child) {
	margin-left: -8px;
}

.reaction-score-list img {
	border-radius: 50%;
	height: 14px;
	width: 14px;
}

.reaction-score-list > ul {
	list-style-type: none;
}

.reaction-score-list > ul li.reactions-launcher {
	float: none;
}

.reaction-score-list > ul li.reactions-launcher.cbb-btn {
	padding: 4px 8px;
}

.reaction-score-list .reactions-launcher > .reaction-button {
	margin: 0;
}

/* Dialog
------------------------------ */
.reactions-loading,
.reactions-loading > span {
	height: 50px;
	width: 50px;
}

.cbb-dialog .reactions-loading {
	left: 50%;
	position: absolute;
	top: 30%;
	transform: translate(-50%);
}

.cbb-dropdown .reactions-loading {
	margin: 20px auto;
}

.cbb-dropdown .reactions-loading,
.cbb-dropdown .reactions-loading > span {
	height: 35px;
	width: 35px;
}

.reactions-view-dialog .cbb-dialog-content {
	display: flex;
}

.reactions-view-list li {
	align-items: center;
	display: flex;
	font-size: 11px;
	gap: 10px;
	padding: 6px 8px;
}

.reactions-view-list img {
	height: 24px;
	max-width: 24px;
}

.reactions-view-list .tab-counter {
	font-weight: bold;
	margin-left: auto;
}

.reactions-list {
	display: flex;
    flex-direction: column;
    flex: auto;
	max-width: 100%;
}

.reactions-list .tab-header {
	border-bottom: 1px solid #efefef;
	flex: none;
    overflow-x: auto;
	white-space: nowrap;
}

.reactions-list .tab-header a {
	border-bottom: 3px solid transparent;
	box-sizing: border-box;
	display: inline-block;
	height: 38px;
	line-height: 26px;
    padding: 0 15px 8px 15px;
	text-decoration: none;
	vertical-align: bottom;
}

.reactions-list .tab-header a.active {
    border-bottom-color: blue;
}

.reactions-list .tab-header a img {
	height: 26px;
	margin-right: 2px;
	width: 26px;
}

.reactions-list .tab-header a span {
	font-size: 12px;
    vertical-align: middle;
    display: inline-block;
    font-weight: bold;
}

.reactions-list .tab-content {
	flex: auto;
	list-style-type: none;
	overflow: auto;
	padding: 0 0.5em;
}

.reactions-list .tab-header::-webkit-scrollbar,
.reactions-list .tab-content::-webkit-scrollbar {
	width: 4px;
	height: 4px;
	-webkit-appearance: none;
	background: rgba(0, 0, 0, .1);
	border-radius: 3px;
}

.reactions-list .tab-header::-webkit-scrollbar-thumb,
.reactions-list .tab-content::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, .3);
	border-radius: 3px;
}

.reactions-list .tab-content li {
	display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px 0;
}

.reaction-row-pictures {
	margin-right: 10px;
	position: relative;
}

.reaction-row-pictures .reaction-image {
	bottom: 0;
	height: 22px;
	position: absolute;
	right: 0;
    width: 20px;
}

.reaction-row-pictures .user-avatar {
	height: 40px;
	width: 40px;
}

.reaction-row-pictures .user-avatar img,
.reaction-row-pictures .user-avatar .cbb-no-avatar {
	height: 100%;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
}

.reaction-row-info {
	flex: auto;
	width: 50%;
}

.reaction-row-info .username,
.reaction-row-info .username-coloured {
	font-size: 1.1em;
    font-weight: bold;
}

.reaction-row-info img {
	max-width: 80%;
}

.reaction-row-time {
	padding: 0 10px;
	white-space: nowrap;
}

.reaction-row-actions a.icon-only {
	font-size: 14px;
}

/* RTL
------------------------------ */
.rtl .reactions-launcher,
.rtl li.reactions-launcher,
.rtl .reaction-launcher-wrapper,
.rtl .reaction-score-list {
	float: left;
}

.rtl .reaction-score-list {
	margin-left: 0;
	margin-right: 5px;
}

.rtl .reactions-launcher > .reaction-button {
	margin-left: unset;
	margin-right: 5px;
}

.rtl .reaction-row-pictures {
	margin-left: 10px;
	margin-right: unset;
}

.rtl .reaction-row-pictures .reaction-image {
	left: 0;
	right: unset;
}

.rtl .reactions-list .tab-header a img {
	margin-left: 2px;
	margin-right: 0;
}

/* Dòng trên: icon + text tên người react */
.reaction-post-bar-top {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px;                 /* khoảng cách nhỏ giữa icon và text */
}

/* Dòng dưới: nút Like / launch button */
.reaction-post-bar-bottom {
    margin-top: 14px;
    padding-top: 0;
    padding-left: 0;

}

/* 1) Cho nút reaction hiển thị icon + text trên 1 dòng */
.reactions-launcher > .reaction-button.button-icon-only {
    text-indent: 0;          /* phpBB mặc định ẩn text, mở lại */
    overflow: visible;
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 2) Khi KHÔNG có reaction (class default-icon) -> màu mặc định là vàng */
.reactions-launcher > .reaction-button.default-icon {
    color: rgba(243, 187, 20, 0.75);          /* vàng */
}

/* Tự hiện chữ Like sau icon, dùng màu kế thừa từ <a> */
.reactions-launcher > .reaction-button.default-icon::after {
    content: 'Like';
    margin-left: 4px;
    font-size: 0.9em;
    font-weight: 500;
    color: inherit;          /* ăn theo color của button */
}

/* Hover nút Like mặc định -> đổi màu cả icon + chữ sang xanh Facebook */
.reactions-launcher > .reaction-button.default-icon:hover {
    color: #1877F2;
}

/* 3) Span text khi ĐÃ react (Love, Care, Sad...) */
.reactions-launcher > .reaction-button.button-icon-only span {
    display: inline-block;
    margin-left: 0px;
    font-size: 0.9em;
    font-weight: 500;
}

/* 4) Launcher icon SVG – màu cố định theo trạng thái default-icon */
/* Mặc định: icon launch vàng #f3bb14 */
.reactions-launcher > .reaction-button.default-icon .icon {
    stroke: currentColor;
    fill: rgba(243, 187, 20, 0.75) !important;
    height: 16px;
    transition: height 0.1s ease;
}

/* Hover: icon launch xanh #1877F2 + hiệu ứng thu nhỏ nhẹ */
.reactions-launcher > .reaction-button.default-icon:hover .icon {
    fill: #1877F2 !important;
    height: 14px;
}


/* 5) Màu chữ theo loại reaction – dựa trên tên file icon trong src */

/* Like -> xanh Facebook */
.reactions-launcher img[src*="like.svg"] + span {
    color: #1877F2 !important;
}

/* Love -> hồng */
.reactions-launcher img[src*="love.svg"] + span {
    color: #ff4081 !important;
}

/* Care, Haha, Wow, Sad -> vàng */
.reactions-launcher img[src*="matter.svg"] + span,   /* Care */
.reactions-launcher img[src*="enjoy.svg"] + span,    /* Haha */
.reactions-launcher img[src*="surprise.svg"] + span, /* Wow */
.reactions-launcher img[src*="sad.svg"] + span {     /* Sad */
    color: rgba(243, 187, 20, 0.9) !important;
}

/* Angry -> cam */
.reactions-launcher img[src*="angry.svg"] + span {
    color: #ff9800 !important;
}




/* Thu nhỏ font phần "A, B và X người khác" trong thanh reactions */
.reaction-post-bar .list-label,
.reaction-post-bar .list-label a,
.reaction-post-bar .list-label span {
    font-size: 1.1em;   
    color: rgba(243, 187, 20, 0.75) !important;
}


/* Dark Theme
------------------------------ */
.dark-theme .reactions-list .tab-header {
	border-color: #444;
}

.dark-theme .reaction-launcher-wrapper:not(:first-child)::before {
	background-color: #3f3f3f;
}

/* Responsive
------------------------------ */
@media only screen and (max-width: 500px) {
	.reaction-button span,
	.reaction-row-time {
		display: none;
	}
}