.wcls,
.wcls-panel {
	--wcls-accent: #2563eb;
	--wcls-border: #d5d9e0;
	--wcls-bg: #fff;
	--wcls-text: #1f2937;
	--wcls-muted: #6b7280;
	--wcls-hover: #f3f6fd;
	position: relative;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	color: var(--wcls-text);
}

.wcls *,
.wcls *::before,
.wcls *::after,
.wcls-panel,
.wcls-panel *,
.wcls-panel *::before,
.wcls-panel *::after {
	box-sizing: border-box;
}

.wcls-field {
	position: relative;
	display: flex;
	align-items: center;
}

.wcls .wcls-input {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 84px 0 16px;
	font-size: 15px;
	color: var(--wcls-text);
	background: var(--wcls-bg);
	border: 1px solid var(--wcls-border);
	border-radius: 8px;
	outline: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.wcls .wcls-input:focus {
	border-color: var(--wcls-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.wcls .wcls-input::-webkit-search-cancel-button {
	display: none;
}

.wcls .wcls-submit {
	position: absolute;
	top: 4px;
	right: 4px;
	bottom: 4px;
	width: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	color: #fff;
	background: var(--wcls-accent);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	line-height: 1;
}

.wcls .wcls-submit:hover,
.wcls .wcls-submit:focus {
	background: #1d4ed8;
	color: #fff;
}

.wcls-spinner {
	position: absolute;
	top: 50%;
	right: 54px;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid var(--wcls-border);
	border-top-color: var(--wcls-accent);
	border-radius: 50%;
	animation: wcls-spin 0.6s linear infinite;
}

.wcls-spinner[hidden] {
	display: none;
}

@keyframes wcls-spin {
	to {
		transform: rotate(360deg);
	}
}

.wcls-panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 99999;
	max-height: min(70vh, 480px);
	overflow-y: auto;
	padding: 6px;
	background: var(--wcls-bg);
	border: 1px solid var(--wcls-border);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
	overscroll-behavior: contain;
}

.wcls-panel[hidden] {
	display: none;
}

.wcls-heading {
	padding: 8px 10px 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wcls-muted);
}

.wcls-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 4px 8px 8px;
}

.wcls-panel .wcls-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	font-size: 13px;
	line-height: 1.2;
	color: var(--wcls-text);
	text-decoration: none;
	background: #f1f5f9;
	border-radius: 999px;
}

.wcls-panel .wcls-tag:hover,
.wcls-panel .wcls-tag.is-active {
	color: #fff;
	background: var(--wcls-accent);
}

.wcls-hash {
	opacity: 0.55;
}

.wcls-count {
	margin-left: 2px;
	font-size: 11px;
	opacity: 0.6;
}

.wcls-panel .wcls-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	color: var(--wcls-text);
	text-decoration: none;
	border-radius: 8px;
}

.wcls-panel .wcls-item:hover,
.wcls-panel .wcls-item.is-active {
	background: var(--wcls-hover);
}

.wcls-panel .wcls-thumb {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	margin: 0;
	object-fit: cover;
	background: #f1f5f9;
	border-radius: 6px;
}

.wcls-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.wcls-title {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.wcls-title mark,
.wcls-tag-name mark {
	padding: 0;
	color: inherit;
	font-weight: 700;
	background: rgba(250, 204, 21, 0.45);
	border-radius: 2px;
}

.wcls-price {
	font-size: 13px;
	color: var(--wcls-muted);
}

.wcls-price del {
	opacity: 0.6;
	margin-right: 4px;
}

.wcls-price ins {
	text-decoration: none;
	font-weight: 600;
	color: var(--wcls-accent);
}

.wcls-empty {
	padding: 16px 12px;
	font-size: 14px;
	color: var(--wcls-muted);
	text-align: center;
}

.wcls-panel .wcls-all {
	display: block;
	margin-top: 4px;
	padding: 10px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	color: var(--wcls-accent);
	text-decoration: none;
	border-top: 1px solid var(--wcls-border);
	border-radius: 0 0 8px 8px;
}

.wcls-panel .wcls-all:hover,
.wcls-panel .wcls-all.is-active {
	background: var(--wcls-hover);
}

@media (max-width: 480px) {
	.wcls-panel {
		max-height: 60vh;
	}
}

/* Let the suggestion panel escape Elementor popup / menu containers. */
.elementor-popup-modal .dialog-message,
.elementor-popup-modal .dialog-widget-content,
.elementor-popup-modal .elementor-widget-shortcode,
.elementor-popup-modal .elementor-shortcode {
	overflow: visible;
}

/* Floating mode: the panel lives on <body> so no parent (popup, menu) can clip it. */
.wcls-panel.wcls-floating {
	position: fixed;
	right: auto;
	z-index: 2147483000;
	font-family: inherit;
	color: var(--wcls-text);
}
