/* =========================================================
   JPBC DONATION SECTION
   ========================================================= */

.jpbc-donation-section {
	--jpbc-donation-black: #1f1f1f;
	--jpbc-donation-white: #ffffff;
	--jpbc-donation-pink: #eb3f9d;
	--jpbc-donation-blue: #bddff2;
	--jpbc-donation-track: rgba(255, 255, 255, 0.58);
	--jpbc-donation-error: #b42318;

	width: 100%;
	padding: clamp(80px, 8vw, 140px) 24px;
	background-color: var(--jpbc-donation-white);
	color: var(--jpbc-donation-black);
	box-sizing: border-box;
}

.jpbc-donation-section *,
.jpbc-donation-section *::before,
.jpbc-donation-section *::after {
	box-sizing: border-box;
}


/* =========================================================
   INNER TWO-COLUMN LAYOUT
   ========================================================= */

.jpbc-donation-inner {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: space-between;
	gap: clamp(20px, 5vw, 76px);
	width: 100%;
	max-width: 1152px;
	margin-inline: auto;
}

.jpbc-donation-form-column {
	flex: 1 1 58%;
	width: 58%;
	min-width: 0;
}

.jpbc-donation-impact-column {
	flex: 0 1 42%;
	width: 42%;
	min-width: 0;
}


/* =========================================================
   FORM-COLUMN HEADING
   ========================================================= */

.jpbc-donation-heading {
	width: 100%;
	margin: 0 0 44px;
}

.jpbc-donation-heading .elementor-heading-title {
	margin: 0;
	color: var(--jpbc-donation-black);
	font-family: "Outfit", Arial, sans-serif;
	font-size: clamp(44px, 4vw, 64px);
	font-weight: 700;
	line-height: 0.98;
	letter-spacing: -0.045em;
}


/* =========================================================
   GIVEWP OUTER WRAPPER
   Internal iframe styling will be added separately.
   ========================================================= */

.jpbc-givewp-form,
.jpbc-givewp-form .elementor-widget-container,
.jpbc-givewp-form .give-form-wrap,
.jpbc-givewp-form [class*="give-form"],
.jpbc-givewp-form iframe {
	display: block;
	width: 100%;
	max-width: none;
}

.jpbc-givewp-form {
	min-width: 0;
	margin: 0;
}

.jpbc-givewp-form .elementor-widget-container {
	padding: 0;
}

.jpbc-givewp-form iframe {
	border: 0;
	background: transparent;
}


/* =========================================================
   IMPACT CARD
   ========================================================= */

.jpbc-donation-impact-card {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	min-width: 0;
	padding: clamp(24px, 4vw, 36px);
	border-radius: clamp(38px, 4vw, 64px);
	background-color: var(--jpbc-donation-blue);
	color: var(--jpbc-donation-black);
	overflow: hidden;
}


/* =========================================================
   IMPACT CARD HEADING
   ========================================================= */

.jpbc-impact-heading {
	width: 100%;
	margin: 0 0 6px;
}

.jpbc-impact-heading .elementor-heading-title {
	margin: 0;
	color: var(--jpbc-donation-black);
	font-family: "Outfit", Arial, sans-serif;
	font-size: clamp(18px, 1.5vw, 24px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.025em;
}


/* =========================================================
   IMPACT DESCRIPTION
   ========================================================= */

.jpbc-impact-description {
	width: 100%;
	margin: 0 0 42px;
}

.jpbc-impact-description,
.jpbc-impact-description p {
	color: var(--jpbc-donation-black);
	font-family: "Manrope", Arial, sans-serif;
	font-size: clamp(14px, 1.3vw, 16px);
	font-weight: 400;
	line-height: 1.45;
}

.jpbc-impact-description p {
	margin: 0;
}


/* =========================================================
   ALLOCATION SHORTCODE WIDGET
   ========================================================= */

.jpbc-impact-allocation-widget,
.jpbc-impact-allocation-widget .elementor-widget-container {
	width: 100%;
	min-width: 0;
}

.jpbc-allocation-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 0;
}


/* =========================================================
   INDIVIDUAL ALLOCATION
   ========================================================= */

.jpbc-allocation-item {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	min-width: 0;
}

.jpbc-allocation-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
}

.jpbc-allocation-title,
.jpbc-allocation-percentage {
	color: var(--jpbc-donation-black);
	font-family: "Manrope", Arial, sans-serif;
	font-size: clamp(12px, 1.25vw, 14px);
	font-weight: 700;
	line-height: 1.35;
}

.jpbc-allocation-title {
	flex: 1 1 auto;
	min-width: 0;
}

