.ys-wps {
	position: relative;
	width: 100%;
	color: #555;
	font-size: 16px;
	line-height: 1.35;
}

.ys-wps,
.ys-wps * {
	box-sizing: border-box;
}

.ys-wps__form {
	position: relative;
	width: 100%;
	margin: 0;
}

.ys-wps__field {
	display: block;
	width: 100%;
	height: 33px;
	margin: 0;
	padding: 5px 34px 5px 8px;
	border: 1px solid #222;
	border-radius: 2px;
	background: #fff;
	color: #333;
	font: inherit;
	line-height: 1.2;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.ys-wps__field:focus {
	border-color: #111;
	box-shadow: 0 0 0 1px #111 inset;
}

.ys-wps__field::-webkit-search-cancel-button {
	display: none;
}

.ys-wps__clear {
	position: absolute;
	top: 50%;
	right: 8px;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	color: #333;
	cursor: pointer;
	font-size: 20px;
	line-height: 20px;
	text-align: center;
}

.ys-wps__clear:hover,
.ys-wps__clear:focus {
	color: #000;
	outline: none;
}

.ys-wps__results {
	position: absolute;
	top: calc(100% + 1px);
	left: 0;
	z-index: 10000;
	width: 100%;
	max-height: min(70vh, 520px);
	overflow-y: auto;
	border: 1px solid #d8d8d8;
	background: #fff;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.ys-wps__result {
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	align-items: center;
	min-height: 40px;
	padding: 4px 10px;
	color: #555;
	text-decoration: none;
}

.ys-wps__result:hover,
.ys-wps__result:focus,
.ys-wps__result.is-active {
	background: #efefef;
	color: #444;
	outline: none;
	text-decoration: none;
}

.ys-wps__thumb-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 32px;
	overflow: hidden;
}

.ys-wps__thumb {
	display: block;
	max-width: 24px;
	max-height: 32px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.ys-wps__title {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 18px;
	font-weight: 400;
}

.ys-wps__empty {
	padding: 10px 12px;
	color: #666;
	font-size: 15px;
}

.ys-wps.is-loading .ys-wps__field {
	background-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06), transparent);
	background-size: 220% 100%;
	animation: ys-wps-loading 1s linear infinite;
}

@keyframes ys-wps-loading {
	from {
		background-position: 120% 0;
	}
	to {
		background-position: -120% 0;
	}
}

@media (max-width: 989px) {
	.ys-wps__field {
		height: 35px;
		font-size: 16px;
	}

	.ys-wps__results {
		max-height: min(65vh, 430px);
	}

	.ys-wps__result {
		grid-template-columns: 34px minmax(0, 1fr);
		min-height: 44px;
		padding: 6px 9px;
	}

	.ys-wps__title {
		font-size: 16px;
		line-height: 1.25;
	}
}

@media (max-width: 420px) {
	.ys-wps__title {
		white-space: normal;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}
}
