/* =============================================================================
   Association Finder Widget — blaek-af
   ============================================================================= */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.blaek-af {
	font-size: 1rem;
	line-height: 1.5;
}

/* ── Heading ─────────────────────────────────────────────────────────────── */
.blaek-af__heading {
	margin-top: 0;
	margin-bottom: 32px;
}

/* ── Search area ─────────────────────────────────────────────────────────── */
.blaek-af__search {
	margin-bottom: 2rem;
}

/* Text input row */
.blaek-af__input-row {
	display: flex;
	align-items: stretch;
	box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1);
}

.blaek-af__text-input {
	flex: 1 1 auto;
	height: 68px;
	padding: 0.65rem 20px !important;
	font-size: 1rem;
	border: 1px solid rgba(110, 120, 130, 1) !important;
	border-right: none !important;
	border-radius: 0 !important;
	outline: none;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(30px);
	-webkit-backdrop-filter: blur(30px);
	color: inherit;
	transition: border-color 0.15s;
}

.blaek-af__text-input:focus {
	border-color: var(--e-global-color-f733163, #0F7DC8);
}

.blaek-af__search-btn {
	flex: 0 0 68px;
	width: 68px;
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: var(--e-global-color-f733163, #0F7DC8);
	color: #fff;
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition: background 0.15s;
}

.blaek-af__search-btn:hover,
.blaek-af__search-btn:focus {
	background: #00508a;
	outline: none;
}

.blaek-af__search-btn svg {
	width: 30px;
	height: 30px;
}

/* "oder" separator */
.blaek-af__or {
	display: block;
	margin: 16px 0;
	color: #666;
	font-size: 0.9rem;
}

/* Dropdowns */
.blaek-af__dropdowns {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.blaek-af__select-wrap {
	position: relative;
}

/* The native <select> is hidden — Select2 renders its own element */
.blaek-af__select {
	width: 100%;
}

/* ── Select2 overrides ───────────────────────────────────────────────────── */
.blaek-af .select2-container {
	width: 100% !important;
}

.blaek-af .select2-container--default .select2-selection--single {
	min-height: 68px;
	display: flex;
	align-items: center;
	padding: 0.65rem 20px 0.65rem 20px;
	border: 1px solid #d0d0d0;
	border-radius: 0;
	font-size: 1rem;
	line-height: 1.5;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1);
	transition: border-color 0.15s;
}

.blaek-af .select2-container--default.select2-container--open .select2-selection--single,
.blaek-af .select2-container--default.select2-container--focus .select2-selection--single {
	border-color: var(--e-global-color-f733163, #0F7DC8);
	outline: none;
}

.blaek-af .select2-container--default .select2-selection--single .select2-selection__rendered {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
	color: var(--e-global-color-f733163, #0F7DC8);
	line-height: inherit;
	font-weight: 400;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.blaek-af .select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: var(--e-global-color-97e2714, #085A9C);
}

/* Custom chevron — hide the default Select2 triangle, draw a CSS V */
.blaek-af .select2-container--default .select2-selection--single .select2-selection__arrow {
	top: 50%;
	right: 1rem;
	transform: translateY(-50%);
	height: auto;
	width: 16px;
}

.blaek-af .select2-container--default .select2-selection--single .select2-selection__arrow b {
	display: none;
}

.blaek-af .select2-container--default .select2-selection--single .select2-selection__arrow::after {
	content: '';
	display: block;
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--e-global-color-f733163, #0F7DC8);
	border-bottom: 2px solid var(--e-global-color-f733163, #0F7DC8);
	transform: rotate(45deg) translateY(-3px);
}

.blaek-af .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow::after {
	transform: rotate(-135deg) translateY(-3px);
}

.blaek-af .select2-container--default .select2-selection--single .select2-selection__clear {
	position: static;
	display: inline-flex;
	align-items: center;
	align-self: center;
	flex-shrink: 0;
	order: -1;
	margin-right: 0.5rem;
	color: var(--e-global-color-f733163, #0F7DC8);
	font-size: 1.1rem;
	padding-left: 0;
	line-height: 1;
	height: auto;
}

.blaek-af .select2-dropdown {
	border: 1px solid #d0d0d0;
	border-top: none;
	border-radius: 0;
	font-size: 1rem;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.blaek-af .select2-container--default .select2-search--dropdown .select2-search__field {
	padding: 0.5rem 0.75rem;
	border: 1px solid #d0d0d0;
	border-radius: 0;
	font-size: 0.95rem;
}

.blaek-af .select2-container--default .select2-results__option {
	padding: 0.6rem 1rem;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
}

.blaek-af .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: var(--e-global-color-f733163, #0F7DC8);
	color: #fff;
}

/* Reset row — flex wrapper that pushes the link to the right */
.blaek-af__reset-row {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
}

/* Reset link */
.blaek-af__reset {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.9rem;
	color: var(--e-global-color-f733163, #0F7DC8);
	text-decoration: none;
	cursor: pointer;
}

.blaek-af__reset:hover {
	text-decoration: none;
}

.blaek-af__reset-icon {
	flex-shrink: 0;
	display: inline-block;
	vertical-align: middle;
	position: relative;
	bottom: -1.5px;
}

/* ── Results wrapper + loader ────────────────────────────────────────────── */
.blaek-af__results-wrap {
	position: relative;
	min-height: 60px;
}

/* Loader overlay */
.blaek-af__loader {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	position: absolute;
	inset: 0;
	z-index: 10;
	background: rgba(255, 255, 255, 0.75);
	backdrop-filter: blur(2px);
	border-radius: 4px;
}

.blaek-af__results-wrap.is-loading .blaek-af__loader {
	display: flex;
}

.blaek-af__results-wrap.is-loading .blaek-af__results {
	opacity: 0.35;
	pointer-events: none;
	transition: opacity 0.15s;
}

/* Spinner ring */
.blaek-af__loader-spinner {
	display: inline-block;
	width: 24px;
	height: 24px;
	border: 3px solid #d0d0d0;
	border-top-color: var(--e-global-color-f733163, #0F7DC8);
	border-radius: 50%;
	animation: blaek-af-spin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes blaek-af-spin {
	to {
		transform: rotate(360deg);
	}
}

.blaek-af__loader-text {
	font-size: 0.9rem;
	color: #555;
}

/* ── Results ─────────────────────────────────────────────────────────────── */
.blaek-af__results {
	transition: opacity 0.15s;
}

/* No-results message */
.blaek-af__no-results,
.blaek-af__empty {
	padding: 1rem 0;
	color: #666;
	font-style: italic;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.blaek-af__card {
	padding: 60px 0;
	border-bottom: 1px solid #979797;
}

.blaek-af__card-name {
	font-size: 1.05rem;
	font-weight: 700;
	margin-top: 0;
	margin-bottom: 32px;
}

/* Two-column layout: contact | roles */
.blaek-af__card-body {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 60px;
}

/* All descendants inherit color + typography set on the card body */
.blaek-af__card-body * {
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
}

.blaek-af__card-body a {
	font-family: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	line-height: inherit !important;
	letter-spacing: inherit !important;
}

/* ── Contact column ──────────────────────────────────────────────────────── */
.blaek-af__address {
	font-style: normal;
	margin-bottom: 16px;
}

.blaek-af__field {
	margin: 0 0 16px;
}

.blaek-af__field:last-child{
	margin-bottom: 0;
}

.blaek-af__label {
	margin-right: 0.25rem;
}

.blaek-af__field a {
	color: var(--e-global-color-f733163, #0F7DC8);
	text-decoration: none;
}

.blaek-af__field a:hover {
	text-decoration: underline;
}

/* Office hours may span multiple lines */
.blaek-af__field--hours .blaek-af__label {
	display: block;
}

/* ── Roles column ────────────────────────────────────────────────────────── */
.blaek-af__roles {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.blaek-af__role-block {
	/* stack label above persons */
}

.blaek-af__role-label {
	display: block;
	margin-bottom: 0.15rem;
}

.blaek-af__role-persons span {
	display: block;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.blaek-af__pagination {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	margin-top: 40px;
	font-size: 0.9375rem;
	color: #1f2937;
}

.blaek-af__pagination-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: none;
	background-color: transparent;
	border: none;
	border-radius: 4px;
	color: #1f2937;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.blaek-af__pagination-btn svg {
	transition: color 0.2s ease;
}

.blaek-af__pagination-btn:hover:not(:disabled) {
	color: var(--e-global-color-f733163, #0F7DC8);
}

.blaek-af__pagination-btn:hover,
.blaek-af__pagination-btn:focus{
	background-color: transparent !important;
	outline: none !important;
}

.blaek-af__pagination-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* Prev arrow faces left, next arrow faces right */
.blaek-af__pagination-btn--prev svg {
	transform: rotate(180deg);
}

.blaek-af__pagination-info {
	user-select: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
	.blaek-af__card-body {
		grid-template-columns: 1fr;
		gap: 32px;
	}
}