/* ── Vicuña Search Bar ─────────────────────────────────────── */

.vicuna-search-container {
	position: relative;
	width: 100%;
}

/* ── Search Wrap ───────────────────────────────────────────── */

.vicuna-search-wrap {
	display: flex;
	align-items: center;
	background-color: #ffffff;
	border-radius: 50px;
	padding: 10px 10px 10px 20px;
	transition: box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
	overflow: hidden;
}

.vicuna-search-wrap:focus-within {
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* ── Input ─────────────────────────────────────────────────── */

.vicuna-search-input {
	flex: 1;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	font-size: 15px;
	line-height: 1.4;
	color: #333333;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.vicuna-search-input:focus,
.vicuna-search-input:active {
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.vicuna-search-input::placeholder { color: #aaaaaa; }
.vicuna-search-input::-webkit-search-decoration,
.vicuna-search-input::-webkit-search-cancel-button,
.vicuna-search-input::-webkit-search-results-button,
.vicuna-search-input::-webkit-search-results-decoration { display: none; }

/* ── Icon Button ───────────────────────────────────────────── */

.vicuna-search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	flex-shrink: 0;
	background: transparent;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s ease, transform 0.15s ease;
	color: #555555;
}

.vicuna-search-btn:hover  { background-color: rgba(0,0,0,0.06); transform: scale(1.05); }
.vicuna-search-btn:active { transform: scale(0.97); }

.vicuna-search-btn svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	display: block;
	pointer-events: none;
}

/* ── Dropdown ──────────────────────────────────────────────── */

.vicuna-search-results,
.vicuna-search-no-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.12);
	z-index: 9999;
	animation: vsb-fade 0.15s ease;
}

.vicuna-search-no-results {
	padding: 16px;
	text-align: center;
	font-size: 14px;
	color: #888888;
}

@keyframes vsb-fade {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.vicuna-search-results { overflow: hidden; }

/* ── Result Items ──────────────────────────────────────────── */

.vsb-result-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	cursor: pointer;
	text-decoration: none;
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.15s ease;
}

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

.vsb-result-item:hover,
.vsb-result-item.vsb-active {
	background-color: #f5f5f5;
	outline: none;
}

/* ── Thumbnail ─────────────────────────────────────────────── */

.vsb-result-thumb {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
}

.vsb-result-thumb-placeholder {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: #eeeeee;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.vsb-result-thumb-placeholder svg { width: 18px; height: 18px; fill: #bbbbbb; }

/* ── Text ──────────────────────────────────────────────────── */

.vsb-result-text  { flex: 1; min-width: 0; }

.vsb-result-title {
	font-size: 14px;
	font-weight: 500;
	color: #333333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.vsb-result-excerpt {
	font-size: 12px;
	color: #888888;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
}

.vsb-result-type {
	font-size: 11px;
	font-weight: 600;
	color: #e47c30;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

/* ── Loading ───────────────────────────────────────────────── */

.vsb-loading { padding: 16px; text-align: center; }

.vsb-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #eeeeee;
	border-top-color: #e47c30;
	border-radius: 50%;
	animation: vsb-spin 0.6s linear infinite;
}

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

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.vicuna-search-input { font-size: 14px; }
}

@media (max-width: 767px) {
	.vicuna-search-wrap  { padding: 8px 8px 8px 16px; }
	.vicuna-search-btn   { width: 36px; height: 36px; }
	.vicuna-search-btn svg { width: 18px; height: 18px; }
	.vicuna-search-input { font-size: 14px; }
	.vicuna-search-results,
	.vicuna-search-no-results {
		border-radius: 12px;
	}
	.vsb-result-item  { gap: 10px; padding: 10px 12px; }
	.vsb-result-thumb,
	.vsb-result-thumb-placeholder { width: 34px; height: 34px; }
}

@media (max-width: 480px) {
	.vicuna-search-wrap { padding: 6px 6px 6px 14px; }
	.vicuna-search-btn  { width: 32px; height: 32px; }
	.vicuna-search-btn svg { width: 16px; height: 16px; }
	.vsb-result-type    { display: none; }
}
