/**
 * The resource picker.
 *
 * Loaded by the public booking form and by the admin calendar's panel, because
 * both render the same markup. Sizes are relative so the same list sits happily
 * in a page and in a narrow drawer.
 */

.irb-picker {
	--irb-picker-line: #d7dbe0;
	--irb-picker-muted: #5c6670;
	--irb-picker-link: #2271b1;

	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

/*
 * A rule between groups rather than indentation. A heading reads as a category;
 * indentation reads as a tree and raises a question nobody booking a room needs
 * to think about.
 */
.irb-picker__group + .irb-picker__group {
	margin-top: 0.7rem;
	padding-top: 0.7rem;
	border-top: 1px solid var(--irb-picker-line);
}

.irb-picker__group-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem;
	margin: 0 0 0.35rem;
}

.irb-picker__group-title {
	font-weight: 600;
}

.irb-picker__select-group {
	padding: 0;
	background: none;
	border: 0;
	color: var(--irb-picker-link);
	font-size: 0.85rem;
	text-decoration: underline;
	cursor: pointer;
}

.irb-picker__item {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0.2rem 0;
	cursor: pointer;
	line-height: 1.4;
}

.irb-picker__swatch {
	display: inline-block;
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 2px;
	/* A border so a pale colour is still visible against a white background. */
	border: 1px solid rgba(0, 0, 0, 0.25);
	flex: 0 0 auto;
}

.irb-picker__capacity {
	color: var(--irb-picker-muted);
	font-size: 0.85rem;
}

.irb-picker :is(input, button):focus-visible {
	outline: 2px solid var(--irb-picker-link);
	outline-offset: 2px;
}
