/* Funding opportunities list, cards, and detail lightbox. */

.fo-funding {
	--fo-blue: #238aca;
	--fo-blue-dark: #1f7ab2;
	--fo-bar: #dceaf5;
	--fo-ink: #1a1a1a;
	--fo-muted: #6b6b6b;
	--fo-visit: #d6e8f6;
	--fo-back: #d0d0d0;
	font-family: Lato, sans-serif;
	color: var(--fo-ink);
	margin: 8px 0 24px;
}

.fo-funding h2,
.fo-funding h3,
.fo-funding p {
	font-family: Lato, sans-serif;
}

.fo-accordion {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.fo-acc-heading {
	margin: 0 !important;
	padding: 0 ;
	line-height: 1.2 ;
}

.fo-acc-btn {
	position: relative;
	width: 100%;
	display: flex ;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 ;
	padding: 15px 18px 15px 22px ;
	border: 0 ;
	border-radius: 8px ;
	background: var(--fo-bar) ;
	background: var(--color-accordion-bg, #dceaf5) ;
	color: var(--fo-ink) ;
	box-shadow: none ;
	text-align: left;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700 ;
	font-size: 15px ;
	line-height: 1.35 ;
	cursor: pointer;
}

.fo-acc-btn:hover,
.fo-acc-btn:focus {
	background: #d0e4f3 ;
	color: var(--fo-ink) ;
}

.fo-acc-btn:focus-visible {
	outline: 2px solid var(--fo-blue);
	outline-offset: 2px;
}

.fo-item.is-open .fo-acc-btn::before {
	content: "";
	position: absolute;
	left: 0;
	top: -1px;
	bottom: -1px;
	width: 6px;
	background: var(--fo-blue);
	border-bottom-left-radius: 8px;
    border-top-left-radius: 8px;
}

.fo-acc-label {
	display: block;
	padding-right: 12px;
}

.fo-chevron {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border: 2px solid #1c1c1c;
	border-radius: 50%;
	position: relative;
}

.fo-chevron::before {
	content: "";
	position: absolute;
	left: 8px;
	top: 7px;
	width: 8px;
	height: 8px;
	border-right: 2px solid #1c1c1c;
	border-bottom: 2px solid #1c1c1c;
	transform: rotate(45deg);
}

.fo-item.is-open .fo-chevron::before {
	top: 10px;
	transform: rotate(225deg);
}

.fo-panel-wrap {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.28s ease;
}

.fo-item.is-open .fo-panel-wrap {
	grid-template-rows: 1fr;
}

.fo-panel {
	overflow: hidden;
	min-height: 0;
}

.fo-empty {
	margin: 18px 8px ;
	color: #555 ;
	font-size: 16px ;
}

.fo-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	padding: 28px 6px 16px;
}

.fo-subhead {
	margin: 8px 8px 0 ;
	padding: 0 ;
	color: var(--fo-blue-dark) ;
	font-size: 16px;
	font-weight: 700 ;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.3;
}

.fo-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	text-align: center;
	height: 100%;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
	padding: 36px 24px 32px;
}

.fo-card__title {
	margin: 0 ;
	color: #111 ;
	font-size: 22px ;
	font-weight: 800 ;
	line-height: 1.3 ;
}

.fo-card__provider {
	margin: 14px 0 0 ;
	color: #222 ;
	font-size: 18px ;
	font-weight: 500 ;
	line-height: 1.4 ;
}

.fo-card__status,
.fo-modal__status {
	margin: 16px 0 0 ;
	font-size: 13px ;
	font-weight: 700 ;
	letter-spacing: 0.04em;
	line-height: 1.3 ;
	text-transform: uppercase;
}

.fo-status--open {
	color: var(--fo-blue-dark);
}

.fo-status--closed {
	color: #8a8a8a ;
}

.fo-funding .fo-more,
.fo-funding a.fo-more {
	margin-top: 26px;
	background: #6b6b6b;
	color: #fff ;
	border: 0 ;
	border-radius: 8px;
	padding: 12px 28px;
	min-width: 180px;
	font-family: Lato, sans-serif;
	font-size: 14px ;
	font-weight: 700 ;
	letter-spacing: 0.06em;
	line-height: 1.2 ;
	text-transform: uppercase;
	text-decoration: none ;
	box-shadow: none;
	cursor: pointer;
}

.fo-funding .fo-more:hover,
.fo-funding .fo-more:focus,
.fo-funding a.fo-more:hover,
.fo-funding a.fo-more:focus {
	background: #555 ;
	color: #fff;
}

