/* Woo AI Semantic Search — frontend styles */

.aiws-wrap,
.aiws-form {
	position: relative;
	max-width: 560px;
	width: 100%;
	font-size: 16px;
}

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

.aiws-input {
	width: 100%;
	padding: 11px 44px 11px 16px;
	border: 1px solid #cfd4dc;
	border-radius: 8px;
	background: #fff;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
	font-size:16px!important;
}

.aiws-input:focus {
	outline: none;
	border-color: #6b7280;
	box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.15);
}

.aiws-submit {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #4b5563;
	cursor: pointer;
}

.aiws-submit:hover {
	background: #f3f4f6;
}

/* Loading spinner inside the input */
.aiws-spinner {
	position: absolute;
	right: 14px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid #d1d5db;
	border-top-color: #374151;
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.1s ease;
}

.aiws-loading .aiws-spinner {
	opacity: 1;
	animation: aiws-spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.aiws-loading .aiws-spinner {
		animation-duration: 1.6s;
	}
}

/* Dropdown */
.aiws-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 9999;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
	overflow: hidden;
}

.aiws-results {
	list-style: none;
	margin: 0;
	padding: 6px;
	max-height: 420px;
	overflow-y: auto;
}

.aiws-item {
	margin: 0;
	padding: 0;
}

.aiws-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	transition: background 0.1s ease;
}

.aiws-link:hover,
.aiws-link:focus-visible {
	background: #f3f4f6;
}

.aiws-thumb {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	overflow: hidden;
	background: #f3f4f6;
}

.aiws-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

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

.aiws-title {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aiws-price {
	font-size: 13px;
	color: #6b7280;
}

.aiws-price ins {
	text-decoration: none;
}

.aiws-empty {
	padding: 16px;
	text-align: center;
	color: #6b7280;
	font-size: 14px;
}
