/* E-kalastus Search — front-end styles. */

.eks-search {
	position: relative;
	width: 100%;
	max-width: 480px;
}

.eks-search__form {
	display: flex;
	align-items: stretch;
	position: relative;
}

.eks-search__input {
	flex: 1 1 auto;
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #ccc;
	border-radius: 4px 0 0 4px;
	font-size: 15px;
	line-height: 1.4;
	outline: none;
}

.eks-search__input:focus {
	border-color: #666;
}

.eks-search__submit {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-left: none;
	border-radius: 0 4px 4px 0;
	background: #f6f7f7;
	color: #3c434a;
	cursor: pointer;
	font-size: 16px;
}

.eks-search__submit:hover {
	background: #e0e0e1;
}

.eks-search__icon {
	display: block;
	width: 24px;
	height: 24px;
}

.eks-search__results {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 9999;
	margin-top: 4px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	max-height: 70vh;
	overflow-y: auto;
	display: none;
}

.eks-search--open .eks-search__results {
	display: block;
}

.eks-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f0f0f0;
}

.eks-item:last-child {
	border-bottom: none;
}

.eks-item:hover,
.eks-item--active {
	background: #f6f9fc;
}

.eks-item__img {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
}

.eks-item__img img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 3px;
}

.eks-item__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.eks-item__title {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
}

.eks-item__sku {
	font-size: 12px;
	color: #888;
}

.eks-item__price {
	font-size: 13px;
	color: #2271b1;
}

.eks-item__stock--out {
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d63638;
}

.eks-empty,
.eks-loading {
	padding: 14px 12px;
	color: #888;
	font-size: 14px;
	text-align: center;
}
