/**
 * Estilos del popover de búsqueda Krax
 *
 * Clases con prefijo krax- para evitar conflictos con YITH u otros plugins.
 */

.krax-popover-results {
	display: none;
	margin-top: 10px;
	z-index: 999999;
	position: fixed;
	box-sizing: border-box;
	visibility: visible;
}

.krax-popover-results[aria-hidden="false"] {
	display: block;
}

.krax-popover-results.krax-loading .krax-popover-content {
	opacity: 0.8;
}

.krax-popover-content {
	background: #fff;
	padding: 30px;
	border-radius: 13px;
	border: 1px solid #d8d8d8;
	max-height: 600px;
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: 3px 0 15px rgba(0, 0, 0, 0.15);
}

.krax-popover-content::-webkit-scrollbar-track {
	border-radius: 13px;
}

.krax-popover-content::-webkit-scrollbar-thumb {
	border-radius: 13px;
	background: #ccc;
}

.krax-search-results-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 15px;
	margin-top: 0;
	margin-bottom: 15px;
}

@media (min-width: 601px) {
	.krax-search-results-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.krax-search-result-item {
	cursor: pointer;
	transition: all 0.3s linear;
	padding: 10px;
	text-decoration: none;
	color: inherit;
	border-radius: 8px;
	display: block;
}

.krax-search-result-item:hover {
	background: rgba(0, 0, 0, 0.04);
}

.krax-search-result-item.krax-not-purchasable {
	opacity: 0.85;
}

.krax-result-item__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.krax-result-item__thumbnail {
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 6px;
	background: #f5f5f5;
}

.krax-result-item__thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.krax-result-item__name-text {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.3;
}

.krax-total-results {
	font-size: 0.9rem;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid rgba(151, 151, 151, 0.18);
}

.krax-total-results-link {
	color: var(--wp--preset--color--primary, #007565);
	text-decoration: none;
}

.krax-total-results-link:hover {
	text-decoration: underline;
}

.krax-no-results,
.krax-loading-text,
.krax-error {
	display: block;
	padding: 15px;
	text-align: center;
	color: #666;
}

.krax-error {
	color: #c00;
}
