/**
 * NPO Donation Campaign card.
 *
 * Scoped under .nde. Colours come through CSS custom properties so Elementor's
 * style controls can drive them without stylesheet edits.
 */

.nde {
	--nde-accent: #2f5bea;
	--nde-card: #ffffff;
	--nde-ink: #1c1c1e;
	--nde-muted: #565b64;
	--nde-hairline: #e6e8ec;
	--nde-field: #ffffff;
	--nde-radius: 14px;

	box-sizing: border-box;
	overflow: hidden;
	background: var(--nde-card);
	border: 1px solid var(--nde-hairline);
	border-radius: var(--nde-radius);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.05);
	color: var(--nde-ink);
}

.nde *,
.nde *::before,
.nde *::after {
	box-sizing: inherit;
}

/* Equal heights in a row ---------------------------------------------
 *
 * Two cards side by side rarely have descriptions of identical length. Without
 * this, one card is shorter and the Donate buttons sit at different heights,
 * which reads as a mistake. Making the card a flex column and pushing the form
 * to the bottom of the body aligns the buttons and the footer regardless of
 * how much text sits above them.
 */

.elementor-widget-nde_campaign,
.elementor-widget-nde_campaign > .elementor-widget-container {
	height: 100%;
}

.nde {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.nde__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.nde__form {
	margin-top: auto;
}

.nde__footer {
	margin-top: auto;
}

/* Media ------------------------------------------------------------- */

.nde__media {
	height: 250px;
	overflow: hidden;
	background: #f1f2f4;
}

.nde__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Body -------------------------------------------------------------- */

.nde__body {
	padding: 28px;
}

.nde__title {
	margin: 0 0 10px;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--nde-ink);
}

.nde__desc {
	margin: 0 0 22px;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--nde-muted);
}

.nde__error {
	margin: 0 0 18px;
	padding: 11px 14px;
	border: 1px solid #f5c6c3;
	border-radius: 8px;
	background: #fdeceb;
	color: #8f2019;
	font-size: 0.95rem;
}

/* Fields ------------------------------------------------------------ */

.nde__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 18px;
}

.nde__fields--single {
	grid-template-columns: 1fr;
}

.nde__field {
	min-width: 0;
}

.nde__label {
	display: block;
	margin-bottom: 7px;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--nde-muted);
}

.nde__control {
	position: relative;
	display: flex;
	align-items: center;
	height: 52px;
	background: var(--nde-field);
	border: 1px solid #d3d7de;
	border-radius: 9px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nde__control:focus-within {
	border-color: var(--nde-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--nde-accent) 20%, transparent);
}

.nde__select {
	width: 100%;
	height: 100%;
	padding: 0 40px 0 15px;
	border: 0;
	background: transparent;
	appearance: none;
	font-family: inherit;
	font-size: 1rem;
	color: var(--nde-ink);
	cursor: pointer;
}

.nde__select:focus {
	outline: none;
}

.nde__chevron {
	position: absolute;
	right: 14px;
	pointer-events: none;
	color: var(--nde-muted);
}

.nde__symbol {
	flex: none;
	padding-left: 15px;
	font-size: 1rem;
	font-weight: 500;
	color: var(--nde-muted);
}

.nde__amount {
	flex: 1;
	width: 100%;
	min-width: 0;
	height: 100%;
	padding: 0 15px 0 8px;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 1rem;
	color: var(--nde-ink);
	appearance: none;
}

.nde__amount:focus {
	outline: none;
}

/* Button ------------------------------------------------------------ */

.nde__button {
	display: block;
	width: 100%;
	padding: 17px 16px;
	border: 0;
	border-radius: 9px;
	background: var(--nde-accent);
	color: #fff;
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.08s ease;
}

.nde__button:hover {
	background: color-mix(in srgb, var(--nde-accent) 88%, #000);
}

.nde__button:active {
	transform: translateY(1px);
}

.nde__button:focus-visible {
	outline: 3px solid var(--nde-ink);
	outline-offset: 3px;
}

.nde__button[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

.nde__secure {
	margin: 12px 0 0;
	font-size: 0.85rem;
	font-style: italic;
	text-align: center;
	color: var(--nde-muted);
}

/* Footer link -------------------------------------------------------- */

.nde__footer {
	padding: 18px;
	border-top: 1px solid var(--nde-hairline);
	text-align: center;
}

.nde__link {
	font-size: 1rem;
	font-weight: 500;
	color: var(--nde-accent);
	text-decoration: none;
}

.nde__link:hover {
	text-decoration: underline;
}

.nde__link--inert {
	opacity: 0.55;
	cursor: default;
}

/* Responsive --------------------------------------------------------- */

@media (max-width: 480px) {
	.nde__body {
		padding: 22px;
	}

	.nde__fields {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.nde__title {
		font-size: 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nde *,
	.nde *::before,
	.nde *::after {
		transition-duration: 0.01ms !important;
	}
}
