/* WP Live Search – frontend */

.wpls-wrap {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.wpls-wrap * {
	box-sizing: border-box;
}

.wpls-bar {
	display: flex;
	align-items: center;
	width: 100%;
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 5px;
	overflow: hidden;
	min-height: 54px;
}

.wpls-bar:focus-within {
	box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.wpls-btn-filter,
.wpls-search-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	background: none;
	border: none;
	padding: 0;
	color: #111;
	flex-shrink: 0;
}

.wpls-btn-filter {
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

.wpls-btn-filter svg {
	transition: transform 0.25s ease !important;
}

.wpls-btn-filter.is-open {
	background: #111;
	color: #fff;
}

.wpls-btn-filter.is-open svg {
	transform: rotate(180deg) !important;
}

.wpls-btn-clear {
	display: none;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	background: none;
	border: none;
	padding: 0;
	color: #999;
	cursor: pointer;
	flex-shrink: 0;
}

.wpls-btn-clear.is-visible {
	display: flex;
}

.wpls-btn-clear:hover {
	color: #d63638;
}

.wpls-search-icon {
	opacity: 0.45;
	pointer-events: none;
}

.wpls-bar input,
.wpls-bar input[type="search"],
.wpls-input {
	flex: 1 1 auto;
	display: block;
	width: 100%;
	min-width: 0;
	height: 52px;
	margin: 0;
	padding: 0 12px;
	border: none;
	border-radius: 0;
	outline: none;
	background: transparent;
	background-color: transparent !important;
	box-shadow: none;
	color: #111 !important;
	font-family: inherit;
	font-size: 16px;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	-webkit-appearance: none;
	appearance: none;
}

.wpls-bar input:focus,
.wpls-bar input[type="search"]:focus,
.wpls-input:focus {
	outline: none;
	border: none;
	box-shadow: none;
	background: transparent;
}

.wpls-bar input::placeholder,
.wpls-bar input[type="search"]::placeholder,
.wpls-input::placeholder {
	color: #999;
	opacity: 1;
}

/* Quitar decoración nativa de search en WebKit */
.wpls-bar input[type="search"]::-webkit-search-decoration,
.wpls-bar input[type="search"]::-webkit-search-cancel-button,
.wpls-bar input[type="search"]::-webkit-search-results-button,
.wpls-bar input[type="search"]::-webkit-search-results-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.wpls-results {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	width: 100%;
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 5px;
	overflow: hidden;
	display: none;
	z-index: 999999;
	max-height: 420px;
	overflow-y: auto;
}

.wpls-result-item {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	width: 100%;
	padding: 14px;
	text-decoration: none;
	color: #111;
	transition: background 0.15s ease;
	border-bottom: 1px solid #efefef;
}

.wpls-result-item:last-child {
	border-bottom: none;
}

.wpls-result-item:hover {
	background: #f7f7f7;
}

.wpls-result-thumb {
	width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    display: block;
    border: 1px solid #dee2e6;
}

.wpls-result-body {
	flex: 1;
	min-width: 0;
}

.wpls-result-title {
	font-size: 18px;
	line-height: 1.3;
	font-weight: 700;
	margin-bottom: 4px;
	color: #111;
}

.wpls-result-title mark {
	background: #ffe66d;
	color: #111;
	padding: 0 2px;
}

.wpls-result-excerpt {
	font-size: 14px;
	line-height: 1.5;
	color: #666;
	margin-bottom: 8px;
}

.wpls-result-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	padding: 0 10px;
	background: #111;
	color: #fff;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.wpls-loading {
	padding: 24px;
	text-align: center;
	font-size: 14px;
	color: #777;
}

.wpls-no-results {
	padding: 24px;
	text-align: center;
	color: #777;
}

.wpls-filters {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	width: 220px;
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 5px;
	display: none;
	overflow: hidden;
	z-index: 1000000;
	opacity: 0;
	transform: translateY(-10px) scale(0.98);
	transform-origin: top left;
	pointer-events: none;
	transition:
		opacity 0.22s ease,
		transform 0.22s ease,
		box-shadow 0.22s ease;
}

.wpls-filters.is-open {
	display: block;
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.wpls-filter-item {
	padding: 12px 16px;
	cursor: pointer;
	transition: background 0.15s ease, padding-left 0.15s ease !important;
	font-size: 14px;	
	font-weight: 600;
	color: #111;
}

.wpls-filter-item:hover {
	background: #f5f5f5;
	padding-left: 20px;
}

.wpls-filter-item.active {
	background: #111;
	color: #fff;
}

.wpls-filter-item.active:hover {
	padding-left: 16px;
}