/* Search bar + search results — isolated from main styles.css */

#pb_header .pb-header-container {
	gap: 12px;
}

#pb_header .pb-search-wrap {
	flex: 1 1 auto;
	width: 100%;
	max-width: 640px;
	min-width: 180px;
}

#pb_header .pb-search-form {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 100%;
	background: #fff;
	border: 1px solid #e8edf2 !important;
	border-radius: 999px;
	padding: 10px 16px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

#pb_header .pb-search-form #pb-search-input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	border: none;
	background: transparent;
	outline: none;
	font-size: 0.95rem;
	color: #1e293b;
}

#pb_header .pb-search-form .search_icon {
	flex-shrink: 0;
	font-size: 0.82rem;
	font-weight: 600;
	color: #00A6FF;
	background: rgba(0, 166, 255, 0.1);
	border: none;
	border-radius: 999px;
	padding: 6px 14px !important;
	line-height: 1.2;
}

#pb_header .pb-search-form .search_icon:hover {
	background: rgba(0, 166, 255, 0.18);
	color: #0088cc;
}

.pb-search-form__icon {
	color: #94a3b8;
	font-size: 0.9rem;
	flex-shrink: 0;
}

.pb-search-wrap {
	position: relative;
}

.pb-search-wrap--mobile {
	max-width: 100%;
}

.pb-search-mobile__group {
	border-radius: 999px;
	overflow: hidden;
	border: 1px solid #e8edf2;
	background: #fff;
}

.pb-search-mobile__icon {
	background: transparent;
	border: none;
	color: #94a3b8;
}

.pb-search-suggestions {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #e8edf2;
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
	z-index: 1200;
	max-height: 420px;
	overflow-y: auto;
	padding: 8px 0;
}

.pb-search-suggestions__group + .pb-search-suggestions__group {
	border-top: 1px solid #f1f5f9;
	margin-top: 4px;
	padding-top: 4px;
}

.pb-search-suggestions__label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #94a3b8;
	padding: 8px 16px 4px;
}

.pb-search-suggestions__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	text-decoration: none;
	color: inherit;
}

.pb-search-suggestions__item:hover,
.pb-search-suggestions__item.is-active {
	background: #f8fafc;
}

.pb-search-suggestions__thumb {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	overflow: hidden;
	flex-shrink: 0;
	background: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pb-search-suggestions__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pb-search-suggestions__title {
	display: block;
	font-size: 0.92rem;
	font-weight: 600;
	color: #1e293b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pb-search-suggestions__title mark {
	background: rgba(0, 166, 255, 0.14);
	color: inherit;
	padding: 0 2px;
	border-radius: 3px;
}

.pb-search-suggestions__subtitle {
	display: block;
	font-size: 0.78rem;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
}

.pb-search-suggestions__footer,
.pb-search-suggestions__empty {
	display: block;
	padding: 12px 16px;
	font-size: 0.84rem;
	color: #00A6FF;
	text-decoration: none;
	border-top: 1px solid #f1f5f9;
}

/* Search results page */
.pb-search-page {
	padding-bottom: 1rem;
}

.pb-search-page__query {
	margin-bottom: 1.25rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: #1a1a2e;
}

.pb-search-page__query span {
	color: #00A6FF;
}

.pb-search-page .pb-card-list {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -8px -16px;
}

.pb-search-page .pb-card-list__item {
	padding: 0 8px;
	margin-bottom: 16px;
	flex: 0 0 50%;
	max-width: 50%;
}

.pb-search-page .pb-card.pb-card--home .pb-card__image img {
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: 8px;
}

.pb-search-page .pb-card--avatar {
	text-align: center;
	padding: 12px;
}

.pb-search-page .pb-card--avatar .pb-card__image {
	width: 100%;
	max-width: 170px;
	height: 150px;
	object-fit: cover;
	border-radius: 10px;
	margin: 0 auto 10px;
	display: block;
}

.pb-search-page .nav-tabs {
	border-bottom: 1px solid #e8edf2;
}

.pb-search-page .nav-tabs .nav-link {
	font-weight: 600;
	color: #64748b;
}

.pb-search-page .nav-tabs .nav-link.active {
	color: #00A6FF;
	border-color: #e8edf2 #e8edf2 #fff;
}

@media (min-width: 480px) {
	.pb-search-page .pb-card-list__item {
		flex: 0 0 33.3333333%;
		max-width: 33.3333333%;
	}
}

@media (min-width: 768px) {
	.pb-search-page .pb-card-list__item {
		flex: 0 0 25%;
		max-width: 25%;
	}
}

@media (min-width: 992px) {
	.pb-search-page .pb-card-list__item {
		flex: 0 0 20%;
		max-width: 20%;
	}
}

.pb-theme-dark #pb_header .pb-search-form {
	background: #181c21;
	border-color: #2c3138 !important;
}

.pb-theme-dark #pb_header .pb-search-form #pb-search-input {
	color: #e5e7eb;
}

.pb-theme-dark .pb-search-suggestions {
	background: #181c21;
	border-color: #2c3138;
}

.pb-theme-dark .pb-search-suggestions__item:hover,
.pb-theme-dark .pb-search-suggestions__item.is-active {
	background: #1f242b;
}

.pb-theme-dark .pb-search-page__query {
	color: #f8fafc;
}
