/* =============================================================================
   NPX Staff Directory — Frontend Styles (minimal)
   The client is expected to style the cards/layout to match their theme.
   This file only provides the structural minimum so the shortcode renders
   correctly without any theme styles applied.
   ============================================================================= */

/* ── Filters — outer row ─────────────────────────────────────────────────── */

.npx-staff-filters {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}

.npx-filters-left {
	width: calc((100% - 1rem) / 2);
}

.npx-filters-right {
	width: calc((100% - 1rem) / 2);
}

/* ── Custom multi-select dropdown ────────────────────────────────────────── */

.npx-dept-select {
	position: relative;
	display: inline-block;
	width: 100%;
}

.npx-dept-select__trigger {
	display: inline-flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 2px solid #e6e6e6;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.4;
	white-space: nowrap;
	transition: border-color 0.15s;
	width: 100%;
	height: 2.5rem !important;
}

.npx-dept-select__trigger:hover,
.npx-dept-select__trigger[aria-expanded="true"] {
	border-color: #888;
}

.npx-dept-select__trigger::after {
	content: '';
	display: inline-block;
	flex-shrink: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.2s;
}

.npx-dept-select__trigger[aria-expanded="true"]::after {
	transform: rotate( 180deg );
}

/* Dropdown panel */
.npx-dept-select__dropdown {
	display: none;
	position: absolute;
	top: calc( 100% + 4px );
	left: 0;
	z-index: 200;
	min-width: 100%;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 4px 14px rgba( 0, 0, 0, 0.1 );
	padding: 4px 0;
}

.npx-dept-select__dropdown.is-open {
	display: block;
}

/* Individual checkbox rows */
.npx-dept-option {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.4;
	white-space: nowrap;
	transition: background-color 0.12s;
}

.npx-dept-option:hover {
	background-color: #f5f5f5;
}

.npx-dept-option input[type="checkbox"] {
	position: absolute !important;
	opacity: 0 !important;
	width: 0 !important;
	height: 0 !important;
	pointer-events: none !important;
	margin: 0 !important;
}

.npx-dept-option span {
	position: relative;
	padding-left: 26px;
	cursor: pointer;
}

.npx-dept-option span::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY( -50% );
	width: 16px;
	height: 16px;
	border: 2px solid #bbb;
	border-radius: 3px;
	background: #fff;
	transition: background-color 0.15s, border-color 0.15s;
}

/* Checkmark */
.npx-dept-option span::after {
	content: '';
	position: absolute;
	left: 8px;
	top: calc(50% - 2px);
	transform: translateY( -65% ) rotate( 45deg );
	width: 8px;
	height: 16px;
	border: 3px solid #bb3033;
	border-top: none;
	border-left: none;
	opacity: 0;
	transition: opacity 0.1s;
}

/* Checked state */
.npx-dept-option input[type="checkbox"]:checked + span::before {
	background-color: #fff;
	border-color: #333;
}

.npx-dept-option input[type="checkbox"]:checked + span::after {
	opacity: 1;
}

/* Keyboard focus ring */
.npx-dept-option input[type="checkbox"]:focus-visible + span::before {
	outline: 2px solid #005fcc;
	outline-offset: 2px;
}

/* "All Departments" separator row */
.npx-dept-option--all {
	font-weight: 600;
	border-bottom: 1px solid #eee;
	margin-bottom: 4px;
	padding-bottom: 10px;
}

/* ── Search input ─────────────────────────────────────────────────────────── */

.npx-staff-search {
	width: 100%;
	padding: 8px 12px;
	border: 2px solid #e6e6e6;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.4;
	transition: border-color 0.15s;
	margin-bottom: 0 !important;
	height: 2.5rem !important;
}

.npx-staff-search:focus {
	outline: none;
	border-color: #888;
}

/* ── Selected-department pills ───────────────────────────────────────── */

.npx-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	flex: 0 0 100%;   /* forces pills onto their own row */
	margin-top: 4px;  /* breathing room below the trigger/search row */
}

.npx-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px 3px 10px;
	border-radius: 20px;
	border: 1px solid #ccc;
	background: #f0f0f0;
	font-size: 13px;
	line-height: 1.4;
	white-space: nowrap;
}

.npx-filter-pill__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	padding: 0;
	margin-left: 2px;
	border: none;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	color: inherit;
	transition: background-color 0.12s;
}

.npx-filter-pill__remove:hover {
	background-color: #d0d0d0;
}

/* ── Page template structure ─────────────────────────────────────────────── */

.npx-staff-hero {
	width: 100%;
	height: calc(200px + 200 * ((100vw - 320px)/ 780));
	max-height: 31.25rem;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
}

.npx-staff-main {

	& .container {
		max-width: 75rem;
		margin: 0 auto;
	}
}

.npx-staff-page-title {
	background: #bb3033;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
	padding-top: 1rem;
	padding-bottom: 0.25rem;

	& .entry-title {
		color: #fefefe;
		margin: 0;
	}
}

.npx-staff-page-intro {
	background: url(../images/pattern.jpg) repeat;
	padding-bottom: 3.75rem;
	padding-top: 3.75rem;

	& p {
		font-size: 1.25rem;
		line-height: 1.6;
		text-rendering: optimizeLegibility;
		margin: 0;
		text-align: center;
	}
}

.npx-staff-directory-section {
	padding: 3.75rem 1.5rem;

	& .container {
		max-width: 75rem;
		margin: 0 auto;
	}
}

/* ── Directory / Department sections ─────────────────────────────────────── */

.npx-staff-directory {
	margin-top: 8px;
}

.npx-staff-dept-section {
	margin: 3rem 0;
}

.npx-dept-heading {
	margin-bottom: 20px;
}

/* ── Staff list grid ─────────────────────────────────────────────────────── */

.npx-staff-list {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 200px, 1fr ) );
	gap: 1.5rem;
}

/* ── Staff card ──────────────────────────────────────────────────────────── */

.npx-staff-card {
	/* No decorative styling — let the theme handle it. */
}

.npx-staff-card.has-tag {
	/* Tagged staff cards — optionally style in the theme. */
}

.npx-staff-photo {
	margin-bottom: 10px;
	aspect-ratio: 1;
	overflow: hidden;
}

.npx-staff-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.npx-staff-name {
	font-size: 1rem;
	margin: 0 0 4px;
}

.npx-staff-job-title {
	font-size: 0.875rem;
	margin: 0 0 6px;
}

.npx-manager-badge {
	display: inline-block;
	font-size: 0.75rem;
	padding: 2px 8px;
	border-radius: 3px;
	color: #fff;
	margin-bottom: 8px;
}

.npx-manager-badge[data-tag="department-manager"] {
	background: #696969;
}

.npx-manager-badge[data-tag="executive"] {
	background: #B50000;
}

.npx-manager-badge[data-tag="lead"] {
	background: #9D9D9D;
}

.npx-staff-bio {
	font-size: 0.875rem;
	margin-top: 8px;
}

.npx-staff-bio p {
	margin: 0 0 6px;
}

/* ── Hidden state ────────────────────────────────────────────────────────── */

.npx-staff-card[hidden],
.npx-staff-dept-section[hidden] {
	display: none !important;
}
