/*!
 * netden Akıllı Arama — canlı arama arayüzü.
 * Tema tasarım token'larıyla uyumlu (fallback değerlerle birlikte).
 */

.nds-form {
	position: relative;
}

/* ---- Panel ---- */
.nds-panel {
	position: absolute;
	top: calc( 100% + 8px );
	left: 0;
	right: 0;
	z-index: 1200;
	background: var(--nd-surface, #fff);
	border: 1px solid var(--nd-border, #e5e9f2);
	border-radius: var(--nd-radius-card, 16px);
	box-shadow: var(--nd-shadow-card, 0 10px 26px rgba(12, 20, 36, 0.10));
	padding: 8px;
	max-height: min( 70vh, 560px );
	overflow-y: auto;
	overscroll-behavior: contain;
	font-family: var(--nd-font-body, "Inter", sans-serif);
}

.nds-panel.is-loading::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	border-radius: 2px 2px 0 0;
	background: linear-gradient( 90deg, transparent, var(--nd-accent, #f4470b), transparent );
	animation: nds-bar 1s linear infinite;
}

@keyframes nds-bar {
	0%   { transform: translateX( -100% ); }
	100% { transform: translateX( 100% ); }
}

/* ---- Groups ---- */
.nds-group {
	padding: 6px 4px;
}
.nds-group + .nds-group {
	border-top: 1px solid var(--nd-hairline, #edf0f7);
}
.nds-group__title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--nd-muted, #8a93a8);
	padding: 6px 10px 4px;
}

/* ---- Item rows ---- */
.nds-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 10px;
	border-radius: 12px;
	color: var(--nd-ink, #0c1424);
	text-decoration: none;
	transition: background-color 0.12s ease;
}
.nds-item:hover,
.nds-item.is-active {
	background: var(--nd-input-bg, #f1f4fa);
}
.nds-item__title {
	flex: 1;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.nds-item__meta {
	font-size: 12px;
	color: var(--nd-muted, #8a93a8);
	background: var(--nd-input-bg, #f1f4fa);
	border-radius: 999px;
	padding: 2px 9px;
	flex: none;
}
.nds-ico {
	width: 18px;
	height: 18px;
	color: var(--nd-muted, #8a93a8);
	flex: none;
}

/* ---- Product rows ---- */
.nds-item--product .nds-item__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.nds-item--product .nds-item__title {
	-webkit-line-clamp: 1;
	font-weight: 600;
}
.nds-item__price {
	font-size: 13px;
	font-weight: 700;
	color: var(--nd-ink, #0c1424);
}
.nds-item__price del {
	color: var(--nd-muted, #8a93a8);
	font-weight: 500;
	margin-right: 6px;
}
.nds-item__price ins {
	color: var(--nd-accent, #f4470b);
	text-decoration: none;
}
.nds-thumb {
	width: 46px;
	height: 46px;
	border-radius: 10px;
	object-fit: cover;
	background: var(--nd-input-bg, #f1f4fa);
	border: 1px solid var(--nd-hairline, #edf0f7);
	flex: none;
}
.nds-thumb--empty {
	display: inline-block;
}

/* ---- Popular chips ---- */
.nds-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 4px 10px 8px;
}
.nds-chip {
	border: 1px solid var(--nd-border, #e5e9f2);
	background: var(--nd-surface, #fff);
	color: var(--nd-text-2, #3a4358);
	border-radius: 999px;
	padding: 6px 13px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.12s ease, color 0.12s ease;
}
.nds-chip:hover {
	border-color: var(--nd-accent, #f4470b);
	color: var(--nd-accent, #f4470b);
}

/* ---- See all / empty ---- */
.nds-seeall {
	display: block;
	text-align: center;
	margin: 6px 4px 2px;
	padding: 11px;
	border-radius: 12px;
	background: var(--nd-accent-soft, #ffece3);
	color: var(--nd-accent, #f4470b);
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
}
.nds-seeall:hover,
.nds-seeall.is-active {
	background: var(--nd-accent, #f4470b);
	color: #fff;
}
.nds-empty {
	text-align: center;
	padding: 32px 16px;
}
.nds-empty__title {
	font-size: 15px;
	font-weight: 700;
	color: var(--nd-ink, #0c1424);
}
.nds-empty__text {
	font-size: 13px;
	color: var(--nd-muted, #8a93a8);
	margin-top: 4px;
}

/* ---- Mobile header inside panel (hidden on desktop) ---- */
.nds-panel__head {
	display: none;
}
.nds-backdrop {
	position: fixed;
	inset: 0;
	background: rgba( 12, 20, 36, 0.5 );
	z-index: 1100;
}
body.nds-locked {
	overflow: hidden;
}

/* ---- Mobile: full-screen sheet ---- */
@media (max-width: 767px) {
	.nds-form.nds-open .nds-panel {
		position: fixed;
		inset: 0;
		top: 0;
		z-index: 1300;
		max-height: 100vh;
		height: 100%;
		border: 0;
		border-radius: 0;
		padding: 8px 12px 24px;
	}
	.nds-panel__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		position: sticky;
		top: 0;
		background: var(--nd-surface, #fff);
		padding: 12px 6px;
		margin: -8px -12px 4px;
		border-bottom: 1px solid var(--nd-hairline, #edf0f7);
		font-weight: 700;
		font-size: 15px;
		color: var(--nd-ink, #0c1424);
	}
	.nds-close {
		border: 0;
		background: var(--nd-input-bg, #f1f4fa);
		width: 34px;
		height: 34px;
		border-radius: 10px;
		font-size: 22px;
		line-height: 1;
		color: var(--nd-text-2, #3a4358);
		cursor: pointer;
		flex: none;
	}
}

/* ---- Dark scheme safety (theme is light, but keep panel readable) ---- */
@media (prefers-color-scheme: dark) {
	.nds-panel {
		background: var(--nd-surface, #fff);
	}
}
