/* ==========================================================================
   PDGA Foundation: Grant Program
   Reusable program card used for Youth & Education and other grant programs.
   ========================================================================== */

.pdga-grant-program {
	--pdga-grant-blue: var(--wp--preset--color--pdga-blue);
	--pdga-grant-highlight: var(--wp--preset--color--highlight-blue);
	--pdga-grant-green: var(--wp--preset--color--pdga-green);
	--pdga-grant-white: var(--wp--preset--color--base);
	--pdga-grant-text: #43474f;
	--pdga-grant-surface: #eff4ff;
	--pdga-grant-surface-medium: #e6eeff;
	--pdga-grant-border: #d9e3e8;

	background: var(--pdga-grant-white);
	border: 1px solid var(--pdga-grant-border);
	border-radius: 16px;
	box-shadow: 0 3px 12px rgb(0 52 98 / 7%);
	box-sizing: border-box;
	overflow: hidden;
	padding: clamp(1.5rem, 3vw, 2.5rem);
	position: relative;
	scroll-margin-top: 8rem;
}

/*
 * Program accent bar.
 */
.pdga-grant-program::before {
	background: var(--pdga-grant-accent, var(--pdga-grant-highlight));
	content: "";
	height: 6px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.pdga-grant-program :where(h2, h3, h4, p, ul) {
	margin-bottom: 0;
	margin-top: 0;
}


/* Header
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__header {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.pdga-grant-program .pdga-grant-program__heading-row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.pdga-grant-program .pdga-grant-program__title {
	color: var(--pdga-grant-blue);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.2;
}


/* Status
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__status {
	align-items: center;
	border-radius: 999px;
	display: inline-flex;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.75rem;
	font-weight: 700;
	gap: 0.45rem;
	letter-spacing: 0.055em;
	line-height: 1.2;
	padding: 0.45rem 0.85rem;
	text-transform: uppercase;
	width: fit-content;
}

.pdga-grant-program .pdga-grant-program__status--open {
	background: #003b35;
	color: #80f6e7;
}

.pdga-grant-program .pdga-grant-program__status--open::before {
	background: currentColor;
	border-radius: 50%;
	content: "";
	height: 7px;
	width: 7px;
}


/* Cycle
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__cycle {
	background: var(--pdga-grant-surface-medium);
	border-radius: 999px;
	color: var(--pdga-grant-text);
	flex: 0 0 auto;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.2;
	padding: 0.45rem 0.85rem;
	text-transform: uppercase;
	width: fit-content;
}


/* Description
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__description {
	color: var(--pdga-grant-text);
	font-family: var(--wp--preset--font-family--source-sans-pro);
	font-size: 1rem;
	line-height: 1.6;
	margin-top: 1.5rem;
	max-width: 920px;
}


/* Highlights
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__highlights {
	background: var(--pdga-grant-surface);
	border-radius: 12px;
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: 1.5rem;
	padding: 1rem;
}

.pdga-grant-program .pdga-grant-program__highlights > .pdga-grant-program__highlight {
	margin-block-start: 0;
	margin-block-end: 0;
}

.pdga-grant-program .pdga-grant-program__highlight {
	align-items: center;
	display: flex;
	gap: 0.75rem;
	min-width: 0;
}

.pdga-grant-program .pdga-grant-program__highlight::before {
	background-color: #ffffff;
	background-position: center;
	background-repeat: no-repeat;
	background-size: 21px;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgb(0 52 98 / 8%);
	content: "";
	flex: 0 0 40px;
	height: 40px;
	width: 40px;
}

.pdga-grant-program .pdga-grant-program__highlight--funding::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16v10H4zM7 10h3M14 14h3' fill='none' stroke='%23007DA4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.3' fill='none' stroke='%23007DA4' stroke-width='1.8'/%3E%3C/svg%3E");
}

.pdga-grant-program .pdga-grant-program__highlight--entities::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 10 9-5 9 5-9 5-9-5ZM6 12v5h12v-5M4 19h16' fill='none' stroke='%23007DA4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.pdga-grant-program .pdga-grant-program__highlight--deadline::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='5' width='16' height='15' rx='2' fill='none' stroke='%23007DA4' stroke-width='1.8'/%3E%3Cpath d='M8 3v4M16 3v4M4 9h16M12 12v4l3 2' fill='none' stroke='%23007DA4' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.pdga-grant-program .pdga-grant-program__highlight-text {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.pdga-grant-program .pdga-grant-program__highlight-label {
	color: var(--pdga-grant-text);
	font-family: var(--wp--preset--font-family--source-sans-pro);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	line-height: 1.25;
	text-transform: uppercase;
}

.pdga-grant-program .pdga-grant-program__highlight-value {
	color: var(--pdga-grant-blue);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}


/* Accordions
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__accordions {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-top: 1.5rem;
}

.pdga-grant-program .pdga-grant-program__accordions > .pdga-grant-program__accordion {
	margin-block-start: 0;
	margin-block-end: 0;
}

.pdga-grant-program .pdga-grant-program__accordion {
	background: var(--pdga-grant-surface);
	border: 0;
	border-radius: 10px;
	overflow: hidden;
	padding: 0;
}

.pdga-grant-program .pdga-grant-program__accordion > summary {
	align-items: center;
	color: var(--pdga-grant-blue);
	cursor: pointer;
	display: flex;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 1.05rem;
	font-weight: 600;
	gap: 0.75rem;
	justify-content: space-between;
	list-style: none;
	padding: 1rem;
	transition: background 160ms ease;
}

.pdga-grant-program .pdga-grant-program__accordion > summary::-webkit-details-marker {
	display: none;
}

.pdga-grant-program .pdga-grant-program__accordion > summary:hover {
	background: var(--pdga-grant-surface-medium);
}


/* Accordion left icon */
.pdga-grant-program .pdga-grant-program__accordion > summary::before {
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	content: "";
	flex: 0 0 21px;
	height: 21px;
	width: 21px;
}

.pdga-grant-program .pdga-grant-program__accordion--grants > summary::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23007DA4' stroke-width='1.8'/%3E%3Cpath d='M12 7v10M9 9h5a2 2 0 0 1 0 4H10a2 2 0 0 0 0 4h5' fill='none' stroke='%23007DA4' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.pdga-grant-program .pdga-grant-program__accordion--eligibility > summary::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 7 2 2 4-4M5 13l2 2 4-4M13 8h6M13 14h6M5 19h14' fill='none' stroke='%23007DA4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.pdga-grant-program .pdga-grant-program__accordion--deadlines > summary::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23007DA4' stroke-width='1.8'/%3E%3Cpath d='M12 8v5l3 2' fill='none' stroke='%23007DA4' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.pdga-grant-program .pdga-grant-program__accordion--application > summary::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3h9l3 3v15H6zM14 3v4h4M9 11h6M9 15h6' fill='none' stroke='%23007DA4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}


