/* Seletor de Colegas de Quarto — todos os seletores usam o prefixo .qsel */
.qsel,
.qsel *,
.qsel *::before,
.qsel *::after {
	box-sizing: border-box;
}

.qsel {
	--qsel-border: #c3c4c7;
	--qsel-focus: #2271b1;
	--qsel-muted: #6b7280;
	--qsel-bg: #fff;
	--qsel-hover: #eef4fb;
	--qsel-chip: #e8f0fe;
	--qsel-warn: #b32d2e;
	font-family: inherit;
	font-size: inherit;
	line-height: 1.4;
	width: 100%;
	margin: 0 0 16px;
}

.qsel-slot {
	position: relative;
	margin: 0 0 14px;
}

.qsel-label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
}

.qsel-box {
	position: relative;
}

.qsel-input {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--qsel-border);
	border-radius: 6px;
	background: var(--qsel-bg);
	color: inherit;
	font: inherit;
}

.qsel-input:focus {
	outline: 2px solid var(--qsel-focus);
	outline-offset: 0;
	border-color: var(--qsel-focus);
}

.qsel-input:disabled {
	opacity: 0.6;
	cursor: wait;
}

.qsel-list {
	position: absolute;
	z-index: 50;
	left: 0;
	right: 0;
	top: 100%;
	margin: 4px 0 0;
	padding: 4px 0;
	max-height: 260px;
	overflow-y: auto;
	list-style: none;
	background: var(--qsel-bg);
	border: 1px solid var(--qsel-border);
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.qsel-list[hidden] {
	display: none;
}

.qsel-opt {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 9px 12px;
	cursor: pointer;
	list-style: none;
}

.qsel-opt::before {
	content: none;
}

.qsel-opt--active {
	background: var(--qsel-hover);
}

.qsel-opt--disabled {
	cursor: not-allowed;
	color: var(--qsel-muted);
	background: transparent;
}

.qsel-opt--disabled .qsel-opt-name {
	text-decoration: line-through;
	text-decoration-color: rgba(107, 114, 128, 0.5);
}

.qsel-opt-tag {
	flex: none;
	font-size: 0.8em;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f0f0f1;
	color: var(--qsel-muted);
	white-space: nowrap;
}

.qsel-empty {
	padding: 10px 12px;
	color: var(--qsel-muted);
	list-style: none;
}

.qsel-chip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 44px;
	padding: 8px 8px 8px 12px;
	border: 1px solid var(--qsel-border);
	border-radius: 6px;
	background: var(--qsel-chip);
}

.qsel-chip[hidden] {
	display: none;
}

.qsel-chip-text {
	font-weight: 600;
	word-break: break-word;
}

.qsel-chip-remove {
	flex: none;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.08);
	color: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.qsel-chip-remove:hover,
.qsel-chip-remove:focus {
	background: rgba(0, 0, 0, 0.16);
}

.qsel-msg {
	min-height: 1.4em;
	font-size: 0.92em;
	color: var(--qsel-muted);
}

.qsel-msg--error {
	color: var(--qsel-warn);
	font-weight: 600;
}

.qsel-notice {
	padding: 10px 12px;
	border: 1px dashed var(--qsel-warn);
	border-radius: 6px;
	color: var(--qsel-warn);
	font-size: 0.92em;
}

.qsel-debug {
	margin: 10px 0 0;
	padding: 10px 12px;
	max-height: 260px;
	overflow: auto;
	background: #1e1e1e;
	color: #d4d4d4;
	border-radius: 6px;
	font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	white-space: pre-wrap;
	word-break: break-word;
}

/* Campos de texto do Bit Form preenchidos pelo seletor */
.qsel-bridge-field {
	cursor: default;
}