.fo-modal {
	position: fixed;
	top: 0 ;
	right: 0 ;
	bottom: 0 ;
	left: 0 ;
	z-index: 1000001;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100% ;
	height: 100% ;
	margin: 0 ;
	padding: 24px 16px;
	transform: none;
}

.fo-modal[hidden] {
	display: none;
}

.fo-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 30, 40, 0.55);
}

.fo-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(920px, 100%);
	max-height: min(860px, 90vh);
	overflow: hidden;
	background: #fff;
	outline: none;
}

.fo-modal__x {
	position: absolute;
	top: 8px;
	right: 10px;
	z-index: 2;
	width: 40px;
	height: 40px;
	margin: 0 ;
	padding: 0 ;
	border: 0 ;
	border-radius: 50% ;
	background: rgba(255, 255, 255, 0.92);
	color: #222 ;
	font-size: 28px ;
	line-height: 1 ;
	box-shadow: none;
	cursor: pointer;
}

.fo-modal__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
}

.fo-modal__photo {
	background: #d9d9e1;
	min-height: 210px;
}

.fo-modal__img {
	display: block;
	width: 100%;
	height: 230px;
	object-fit: cover;
}

.fo-modal__content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 36px 40px 28px;
}

.fo-modal__title {
	align-self: flex-start;
	display: inline-block;
	margin: 0 0 8px;
	padding: 0 0 2px;
	border-bottom: 2px solid #111;
	color: #111;
	font-size: 28px;
	font-weight: 800;
	line-height: 1.25;
	text-decoration: none;
}

.fo-modal__desc {
	max-width: 680px;
	margin-top: 18px;
	color: #222 ;
	font-size: 18px ;
	line-height: 1.5 ;
}

.fo-modal__desc p {
	margin: 0 0 12px ;
	color: #222 ;
	font-size: 18px ;
	line-height: 1.5 ;
}

.fo-modal__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: auto;
	padding-top: 28px;
	background: #fff;
}

.fo-modal .fo-modal__back,
.fo-modal .fo-modal__visit {
	display: inline-block;
	margin: 0 ;
	border: 0 ;
	border-radius: 8px;
	padding: 12px 22px ;
	font-family: Lato, sans-serif ;
	font-size: 13px ;
	font-weight: 700 ;
	letter-spacing: 0.04em;
	line-height: 1.2 ;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none ;
	box-shadow: none ;
	white-space: normal;
	cursor: pointer;
}

.fo-modal .fo-modal__back {
	background: #d0d0d0 ;
	color: #222 ;
}

.fo-modal .fo-modal__back:hover,
.fo-modal .fo-modal__back:focus {
	background: #c2c2c2;
	color: #111;
}

.fo-modal .fo-modal__visit {
	background: #d6e8f6;
	color: #1a1a1a;
}

.fo-modal .fo-modal__visit:hover,
.fo-modal .fo-modal__visit:focus {
	background: #c5dff3;
	color: #111 ;
}

html.fo-modal-open,
html.fo-modal-open body {
	overflow: hidden;
}

@media (max-width: 980px) {
	.fo-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.fo-grid {
		grid-template-columns: 1fr;
	}

	.fo-acc-btn {
		font-size: 14px;
		padding: 14px 14px 14px 18px;
	}

	.fo-modal__content {
		padding: 28px 20px 20px;
	}

	.fo-modal__title {
		font-size: 22px;
	}

	.fo-modal__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.fo-funding .fo-modal__back,
	.fo-funding .fo-modal__visit {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fo-panel-wrap {
		transition: none;
	}
}

/* Editor layout for the opportunity details box. */
.clima-fo-fields h3 {
	margin: 0 0 12px;
	font-size: 14px;
}

.clima-fo-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	margin: 16px 0;
}

.clima-fo-fields .fo-field {
	margin: 0 0 14px;
}

.clima-fo-fields label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.clima-fo-fields input[type="text"],
.clima-fo-fields input[type="url"],
.clima-fo-fields input[type="number"],
.clima-fo-fields select {
	width: 100%;
	max-width: 100%;
}

.clima-fo-fields .wp-editor-wrap {
	max-width: 100%;
}

.clima-fo-req {
	color: #b32d2e;
}

.clima-fo-image-preview img {
	display: block;
	max-width: 240px;
	height: auto;
	margin-bottom: 8px;
}

@media (max-width: 782px) {
	.clima-fo-grid {
		grid-template-columns: 1fr;
	}
}