.jpbc-allocation-percentage {
	flex: 0 0 auto;
	white-space: nowrap;
	text-align: right;
}


/* =========================================================
   PROGRESS BARS
   ========================================================= */

.jpbc-allocation-track {
	position: relative;
	display: block;
	width: 100%;
	height: 11px;
	border-radius: 999px;
	background-color: var(--jpbc-donation-track);
	overflow: hidden;
}

.jpbc-allocation-fill {
	position: absolute;
	inset: 0 auto 0 0;
	display: block;
	width: var(--jpbc-allocation-value, 0%);
	max-width: 100%;
	height: 100%;
	border-radius: inherit;
	background-color: var(--jpbc-donation-black);
	transform-origin: left center;
	transition: width 500ms ease;
}


/* =========================================================
   ADMINISTRATOR NOTICES
   ========================================================= */

.jpbc-allocation-admin-warning,
.jpbc-allocation-notice {
	width: 100%;
	margin: 18px 0 0;
	padding: 14px 16px;
	border: 1px solid rgba(180, 35, 24, 0.35);
	border-radius: 12px;
	background-color: rgba(255, 255, 255, 0.72);
	color: var(--jpbc-donation-error);
	font-family: "Manrope", Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
}


/* =========================================================
   SCREEN-READER TEXT
   ========================================================= */

.jpbc-donation-section .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {
	.jpbc-donation-section {
		padding: 80px 24px;
	}

	.jpbc-donation-inner {
		flex-direction: column;
		gap: 52px;
	}

	.jpbc-donation-form-column,
	.jpbc-donation-impact-column {
		flex-basis: auto;
		width: 100%;
		max-width: none;
	}

	.jpbc-donation-heading {
		margin-bottom: 36px;
	}

	.jpbc-donation-impact-card {
		padding: 46px;
		border-radius: 48px;
	}

	.jpbc-impact-description {
		margin-bottom: 36px;
	}
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
	.jpbc-donation-section {
		padding: 64px 20px;
	}

	.jpbc-donation-inner {
		gap: 40px;
	}

	.jpbc-donation-heading {
		margin-bottom: 30px;
	}

	.jpbc-donation-heading .elementor-heading-title {
		font-size: 44px;
	}

	.jpbc-donation-impact-card {
		padding: 32px 24px;
		border-radius: 36px;
	}

	.jpbc-impact-heading .elementor-heading-title {
		font-size: 30px;
	}

	.jpbc-impact-description {
		margin-bottom: 30px;
	}

	.jpbc-impact-description,
	.jpbc-impact-description p {
		font-size: 16px;
	}

	.jpbc-allocation-list {
		gap: 24px;
	}

	.jpbc-allocation-header {
		gap: 14px;
	}

	.jpbc-allocation-title,
	.jpbc-allocation-percentage {
		font-size: 15px;
	}

	.jpbc-allocation-track {
		height: 10px;
	}
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
	.jpbc-allocation-fill {
		transition: none;
	}
}

/* Left-align the heading and donation form */
.jpbc-donation-form-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Give both elements the same width and left edge */
.jpbc-donation-form-column .jpbc-donation-heading,
.jpbc-donation-form-column .jpbc-givewp-form {
    width: 100%;
    max-width: 720px;
    margin-left: 0;
    margin-right: auto;
}

.jpbc-donation-heading,
.jpbc-donation-heading .elementor-heading-title {
    text-align: left;
}

.jpbc-donation-section
.jpbc-donation-impact-card
.jpbc-impact-heading
.elementor-heading-title {
    color: var(--jpbc-donation-black) !important;
}

/* Use inside GiveWP Custom CSS */
.givewp-layouts-section {
    gap: 20px !important;
}

.givewp-fields-groups {
    gap: 16px !important;
}

label {
    margin-bottom: 7px !important;
}

input[type="text"],
input[type="email"],
input[type="number"] {
    min-height: 58px !important;
    padding: 12px 22px !important;
    border-radius: 999px !important;
}

button[aria-pressed="false"] {
    background-color: #eeeeee !important;
    border-color: #eeeeee !important;
    border-radius: 999px !important;
}

button[aria-pressed="true"] {
    background-color: #eb3f9d !important;
    border-color: #eb3f9d !important;
    color: #ffffff !important;
}

form {
    padding: 32px 36px 30px !important;
}

/* GiveWP iframe wrapper */
.jpbc-donation-form-column .givewp-embed-frame,
.jpbc-donation-form-column .givewp-embed {
    width: 100%;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

/* Actual GiveWP iframe element */
.jpbc-donation-form-column iframe.givewp-embed-frame__iframe {
    display: block;
    width: 100% !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}