.cbbp-overlay {
	--cbbp-bg: var(--bg-card, #1c1e26);
	--cbbp-text: var(--text-main, #e6e8ef);
	--cbbp-muted: var(--text-muted, #a3a9bb);
	--cbbp-border: var(--border-color, #2f3341);
	--cbbp-accent: var(--primary, #4338ca);
	--cbbp-accent-hover: var(--primary-hover, #3730a3);
	--cbbp-row: var(--bg-input, rgba(255, 255, 255, 0.03));
	--cbbp-row-hover: rgba(99, 102, 241, 0.14);
	position: fixed;
	inset: 0;
	z-index: 20000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(8, 10, 16, 0.72);
	color: var(--cbbp-text);
	font-family: inherit;
}

html.cbbp-open, html.cbbp-open body {
	overflow: hidden;
}

.cbbp-card {
	width: 100%;
	max-width: 620px;
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	background: var(--cbbp-bg);
	border: 1px solid var(--cbbp-border);
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
	overflow: hidden;
}

.cbbp-head {
	padding: 22px 22px 14px;
	text-align: center;
	border-bottom: 1px solid var(--cbbp-border);
}

.cbbp-logo {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	margin-bottom: 10px;
}

.cbbp-title {
	margin: 0 0 6px;
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--cbbp-text);
}

.cbbp-sub {
	margin: 0;
	color: var(--cbbp-muted);
	font-size: 0.95rem;
}

.cbbp-search {
	display: block;
	width: 100%;
	margin-top: 14px;
	padding: 9px 12px;
	border-radius: 8px;
	border: 1px solid var(--cbbp-border);
	background: var(--cbbp-row);
	color: var(--cbbp-text);
	font-size: 0.95rem;
}

.cbbp-search:focus {
	outline: 2px solid var(--cbbp-accent);
	outline-offset: 1px;
}

.cbbp-msg {
	margin: 12px 18px 0;
	padding: 9px 12px;
	border-radius: 8px;
	background: rgba(220, 38, 38, 0.15);
	border: 1px solid rgba(220, 38, 38, 0.5);
	color: #fecaca;
	font-size: 0.9rem;
}

.cbbp-list {
	overflow-y: auto;
	padding: 10px 14px;
	flex: 1 1 auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.cbbp-list::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.cbbp-group + .cbbp-group {
	margin-top: 10px;
}

.cbbp-group-label {
	padding: 6px 6px 4px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--cbbp-muted);
}

.cbbp-item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 6px 0;
	padding: 10px 12px;
	text-align: start;
	background: var(--cbbp-row);
	color: var(--cbbp-text);
	border: 1px solid var(--cbbp-border);
	border-radius: 10px;
	cursor: pointer;
	font: inherit;
}

.cbbp-item[hidden] {
	display: none;
}

.cbbp-item:hover:not(:disabled), .cbbp-item:focus-visible {
	background: var(--cbbp-row-hover);
	border-color: var(--cbbp-accent);
	outline: none;
}

.cbbp-item:disabled {
	cursor: default;
	opacity: 0.6;
}

.cbbp-item.cbbp-busy {
	opacity: 1;
	border-color: var(--cbbp-accent);
}

.cbbp-avatar {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
}

.cbbp-main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cbbp-name-row {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.cbbp-name {
	font-weight: 600;
	font-size: 1rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cbbp-badge {
	flex: 0 0 auto;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 600;
	background: rgba(148, 163, 184, 0.2);
	color: var(--cbbp-text);
}

.cbbp-badge-current {
	background: rgba(13, 148, 136, 0.3);
}

.cbbp-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	font-size: 0.82rem;
	color: var(--cbbp-muted);
}

.cbbp-chip {
	padding: 1px 8px;
	border-radius: 6px;
	border: 1px solid var(--cbbp-border);
	color: var(--cbbp-text);
}

.cbbp-go {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 8px;
	background: var(--cbbp-accent);
	color: #fff;
	font-weight: 600;
	font-size: 0.88rem;
}

.cbbp-item:hover:not(:disabled) .cbbp-go {
	background: var(--cbbp-accent-hover);
}

[dir="rtl"] .cbbp-go .fa-arrow-right {
	transform: scaleX(-1);
}

.cbbp-empty {
	padding: 18px;
	text-align: center;
	color: var(--cbbp-muted);
}

.cbbp-foot {
	padding: 12px 18px;
	border-top: 1px solid var(--cbbp-border);
	display: flex;
	justify-content: flex-end;
}

.cbbp-cancel {
	padding: 8px 18px;
	border-radius: 8px;
	border: 1px solid var(--cbbp-border);
	background: transparent;
	color: var(--cbbp-text);
	font: inherit;
	cursor: pointer;
}

.cbbp-cancel:hover:not(:disabled) {
	border-color: var(--cbbp-accent);
	background: var(--cbbp-row-hover);
}

.cbbp-switch-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-inline-end: 8px;
	padding: 3px 10px;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.08);
	color: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	white-space: nowrap;
}

.cbbp-switch-btn:hover, .cbbp-switch-btn:focus-visible {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 576px) {
	.cbbp-head {
		padding: 16px 14px 12px;
	}
	.cbbp-list {
		padding: 8px 10px;
	}
	.cbbp-go-text {
		display: none;
	}
	.cbbp-switch-label {
		display: none;
	}
}