/* Accordion chevron */
.pdga-grant-program .pdga-grant-program__accordion > summary::after {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	content: "";
	flex: 0 0 8px;
	height: 8px;
	margin-left: auto;
	margin-right: 0.3rem;
	transform: rotate(45deg);
	transition: transform 180ms ease;
	width: 8px;
}

.pdga-grant-program .pdga-grant-program__accordion[open] > summary::after {
	transform: rotate(225deg);
}


/* Accordion content
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__accordion > :not(summary) {
	margin-left: 1rem;
	margin-right: 1rem;
}

.pdga-grant-program .pdga-grant-program__accordion > :last-child {
	margin-bottom: 1rem;
}

.pdga-grant-program .pdga-grant-program__accordion p,
.pdga-grant-program .pdga-grant-program__accordion li {
	color: var(--pdga-grant-text);
	font-family: var(--wp--preset--font-family--source-sans-pro);
	font-size: 0.875rem;
	line-height: 1.55;
}


/* Available Grants
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__grant-grid {
	align-items: stretch;
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding-top: 0.25rem;
}

/*
 * Neutralize Gutenberg's default sibling block spacing inside the grid.
 */
.pdga-grant-program .pdga-grant-program__grant-grid > .pdga-grant-program__grant-card {
	height: 100%;
	margin-block-start: 0;
	margin-block-end: 0;
}

