/**
 * Universal Tool Search styles – mobile-first, clean SaaS look.
 */

.bzt-search {
	position: relative;
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	font-family: var(--bz-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	z-index: 20;
}

.bzt-search__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	padding: 10px 14px;
	box-shadow: 0 4px 20px rgba(13, 110, 253, 0.12);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.bzt-search__bar:focus-within {
	border-color: var(--bz-primary, #0d6efd);
	box-shadow: 0 4px 24px rgba(13, 110, 253, 0.22);
}

.bzt-search__icon {
	display: flex;
	color: var(--bz-text-muted, #5c6773);
	flex-shrink: 0;
}

.bzt-search__input {
	flex: 1;
	border: 0;
	outline: none;
	background: transparent;
	font-size: 16px; /* prevents iOS zoom */
	line-height: 1.4;
	color: var(--bz-text, #1a1a2e);
	min-width: 0;
}

.bzt-search__input::placeholder {
	color: #9aa3af;
}

.bzt-search__clear {
	border: 0;
	background: #eef1f5;
	color: #5c6773;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bzt-search__clear:hover {
	background: #e2e6eb;
}

/* Popular / Recent chips */
.bzt-search__popular,
.bzt-search__recent {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.bzt-search__popular-label,
.bzt-search__recent-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: rgba(255, 255, 255, 0.85);
}

/* When search sits outside hero (white bg pages) */
.bz-categories .bzt-search__popular-label,
.bz-categories .bzt-search__recent-label,
.bzt-search--standalone .bzt-search__popular-label,
.bzt-search--standalone .bzt-search__recent-label {
	color: var(--bz-text-muted, #5c6773);
}

.bzt-search__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.bzt-search__chip {
	border: 0;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	font-size: 12px;
	padding: 6px 12px;
	border-radius: 999px;
	cursor: pointer;
	backdrop-filter: blur(6px);
	transition: background 0.15s ease;
	white-space: nowrap;
}

.bzt-search__chip:hover {
	background: rgba(255, 255, 255, 0.35);
}

.bzt-search--standalone .bzt-search__chip,
.bz-categories .bzt-search__chip {
	background: #eef2ff;
	color: var(--bz-primary, #0d6efd);
}

.bzt-search--standalone .bzt-search__chip:hover,
.bz-categories .bzt-search__chip:hover {
	background: #e0e7ff;
}

.bzt-search__chip--recent {
	opacity: 0.9;
}

/* Results dropdown */
.bzt-search__results {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	max-height: min(420px, 60vh);
	overflow-y: auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
	border: 1px solid rgba(0, 0, 0, 0.06);
	padding: 6px;
	z-index: 30;
}

.bzt-search__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px;
	border-radius: 10px;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	transition: background 0.12s ease;
}

.bzt-search__item:hover,
.bzt-search__item.is-active {
	background: #f0f5ff;
}

.bzt-search__item.is-disabled {
	opacity: 0.65;
	cursor: default;
}

.bzt-search__item-icon {
	font-size: 22px;
	line-height: 1;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	border-radius: 10px;
}

.bzt-search__item-body {
	flex: 1;
	min-width: 0;
}

.bzt-search__item-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.bzt-search__item-title {
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
}

.bzt-search__item-cat {
	display: inline-block;
	font-size: 11px;
	color: #64748b;
	margin-top: 2px;
}

.bzt-search__item-desc {
	margin: 4px 0 0;
	font-size: 12px;
	color: #64748b;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bzt-search__item-cta {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--bz-primary, #0d6efd);
	padding: 6px 10px;
	border-radius: 8px;
	background: #eff6ff;
	align-self: center;
	white-space: nowrap;
}

.bzt-search__badge {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 2px 7px;
	border-radius: 6px;
}

.bzt-search__badge--popular {
	background: #fef3c7;
	color: #b45309;
}

.bzt-search__badge--new {
	background: #dcfce7;
	color: #15803d;
}

.bzt-search__badge--soon {
	background: #e2e8f0;
	color: #475569;
}

/* Empty state */
.bzt-search__empty {
	margin-top: 16px;
	background: #fff;
	border-radius: 14px;
	padding: 20px 16px;
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1);
	text-align: center;
}

.bzt-search__empty-msg {
	font-size: 16px;
	font-weight: 600;
	color: #0f172a;
	margin: 0 0 4px;
}

.bzt-search__empty-hint {
	font-size: 13px;
	color: #64748b;
	margin: 0 0 16px;
}

.bzt-search__suggested-title {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
	margin: 0 0 10px;
	text-align: left;
}

.bzt-search__suggested-grid {
	text-align: left;
}

.bzt-search__suggested-grid .bzt-search__item {
	border: 1px solid #eef2f7;
	margin-bottom: 6px;
}

/* Homepage hero placement */
.bz-hero .bzt-search {
	margin-top: 28px;
	margin-bottom: 8px;
}

/* Standalone shortcode spacing */
.bzt-search--standalone {
	margin: 24px auto;
	padding: 0 16px;
}

@media (max-width: 480px) {
	.bzt-search__item-cta {
		display: none;
	}
	.bzt-search__results {
		max-height: 55vh;
	}
}
