/**
 * Roles dropdown — see assets/js/components/roles-dropdown.js.
 * Only applies once the script has added .nw-rd to the field, so without
 * JS the field keeps its pill look.
 *
 * Selectors repeat .nw-rd to outrank the pill rules (which use !important)
 * in page-staffing-solutions-lp.css.
 */

.nw-rd {
	position: relative;
	--nw-rd-accent: #27d6ff;
	--nw-rd-on-accent: #02172f;
	--nw-rd-panel: #13233a;
	--nw-rd-line: rgba(255, 255, 255, .16);
	--nw-rd-muted: #8a9ab0;
}

/* ── Trigger (looks like the Industry select) ─────────────────────────── */
.nw-rd.nw-rd .nw-rd__trigger {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px;
	width: 100% !important;
	max-width: none !important;
	min-height: 44px;
	margin: 0 !important;
	padding-right: 14px !important;
	box-sizing: border-box;
	color: var(--nw-rd-text, #e6edf7) !important;
	text-align: left;
	cursor: pointer;
	box-shadow: none !important;
	outline: none;
}

.nw-rd .nw-rd__value {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.nw-rd .nw-rd__trigger.is-empty .nw-rd__value {
	opacity: .6;
}

.nw-rd .nw-rd__chev {
	flex: none;
	transition: transform .15s ease;
}

.nw-rd.is-open .nw-rd__chev {
	transform: rotate(180deg);
	color: var(--nw-rd-accent);
}

.nw-rd.nw-rd .nw-rd__trigger:hover,
.nw-rd.is-open .nw-rd__trigger {
	border-color: var(--nw-rd-accent) !important;
}

.nw-rd.nw-rd .nw-rd__trigger:focus-visible {
	outline: 2px solid var(--nw-rd-accent) !important;
	outline-offset: 2px !important;
}

.nw-rd.gfield_error .nw-rd__trigger {
	border-color: rgba(248, 113, 113, .8) !important;
}

.nw-rd .nw-rd__count {
	margin-top: 6px;
	font-size: .75rem;
	color: var(--nw-rd-muted);
}

.nw-rd .nw-rd__count:empty {
	display: none;
}

/* ── Panel ────────────────────────────────────────────────────────────── */
.nw-rd.nw-rd .nw-rd__panel {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	z-index: 40;
	margin-top: 6px;
	padding: 6px 0 0;
	background: var(--nw-rd-panel);
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}

.nw-rd.is-open .nw-rd__panel {
	display: block;
}

.nw-rd.nw-rd .nw-rd__panel .gfield_checkbox {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
}

.nw-rd.nw-rd .nw-rd__panel .gchoice {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	position: relative;
}

/* Real checkbox stays focusable, drawn by the label */
.nw-rd.nw-rd .nw-rd__panel .gfield-choice-input {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	opacity: 0 !important;
	appearance: none !important;
}

.nw-rd.nw-rd .nw-rd__panel .gchoice > label {
	display: flex !important;
	align-items: center;
	gap: 12px;
	width: 100% !important;
	min-height: 44px !important;
	margin: 0 !important;
	padding: 8px 14px !important;
	box-sizing: border-box;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #ffffff !important;
	font-size: .9063rem !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	text-align: left !important;
	justify-content: flex-start !important;
	cursor: pointer;
}

.nw-rd.nw-rd .nw-rd__panel .gchoice > label::before {
	content: "" !important;
	display: block !important;
	position: static !important;
	flex: none;
	width: 20px;
	height: 20px;
	box-sizing: border-box;
	border: 1.5px solid rgba(255, 255, 255, .45);
	border-radius: 5px;
	background: transparent no-repeat center / 13px 13px;
	transform: none !important;
}

.nw-rd.nw-rd .nw-rd__panel .gchoice > label::after {
	content: none !important;
	display: none !important;
}

.nw-rd.nw-rd .nw-rd__panel .gchoice > label:hover {
	background: rgba(39, 214, 255, .06) !important;
}

.nw-rd.nw-rd .nw-rd__panel .gfield-choice-input:checked + label {
	background: rgba(39, 214, 255, .08) !important;
	color: #ffffff !important;
}

.nw-rd.nw-rd .nw-rd__panel .gfield-choice-input:checked + label::before {
	border-color: var(--nw-rd-accent);
	background-color: var(--nw-rd-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12l5 5L20 6' stroke='%2302172f' stroke-width='3.2' fill='none'/%3E%3C/svg%3E");
}

.nw-rd.nw-rd .nw-rd__panel .gfield-choice-input:focus-visible + label {
	outline: 2px solid var(--nw-rd-accent) !important;
	outline-offset: -2px !important;
}

.nw-rd .nw-rd__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 4px;
	padding: 10px 14px;
	border-top: 1px solid rgba(255, 255, 255, .1);
	font-size: .7813rem;
	color: var(--nw-rd-muted);
}

.nw-rd.nw-rd .nw-rd__done {
	min-height: 36px !important;
	width: auto !important;
	margin: 0 0 0 auto !important;
	padding: 0 18px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--nw-rd-accent) !important;
	color: var(--nw-rd-on-accent) !important;
	box-shadow: none !important;
	font-family: inherit !important;
	font-size: .875rem !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	cursor: pointer;
	outline: none;
}

.nw-rd.nw-rd .nw-rd__done:focus-visible {
	outline: 2px solid #ffffff !important;
	outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
	.nw-rd .nw-rd__chev { transition: none; }
}
