/*
 * NEMRA dropdown — shared custom-select component (mobile filter pattern,
 * news comp 797:22700). Trigger renders the white 46px pill; the open panel
 * is ours (white card, Poppins, blue active row) instead of the browser's
 * native popup. Markup comes from nemra_blocks_dropdown(); behavior from
 * assets/js/dropdown.js. Visibility (e.g. mobile-only) is the embedding
 * widget's job — the component itself renders wherever it's placed.
 */

.nemra-dropdown {
	position: relative;
	font-family: var(--nemra-font-body, 'Poppins', system-ui, sans-serif);
	font-size: 14px;
	line-height: 1.6;
	color: var(--nemra-dark, #17171a);
}

.nemra-dropdown *,
.nemra-dropdown *::before,
.nemra-dropdown *::after { box-sizing: border-box; }

/* Trigger pill — the Filter-Dropdown master (news 797:22700, events
 * I797:23302;545:16481) draws radius 8 and the whole "Filter by: …" line
 * at 64% dark; only the caret stays full dark. */
.nemra-dropdown__trigger {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 8px;
	background: var(--nemra-light, #fcfdfd);
	font: inherit;
	color: rgba(23, 23, 26, 0.64);
	text-align: left;
	cursor: pointer;
	outline: none;
}

.nemra-dropdown__trigger:focus-visible {
	outline: 2px solid var(--nemra-blue, #2173b3);
	outline-offset: 2px;
}

.nemra-dropdown__label {
	flex-shrink: 0;
}

.nemra-dropdown__value {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nemra-dropdown__caret {
	flex-shrink: 0;
	color: var(--nemra-dark, #17171a);
	transition: transform 0.2s ease;
}

.nemra-dropdown.is-open .nemra-dropdown__caret {
	transform: rotate(180deg);
}

/* Open panel */
.nemra-dropdown__list {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 40;
	display: none;
	margin: 0;
	padding: 8px;
	list-style: none;
	background: var(--nemra-light, #fcfdfd);
	border: 1px solid rgba(23, 23, 26, 0.08);
	border-radius: 5px;
	box-shadow: 0 12px 32px rgba(23, 23, 26, 0.16);
	max-height: 320px;
	overflow-y: auto;
}

.nemra-dropdown.is-open .nemra-dropdown__list {
	display: block;
}

.nemra-dropdown__item {
	margin: 0;
	padding: 0;
}

.nemra-dropdown__option {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
	outline: none;
}

.nemra-dropdown__option:hover {
	background: rgba(23, 23, 26, 0.06);
}

.nemra-dropdown__option:focus-visible {
	outline: 2px solid var(--nemra-blue, #2173b3);
	outline-offset: -2px;
}

/* Active row mirrors the topic pills' selected state: blue fill, white text. */
.nemra-dropdown__option.is-selected {
	background: var(--nemra-blue, #2173b3);
	color: #ffffff;
}