.pdga-grant-program .pdga-grant-program__grant-card,
.pdga-grant-program .pdga-grant-program__content-card {
	background: #ffffff;
	border-radius: 10px;
	box-shadow: 0 2px 6px rgb(0 52 98 / 6%);
	box-sizing: border-box;
	padding: 1rem;
}


/* Eligibility
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__content-card + .pdga-grant-program__content-card {
	margin-top: 1rem;
}

.pdga-grant-program .pdga-grant-program__subheading {
	color: var(--pdga-grant-blue);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.055em;
	line-height: 1.35;
	margin-bottom: 0.5rem;
	text-transform: uppercase;
}


/* Deadlines
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__deadline-list {
	background: #ffffff;
	border-radius: 10px;
	box-shadow: 0 2px 6px rgb(0 52 98 / 6%);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem 1rem 1rem 2.25rem;
}

.pdga-grant-program .pdga-grant-program__deadline-list strong {
	color: var(--pdga-grant-blue);
}


/* Buttons
   ========================================================================== */

.pdga-grant-program .pdga-grant-program__buttons {
	gap: 0.75rem;
	margin-top: 1rem;
}

/* Keep long application labels within their editable Button blocks. */
.pdga-grant-program .pdga-grant-program__primary-button,
.pdga-grant-program .pdga-grant-program__secondary-button {
	max-width: 100%;
	min-width: 0;
}

.pdga-grant-program .pdga-grant-program__primary-button .wp-block-button__link,
.pdga-grant-program .pdga-grant-program__secondary-button .wp-block-button__link {
	box-sizing: border-box;
	max-width: 100%;
	overflow-wrap: anywhere;
	white-space: normal;
}

.pdga-grant-program .pdga-grant-program__primary-button .wp-block-button__link {
	background: #c0e8ff;
	border-radius: 999px;
	color: #005b79;
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 1rem;
	font-weight: 700;
	padding: 0.65rem 1.25rem;
}

.pdga-grant-program .pdga-grant-program__secondary-button .wp-block-button__link {
	background: var(--pdga-grant-surface-medium);
	border-radius: 999px;
	color: var(--pdga-grant-blue);
	font-family: var(--wp--preset--font-family--montserrat);
	font-size: 1rem;
	font-weight: 700;
	padding: 0.65rem 1rem;
}


/* Tablet
   ========================================================================== */

@media (max-width: 900px) {

	.pdga-grant-program .pdga-grant-program__header {
		align-items: flex-start;
		flex-direction: column;
	}

	.pdga-grant-program .pdga-grant-program__highlights {
		grid-template-columns: 1fr;
	}

}


/* Mobile
   ========================================================================== */

@media (max-width: 600px) {

	.pdga-grant-program {
		border-radius: 12px;
		padding: 1.25rem;
	}

	.pdga-grant-program .pdga-grant-program__heading-row {
		align-items: flex-start;
		flex-direction: column;
	}

	.pdga-grant-program .pdga-grant-program__grant-grid {
		grid-template-columns: 1fr;
	}

	.pdga-grant-program .pdga-grant-program__accordion > summary {
		font-size: 0.95rem;
		padding: 0.9rem;
	}

}

/* Remove theme/browser divider or focus line from accordion summaries */
.pdga-grant-program .pdga-grant-program__accordion > summary {
	border: 0;
	outline: 0;
}

/* Don't add a divider when the accordion is open */
.pdga-grant-program .pdga-grant-program__accordion[open] > summary {
	border-bottom: 0;
}

/* Accessible keyboard focus */
.pdga-grant-program .pdga-grant-program__accordion > summary:focus-visible {
	outline: 2px solid var(--pdga-grant-highlight);
	outline-offset: -2px;
}



