
/* Resource directory stabilization and state language. */
.bf-directory select,
[class*="bf-"][class*="directory"] select,
[data-bf-directory] select {
	-webkit-appearance: none;
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, #0b3b69 50%),
		linear-gradient(135deg, #0b3b69 50%, transparent 50%);
	background-position:
		calc(100% - 16px) 50%,
		calc(100% - 11px) 50%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 36px !important;
}

.bf-filter-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 18px;
	margin-left: auto;
}
.bf-filter-actions [data-bf-result-count] {
	font-weight: 700;
	white-space: nowrap;
	order: 2;
}
.bf-filter-actions button,
.bf-filter-actions .button {
	order: 1;
}

.bf-status-pill,
.bf-grant-status-pill,
.bf-pill--status {
	display: inline-flex !important;
	align-self: flex-start;
	width: auto !important;
	max-width: max-content;
}
.bf-pill-state--open { background: #e6f2d8 !important; color: #315f1d !important; }
.bf-pill-state--alert { background: #dfeefc !important; color: #0b4f85 !important; }
.bf-pill-state--upcoming { background: #faecd4 !important; color: #7a4808 !important; }
.bf-pill-state--historical { background: #eceff2 !important; color: #475467 !important; }

.bf-actions-enhanced {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.bf-action-toggle {
	--bf-action-border: #9aa4b2;
	--bf-action-text: #344054;
	--bf-action-bg: #f2f4f7;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	border: 1px solid var(--bf-action-border) !important;
	border-radius: 8px;
	background: var(--bf-action-bg) !important;
	color: var(--bf-action-text) !important;
	font-weight: 700;
	text-decoration: none !important;
	transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.bf-action-toggle::before {
	content: "";
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	background: currentColor;
	-webkit-mask: center / contain no-repeat url("../icons/square-regular-full.svg");
	mask: center / contain no-repeat url("../icons/square-regular-full.svg");
}
.bf-action-toggle:focus-visible {
	outline: 3px solid rgba(9, 105, 218, .28);
	outline-offset: 2px;
}
.bf-action-toggle--save:not(.is-saved):hover,
.bf-action-toggle--save:not(.is-saved):focus-visible {
	--bf-action-border: #0b63b6;
	--bf-action-text: #073f70;
	--bf-action-bg: #eaf4ff;
}
.bf-action-toggle--save.is-saved {
	--bf-action-border: #39851f;
	--bf-action-text: #285f14;
	--bf-action-bg: #e6f4d7;
}
.bf-action-toggle--save.is-saved::before {
	-webkit-mask-image: url("../icons/square-check-solid-full.svg");
	mask-image: url("../icons/square-check-solid-full.svg");
}
.bf-action-toggle--save.is-saved:hover,
.bf-action-toggle--save.is-saved:focus-visible {
	--bf-action-border: #b42318;
	--bf-action-text: #9b1c1c;
	--bf-action-bg: #fff1f0;
}
.bf-action-toggle--save.is-saved:hover::before,
.bf-action-toggle--save.is-saved:focus-visible::before {
	-webkit-mask-image: url("../icons/square-minus-solid-full.svg");
	mask-image: url("../icons/square-minus-solid-full.svg");
}

.bf-action-toggle--compare {
	--bf-action-border: #90bdf0;
	--bf-action-text: #0b4f85;
	--bf-action-bg: #f7fbff;
}
.bf-action-toggle--compare:hover,
.bf-action-toggle--compare:focus-visible {
	--bf-action-border: #0b63b6;
	--bf-action-text: #073f70;
	--bf-action-bg: #eaf4ff;
}
.bf-action-toggle--compare.is-comparing {
	--bf-action-border: #39851f;
	--bf-action-text: #285f14;
	--bf-action-bg: #e6f4d7;
}
.bf-action-toggle--compare.is-comparing::before {
	-webkit-mask-image: url("../icons/square-check-solid-full.svg");
	mask-image: url("../icons/square-check-solid-full.svg");
}
.bf-action-toggle--compare.is-comparing:hover,
.bf-action-toggle--compare.is-comparing:focus-visible {
	--bf-action-border: #b42318;
	--bf-action-text: #9b1c1c;
	--bf-action-bg: #fff1f0;
}
.bf-action-toggle--compare.is-comparing:hover::before,
.bf-action-toggle--compare.is-comparing:focus-visible::before {
	-webkit-mask-image: url("../icons/square-minus-solid-full.svg");
	mask-image: url("../icons/square-minus-solid-full.svg");
}
.bf-action-toggle--compare.is-locked,
.bf-action-toggle--compare[aria-disabled="true"] {
	--bf-action-border: #d0d5dd;
	--bf-action-text: #98a2b3;
	--bf-action-bg: #f2f4f7;
	cursor: not-allowed !important;
	box-shadow: none !important;
}
.bf-action-toggle--compare.is-locked::before {
	-webkit-mask-image: url("../icons/square-minus-solid-full.svg");
	mask-image: url("../icons/square-minus-solid-full.svg");
}
.bf-compare-limit-notice {
	flex: 1 0 100%;
	margin: 4px 0 0;
	padding: 8px 10px;
	border-left: 3px solid #d97706;
	background: #fff7e8;
	color: #744210;
	font-size: 13px;
	line-height: 1.4;
}
.bf-hidden-match-open {
	box-shadow: 0 0 0 2px rgba(9, 105, 218, .12);
}

@media (max-width: 760px) {
	.bf-filter-actions { width: 100%; justify-content: space-between; margin-left: 0; }
	.bf-actions-enhanced > * { flex: 1 1 auto; }
}

/* v0.8.1 action-state and layout corrections. */
.bf-action-toggle .dashicons {
	display: none !important;
}

.bf-action-toggle--compare,
.bf-action-toggle--compare:not(.is-comparing):not(.is-compared) {
	--bf-action-border: #9aa4b2;
	--bf-action-text: #344054;
	--bf-action-bg: #f2f4f7;
}

.bf-action-toggle--compare:not(.is-comparing):not(.is-compared):hover,
.bf-action-toggle--compare:not(.is-comparing):not(.is-compared):focus-visible {
	--bf-action-border: #185fa5;
	--bf-action-text: #0c447c;
	--bf-action-bg: #e6f1fb;
}

.bf-action-toggle--compare.is-comparing,
.bf-action-toggle--compare.is-compared {
	--bf-action-border: #39851f;
	--bf-action-text: #285f14;
	--bf-action-bg: #e6f4d7;
}

.bf-action-toggle--compare.is-comparing::before,
.bf-action-toggle--compare.is-compared::before {
	-webkit-mask-image: url("../icons/square-check-solid-full.svg");
	mask-image: url("../icons/square-check-solid-full.svg");
}

.bf-action-toggle--compare.is-comparing:hover,
.bf-action-toggle--compare.is-comparing:focus-visible,
.bf-action-toggle--compare.is-compared:hover,
.bf-action-toggle--compare.is-compared:focus-visible {
	--bf-action-border: #b42318;
	--bf-action-text: #9b1c1c;
	--bf-action-bg: #fff1f0;
}

.bf-action-toggle--compare.is-comparing:hover::before,
.bf-action-toggle--compare.is-comparing:focus-visible::before,
.bf-action-toggle--compare.is-compared:hover::before,
.bf-action-toggle--compare.is-compared:focus-visible::before {
	-webkit-mask-image: url("../icons/square-minus-solid-full.svg");
	mask-image: url("../icons/square-minus-solid-full.svg");
}

.bf-resource-card__actions.bf-actions-enhanced {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	align-items: stretch;
}

.bf-resource-card__actions.bf-actions-enhanced > .bf-resource-button--primary {
	grid-column: 1 / -1;
	width: 100%;
	min-width: 0;
}

.bf-resource-card__actions.bf-actions-enhanced > .bf-action-toggle--save,
.bf-resource-card__actions.bf-actions-enhanced > .bf-action-toggle--compare {
	width: 100%;
	min-width: 0;
}

.bf-resource-card__actions.bf-actions-enhanced > .bf-compare-limit-notice {
	grid-column: 1 / -1;
}

@media (max-width: 420px) {
	.bf-resource-card__actions.bf-actions-enhanced {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.bf-action-toggle {
		padding-inline: 8px;
		gap: 6px;
	}
}
