/**
 * NexaShop Header Live Search Widget Styles
 */

.nexashop-search-widget-wrap {
	position: relative;
	width: 100%;
	max-width: 600px;
	margin: 0 auto;
	direction: rtl;
	box-sizing: border-box;
}

.nexashop-search-form {
	display: flex;
	align-items: center;
	background: #f8fafc;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.2s ease;
	position: relative;
	z-index: 10;
}

.nexashop-search-form:focus-within {
	border-color: #2563eb;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.nexashop-search-category-select {
	border: none;
	background: transparent;
	font-size: 13px;
	font-weight: 600;
	color: #64748b;
	padding: 0 14px;
	height: 44px;
	border-left: 1px solid #e2e8f0;
	outline: none;
	cursor: pointer;
	max-width: 140px;
}

.nexashop-search-input-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	position: relative;
}

.nexashop-search-input {
	width: 100%;
	height: 44px;
	border: none;
	background: transparent;
	padding: 0 16px;
	font-size: 14px;
	color: #1e293b;
	outline: none;
	box-sizing: border-box;
}

.nexashop-search-input::placeholder {
	color: #94a3b8;
}

.nexashop-search-loader {
	position: absolute;
	left: 14px;
	width: 18px;
	height: 18px;
	border: 2px solid #cbd5e1;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: nexashop-spin 0.6s linear infinite;
	display: none;
}

.nexashop-search-btn {
	border: none;
	background: #2563eb;
	color: #ffffff;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.nexashop-search-btn:hover {
	background: #1d4ed8;
}

.nexashop-search-btn .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* AJAX Results Dropdown */
.nexashop-search-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.12);
	z-index: 1000;
	display: none;
	max-height: 400px;
	overflow-y: auto;
	padding: 8px 0;
}

.nexashop-search-results.is-open {
	display: block;
}

.nexashop-search-item {
	display: flex;
	align-items: center;
	padding: 10px 16px;
	text-decoration: none;
	transition: background 0.15s ease;
	border-bottom: 1px solid #f1f5f9;
}

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

.nexashop-search-item:hover {
	background: #f8fafc;
}

.nexashop-search-item-thumb {
	width: 48px;
	height: 48px;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
	margin-left: 12px;
	background: #f1f5f9;
}

.nexashop-search-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nexashop-search-item-info {
	flex: 1;
	min-width: 0;
}

.nexashop-search-item-title {
	font-size: 13px;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nexashop-search-item-price {
	font-size: 13px;
	font-weight: 800;
	color: #059669;
}

.nexashop-search-no-results {
	padding: 20px;
	text-align: center;
	color: #64748b;
	font-size: 13px;
}

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

@media (max-width: 576px) {
	.nexashop-search-category-select {
		display: none;
	}
}
