/* Emoji in posts */
span.stoker-emoji {
	display: inline-block;
	line-height: 1.2;
	vertical-align: middle;
	font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

blockquote span.stoker-emoji {
	filter: grayscale(1);
	opacity: .65;
	font-size: 1.3em;
}

/* Picker */
div.stoker-emoji {
	margin: 4px 0;
	line-height: 1.8;
}
.stoker-emoji-ins {
	display: inline-block;
	line-height: 1.2;
	padding: 2px 0;
	border-radius: 3px;
	cursor: pointer;
	transition: transform .12s, background-color .12s;
}
a.stoker-emoji-ins,
a.stoker-emoji-ins:link,
a.stoker-emoji-ins:visited,
a.stoker-emoji-ins:hover,
a.stoker-emoji-ins:focus,
a.stoker-emoji-ins:focus-visible,
a.stoker-emoji-ins:active {
	text-decoration: none;
}
.stoker-emoji-ins:hover {
	background: rgba(0, 0, 0, 0.08);
}
.stoker-emoji-ins:hover,
.stoker-emoji-ins:focus-visible {
	transform: scale(1.25);
}
.stoker-emoji-ins:active {
	transform: scale(.95);
}

/* More popup */
.stoker-emoji-more {
	position: relative;
	display: block;
}
.stoker-emoji-more-btn {
	display: inline-block;
	margin-left: 4px;
	font-size: 11px;
	vertical-align: middle;
	cursor: pointer;
}
.stoker-emoji-panel {
	position: absolute;
	z-index: 9999;
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	width: max-content;
	max-width: 188px;
	max-height: 180px;
	overflow-y: auto;
	padding: 4px;
	background: #fff;
	border: 1px solid #bbb;
	border-radius: 4px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.stoker-emoji-panel[hidden] {
	display: none;
}

/* Quick reply */
#qr_postform .stoker-emoji {
	float: right;
	width: 18%;
	margin: 0;
}

/* Dark mode */
html.phpbb-dark-mode span.stoker-emoji,
html.phpbb-dark-mode .stoker-emoji-ins {
	filter: brightness(.9) saturate(.95);
}
html.phpbb-dark-mode blockquote span.stoker-emoji {
	filter: grayscale(1) brightness(.9);
}
html.phpbb-dark-mode .stoker-emoji-ins:hover {
	background: rgba(255, 255, 255, 0.12);
}
html.phpbb-dark-mode .stoker-emoji-panel {
	color-scheme: dark;
	background: #0f1724;
	border-color: #38465a;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.stoker-emoji-ins {
		transition: none;
	}
}

/* Responsive */
@media (max-width: 700px) {
	#qr_postform .stoker-emoji {
		float: none;
		width: auto;
	}
}
@media (max-width: 500px) {
	.stoker-emoji-panel {
		max-width: 240px;
	}
}
