/**
 * Creative IT - Live Search dropdown styles.
 * Doofinder-style floating panel. Brand navy #0F2238 + orange #F26522.
 */

/* Non-clipping wrapper the JS inserts around the search form, so the dropdown
   escapes the form's `overflow:hidden` pill styling and lines up under it. */
.cit-search-anchor {
	position: relative;
	width: 100%;
	max-width: 560px;
}

.cit-search-results {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	z-index: 9999;
	background: #ffffff;
	border: 1px solid #e2e6ec;
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(15, 34, 56, 0.20);
	overflow: hidden;
	max-height: 72vh;
	overflow-y: auto;
	text-align: left;
}

/* Section header */
.cit-search-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 13px 18px 9px;
	border-bottom: 1px solid #eef1f5;
}

.cit-search-head-label {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #8a95a3;
}

.cit-search-head-count {
	font-size: 11.5px;
	color: #8a95a3;
}

.cit-search-loading,
.cit-search-empty {
	padding: 22px 20px;
	color: #5b6776;
	font-size: 0.92rem;
	text-align: center;
}

.cit-search-list {
	list-style: none;
	margin: 0;
	padding: 6px;
}

.cit-search-list li { margin: 0; }

.cit-search-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px 12px;
	border-radius: 12px;
	text-decoration: none;
	color: #0f2238;
	transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

.cit-search-item:hover,
.cit-search-item.is-active {
	background: #f6f8fb;
	box-shadow: inset 3px 0 0 #f26522;
}

.cit-search-thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	border-radius: 10px;
	background: #eef2f7;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.cit-search-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.cit-search-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.cit-search-title {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.25;
	color: #0f2238;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cit-search-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #8a95a3;
}

.cit-search-cond {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	background: rgba(242, 101, 34, 0.13);
	color: #c44e15;
	font-weight: 600;
	font-size: 11.5px;
}

.cit-search-cat { font-size: 12px; color: #8a95a3; }

.cit-search-oos { color: #b4232a; font-weight: 600; font-size: 11.5px; }

.cit-search-price {
	flex: 0 0 auto;
	text-align: right;
	white-space: nowrap;
	font-weight: 600;
	font-size: 16px;
	color: #0f2238;
}

.cit-search-price ins,
.cit-search-price ins .woocommerce-Price-amount {
	font-size: 16px;
	font-weight: 600;
	color: #0f2238;
	text-decoration: none;
}

.cit-search-price del,
.cit-search-price del .woocommerce-Price-amount {
	font-size: 12.5px;
	font-weight: 400;
	color: #9aa4b1;
	text-decoration: line-through;
	margin-right: 6px;
}

.cit-search-all {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 14px;
	background: rgba(242, 101, 34, 0.07);
	border-top: 1px solid #eef1f5;
	text-decoration: none;
	color: #f26522;
	font-weight: 600;
	font-size: 13.5px;
}

.cit-search-all:hover,
.cit-search-all.is-active { background: rgba(242, 101, 34, 0.14); }

/* ---- v1.1: matched-term highlight ---- */
.cit-search-title mark {
	background: rgba(242, 101, 34, 0.18);
	color: inherit;
	padding: 0 1px;
	border-radius: 2px;
}

/* ---- v1.1: category + brand suggestion rows ---- */
.cit-search-suggs { padding: 6px; }

.cit-search-sugg {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: #0f2238;
	font-size: 13.5px;
	font-weight: 500;
}

.cit-search-sugg:hover,
.cit-search-sugg.is-active { background: #f6f8fb; box-shadow: inset 3px 0 0 #f26522; }

.cit-search-sugg-ic { color: #f26522; font-size: 12px; line-height: 1; }
.cit-search-sugg-n { margin-left: auto; color: #8a95a3; font-size: 12px; }

/* ---- v1.1: popular-search chips (empty-state) ---- */
.cit-search-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 16px 16px;
}

.cit-search-chip {
	border: 1px solid #e2e6ec;
	background: #f6f8fb;
	color: #0f2238;
	border-radius: 999px;
	padding: 7px 13px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.12s ease, border-color 0.12s ease;
}

.cit-search-chip:hover,
.cit-search-chip.is-active {
	background: rgba(242, 101, 34, 0.10);
	border-color: #f26522;
	color: #c44e15;
}

/* ---- v1.1: mobile full-screen overlay ---- */
.cit-search-backdrop { display: none; }
body.cit-search-noscroll { overflow: hidden; }

@media (max-width: 600px) {
	.cit-search-results { max-height: 64vh; }
	.cit-search-price { font-size: 15px; }

	.cit-search-mobile-open .cit-search-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(15, 34, 56, 0.45);
		z-index: 9998;
	}

	.cit-search-mobile-open .cit-search-results {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		max-height: 100vh;
		border-radius: 0;
		border: 0;
		box-shadow: none;
		padding-top: 8px;
	}
}
