/**
 * CHC Reactions Popup Styles
 */

/* Popup Container */
.chc-reactions-popup {
	position: absolute;
	background: white;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 12px;
	z-index: 9999;
	opacity: 1;
	transform: scale(1) translateY(0);
	transition: all 0.2s ease-in-out;
	pointer-events: auto;
	display: none;
}

.chc-reactions-popup.active {
	opacity: 1;
	transform: scale(1) translateY(0);
	pointer-events: auto;
	display: block;
}

/* Popup Inner */
.chc-reactions-popup-inner {
	display: flex;
	align-items: center;
	gap: 8px;
	position: relative;
}

/* Reactions Container */
.chc-reactions-popup-reactions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

/* Individual Reaction Button */
.chc-reaction-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	padding: 8px;
	cursor: pointer;
	border-radius: 8px;
	transition: all 0.2s ease;
	position: relative;
	min-width: 50px;
	min-height: 50px;
}

.chc-reaction-option:hover {
	background: #f0f0f0;
	transform: scale(1.1);
}

.chc-reaction-option:active {
	transform: scale(0.95);
}

/* Reaction Icon */
.chc-reaction-option .chc-reaction-icon {
	width: 32px;
	height: 32px;
	object-fit: contain;
	margin-bottom: 4px;
	transition: all 0.2s ease;
}

/* Reaction Label */
.chc-reaction-option .chc-reaction-label {
	font-size: 11px;
	font-weight: 500;
	color: #666;
	text-align: center;
	white-space: nowrap;
	max-width: 50px;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Active Reaction State */
.chc-reaction-option.chc-reaction-active {
	background: #e7f0fe;
	border: 2px solid #1976d2;
}

.chc-reaction-option.chc-reaction-active .chc-reaction-icon {
	filter: drop-shadow(0 0 4px rgba(25, 118, 210, 0.4));
}

.chc-reaction-option.chc-reaction-active .chc-reaction-label {
	color: #1976d2;
	font-weight: 600;
}

/* Greyed Out (Default) Reaction */
.chc-reaction-option.chc-reaction-greyed {
	opacity: 0.5;
}

.chc-reaction-option.chc-reaction-greyed .chc-reaction-icon {
	filter: grayscale(100%);
}

/* Loading State */
.chc-reaction-option.loading {
	opacity: 0.6;
	pointer-events: none;
}

.chc-reaction-option.loading .chc-reaction-icon {
	animation: spin 0.6s linear infinite;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

/* Close Button */
.chc-reactions-popup-close {
	background: transparent;
	border: none;
	color: #999;
	cursor: pointer;
	font-size: 16px;
	padding: 4px 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.2s ease;
	margin-left: 4px;
}

.chc-reactions-popup-close:hover {
	background: #f0f0f0;
	color: #333;
}

/* Reaction Button (Main) */
.chc-activity-reaction {
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px;
	border-radius: 6px;
	transition: all 0.2s ease;
	position: relative;
}

.chc-activity-reaction:hover {
	background: rgba(0, 0, 0, 0.05);
}

.chc-activity-reaction-icon {
	width: 24px;
	height: 24px;
	object-fit: contain;
	transition: all 0.2s ease;
}

.chc-activity-reaction.has-reaction .chc-activity-reaction-icon {
	filter: drop-shadow(0 0 3px rgba(25, 118, 210, 0.3));
}

/* Responsive */
@media (max-width: 768px) {
	.chc-reactions-popup {
		padding: 10px;
	}

	.chc-reactions-popup-reactions {
		gap: 4px;
	}

	.chc-reaction-option {
		min-width: 45px;
		min-height: 45px;
		padding: 6px;
	}

	.chc-reaction-option .chc-reaction-icon {
		width: 28px;
		height: 28px;
		margin-bottom: 2px;
	}

	.chc-reaction-option .chc-reaction-label {
		font-size: 10px;
	}
}

/* Accessibility */
.chc-reaction-option:focus,
.chc-reactions-popup-close:focus {
	outline: 2px solid #1976d2;
	outline-offset: 2px;
}

.chc-reaction-option:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}