/*
 * The Add trips dialog on the featured trips page (templates/admin/home/featured.html),
 * on the dialog styles in admin-forms.css.
 */
.eb-picker {
	max-width: 560px;
}

.eb-picker-search {
	border: 1px solid var(--color-base-200);
	border-radius: 0.5rem;
	height: 40px;
	margin: 0.75rem 0;
	padding: 0 0.875rem;
	width: 100%;
}

.eb-picker-list {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	max-height: 50vh;
	overflow-y: auto;
}

.eb-picker-item {
	align-items: center;
	border-radius: 0.5rem;
	cursor: pointer;
	display: flex;
	gap: 0.75rem;
	padding: 0.5rem 0.625rem;
}

.eb-picker-item:hover,
.eb-picker-item:has(input:checked) {
	background: var(--color-base-100);
}

.eb-picker-item input {
	accent-color: var(--color-primary-600);
	flex: none;
	height: 1.125rem;
	width: 1.125rem;
}

.eb-picker-item img,
.eb-picker-thumb {
	background: var(--color-base-100);
	border-radius: 0.375rem;
	flex: none;
	height: 40px;
	object-fit: cover;
	width: 60px;
}

.eb-picker-name {
	color: var(--color-base-900);
	flex: 1;
	font-weight: 600;
}

.eb-picker-days {
	color: var(--color-base-500);
	font-size: 0.8125rem;
	white-space: nowrap;
}

.eb-dialog-add {
	background: var(--color-primary-600);
	color: #fff;
}

.dark .eb-picker-search {
	background: var(--color-base-900);
	border-color: var(--color-base-700);
}

.dark .eb-picker-item:hover,
.dark .eb-picker-item:has(input:checked) {
	background: var(--color-base-700);
}

.dark .eb-picker-name {
	color: var(--color-base-100);
}

/* An icon drawn from its SVG as a mask, so it takes the text colour in light and dark themes. */
.eb-icon {
	background-color: currentColor;
	display: inline-block;
	flex: none;
	height: 24px;
	mask: var(--icon) center / contain no-repeat;
	width: 24px;
}

.eb-icon-choice {
	align-items: center;
	background: #fff;
	border: 1px solid var(--color-base-200);
	border-radius: 0.5rem;
	color: var(--color-base-900);
	display: flex;
	gap: 0.625rem;
	height: 38px;
	padding: 0 0.75rem;
	width: 100%;
}

.eb-icon-choice > :nth-child(2) {
	flex: 1;
	overflow: hidden;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.eb-icon-choice:hover {
	background: var(--color-base-50);
}

.eb-icon-picker {
	max-width: 640px;
}

.eb-icon-grid {
	display: grid;
	gap: 0.375rem;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	margin-top: 0.75rem;
	max-height: 60vh;
	overflow-y: auto;
}

.eb-icon-option {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 0.625rem;
	color: var(--color-base-800);
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	padding: 0.75rem 0.25rem;
}

.eb-icon-option .eb-icon {
	height: 28px;
	width: 28px;
}

.eb-icon-option:hover {
	background: var(--color-base-100);
}

.eb-icon-option.eb-icon-chosen {
	background: var(--color-primary-50);
	border-color: var(--color-primary-600);
	color: var(--color-primary-700);
}

.eb-icon-option-name {
	font-size: 0.75rem;
	line-height: 1.2;
	text-align: center;
}

.dark .eb-icon-choice {
	background: var(--color-base-900);
	border-color: var(--color-base-700);
	color: var(--color-base-100);
}

.dark .eb-icon-option {
	color: var(--color-base-200);
}

.dark .eb-icon-option:hover {
	background: var(--color-base-700);
}
