/* Kinga Ajax Search CSS - Glassmorphism UI */

:root {
	--kinga-search-bg: rgba(255, 255, 255, 0.85);
	--kinga-search-backdrop: rgba(0, 0, 0, 0.4);
	--kinga-search-text: #333333;
	--kinga-search-border: rgba(255, 255, 255, 0.5);
	--kinga-search-accent: #000000;
	--kinga-search-hover: rgba(0, 0, 0, 0.05);
	--kinga-search-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.kinga-search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.kinga-search-overlay.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.kinga-search-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--kinga-search-backdrop);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.kinga-search-container {
	position: relative;
	width: 100%;
	max-width: 800px;
	margin-top: 10vh;
	background: var(--kinga-search-bg);
	border: 1px solid var(--kinga-search-border);
	border-radius: 24px;
	box-shadow: var(--kinga-search-shadow);
	padding: 24px;
	transform: translateY(-20px) scale(0.98);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	max-height: 80vh;
}

.kinga-search-overlay.is-active .kinga-search-container {
	transform: translateY(0) scale(1);
}

.kinga-search-close {
	position: absolute;
	top: -48px;
	right: 0;
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 8px;
	transition: transform 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.kinga-search-close:hover {
	transform: rotate(90deg);
}

.kinga-search-form-wrapper {
	position: relative;
	border-bottom: 2px solid rgba(0,0,0,0.1);
	padding-bottom: 16px;
}

.kinga-search-form {
	display: flex;
	align-items: center;
	width: 100%;
	position: relative;
}

.kinga-search-input-icon {
	color: var(--kinga-search-text);
	opacity: 0.5;
	margin-right: 16px;
}

#kinga-search-input {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 24px;
	color: var(--kinga-search-text);
	padding: 0;
	margin: 0;
	box-shadow: none;
	outline: none;
	font-family: inherit;
	font-weight: 500;
}

#kinga-search-input::placeholder {
	color: var(--kinga-search-text);
	opacity: 0.3;
}

#kinga-search-input:focus {
	outline: none;
	box-shadow: none;
}

.kinga-search-spinner {
	width: 24px;
	height: 24px;
	border: 3px solid rgba(0,0,0,0.1);
	border-top-color: var(--kinga-search-accent);
	border-radius: 50%;
	animation: kinga-spin 1s linear infinite;
	opacity: 0;
	transition: opacity 0.2s ease;
	position: absolute;
	right: 0;
}

.kinga-search-form.is-loading .kinga-search-spinner {
	opacity: 1;
}

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

.kinga-search-results-wrapper {
	overflow-y: auto;
	margin-top: 16px;
	padding-right: 8px;
}

/* Custom scrollbar for results */
.kinga-search-results-wrapper::-webkit-scrollbar {
	width: 6px;
}
.kinga-search-results-wrapper::-webkit-scrollbar-track {
	background: transparent;
}
.kinga-search-results-wrapper::-webkit-scrollbar-thumb {
	background: rgba(0,0,0,0.2);
	border-radius: 10px;
}

.kinga-no-results {
	padding: 32px 0;
	text-align: center;
	color: var(--kinga-search-text);
	opacity: 0.6;
	font-size: 18px;
}

.kinga-search-result-item {
	display: flex;
	align-items: center;
	padding: 12px;
	text-decoration: none;
	border-radius: 12px;
	transition: background 0.2s ease;
	color: inherit;
}

.kinga-search-result-item:hover,
.kinga-search-result-item:focus {
	background: var(--kinga-search-hover);
}

.kinga-search-result-image {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	overflow: hidden;
	margin-right: 16px;
	flex-shrink: 0;
	background: #f5f5f5;
}

.kinga-search-result-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.kinga-search-result-info {
	flex: 1;
	min-width: 0;
}

.kinga-search-result-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--kinga-search-text);
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.kinga-search-result-price {
	font-size: 14px;
	color: var(--kinga-search-accent);
	font-weight: 500;
}

.kinga-search-result-price del {
	opacity: 0.5;
	font-weight: normal;
	margin-right: 8px;
}

.kinga-search-view-all {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	margin-top: 8px;
	background: var(--kinga-search-hover);
	border-radius: 12px;
	text-decoration: none;
	color: var(--kinga-search-text);
	font-weight: 600;
	transition: background 0.2s ease;
}

.kinga-search-view-all:hover {
	background: rgba(0,0,0,0.08);
}

.kinga-search-view-all svg {
	margin-left: 8px;
}

@media (max-width: 768px) {
	.kinga-search-container {
		margin-top: 0;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;
		border: none;
	}
	.kinga-search-close {
		top: 16px;
		right: 16px;
		color: var(--kinga-search-text);
		z-index: 10;
		background: rgba(0,0,0,0.05);
		border-radius: 50%;
	}
	#kinga-search-input {
		font-size: 18px;
		padding-right: 40px;
	}
}
