/* Papertel Context Menu Search — frontend styles */

#wpcms-context-menu {
	position: fixed;
	z-index: 2147483647; /* massimo z-index per sovrastare qualsiasi overlay */
	min-width: 180px;
	max-width: 340px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0, 0, 0, 0.08);
	padding: 4px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #1d2327;
	user-select: none;
	-webkit-user-select: none;
	pointer-events: auto;
	/* Animazione di entrata leggera */
	animation: wpcms-fade-in 0.1s ease-out both;
}

@keyframes wpcms-fade-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wpcms-menu-item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	outline: none;
	transition: background-color 0.1s ease;
}

.wpcms-menu-item:hover,
.wpcms-menu-item:focus {
	background-color: #f0f6fc;
	color: #0073aa;
}

.wpcms-menu-item:active {
	background-color: #e0eef9;
}

.wpcms-menu-item strong {
	font-weight: 600;
	max-width: 240px;
	overflow: hidden;
	text-overflow: ellipsis;
	display: inline-block;
	vertical-align: bottom;
}

.wpcms-icon {
	flex-shrink: 0;
	font-size: 13px;
	line-height: 1;
}

/* Modalità scura (prefers-color-scheme) */
@media (prefers-color-scheme: dark) {
	#wpcms-context-menu {
		background: #1e1e1e;
		border-color: rgba(255, 255, 255, 0.15);
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
		color: #e8eaed;
	}

	.wpcms-menu-item:hover,
	.wpcms-menu-item:focus {
		background-color: #2d2d2d;
		color: #5ba4f5;
	}

	.wpcms-menu-item:active {
		background-color: #383838;
	}
}
