/**
 * The Give section (the albasar/appeal-give block's "section" layout,
 * albasar_give_section() in inc/give-card.php): a Quick Donate panel just
 * below the Where We Work and Our Work heroes. Loaded only where it renders,
 * after give-card.css. Colours: theme.json tokens only.
 *
 * - One wide white card: eyebrow + title (and the lede at the right) on top,
 *   then the shared Give card flattened into it.
 * - 1100px and up: the form in two rows. Once / Monthly, the amounts and Give
 *   on the first; Zakat, the hint and the trust line on the second.
 * - 782px to 1099px: the same rows, two columns.
 * - Phones: the Give card's own stacked layout.
 * - 1025px and up: the card rises 64px over the hero's bottom edge (the
 *   section's negative margin; the hero itself is unchanged).
 *
 * The "split" design (.ab-give-section--split, at the end): the copy at the
 * left and the Give card, as it is, at the right; stacked below 1025px.
 */

.ab-give-section {
	position: relative;
	z-index: 2;
	padding: 32px 16px 48px;
	background: var(--wp--preset--color--ab-white);
}

.ab-give-section__card {
	box-sizing: border-box;
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin-inline: auto;
	padding: 24px 20px;
	background: var(--wp--preset--color--ab-white);
	border: 1px solid var(--wp--preset--color--ab-line);
	border-top: 3px solid var(--wp--custom--action--500);
	border-radius: 12px;
	box-shadow: var(--wp--preset--shadow--raised);
}

/* ---- Heading row ---------------------------------------------------------- */
.ab-give-section__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-bottom: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--wp--preset--color--ab-line);
}

.ab-give-section__eyebrow {
	margin: 0 0 6px;
	font: 600 13px/1.2 var(--wp--preset--font-family--sans);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ab-blue);
}

.ab-give-section__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--ab-navy);
}

.ab-give-section__lede {
	margin: 0;
	font: 400 15px/1.5 var(--wp--preset--font-family--sans);
	color: var(--wp--preset--color--ab-muted);
}

/* ---- The Give card, flattened into the panel ------------------------------ */
.ab-give-section--strip .ab-hero-donate.ab-give-card {
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* ---- Tablets and up: rows ------------------------------------------------- */
@media (min-width: 782px) {
	.ab-give-section--strip {
		padding: 40px 24px 56px;
	}

	.ab-give-section__card {
		padding: 28px 32px;
	}

	.ab-give-section__head {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
		gap: 32px;
	}

	.ab-give-section--strip .ab-give-section__lede {
		max-width: 440px;
		text-align: right;
	}

	/* The row of amounts says what it is; the legend stays for screen readers. */
	.ab-give-section--strip .ab-hero-donate__label {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.ab-give-section--strip .ab-hero-donate.ab-give-card {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-areas:
			"freq   ."
			"amts   amts"
			"error  error"
			"zakat  submit"
			".      trust";
		gap: 16px 24px;
		align-items: center;
	}

	.ab-give-section--strip .ab-hero-donate__freq {
		grid-area: freq;
	}

	.ab-give-section--strip .ab-hero-donate__amounts {
		grid-area: amts;
	}

	.ab-give-section--strip .ab-give-card__error {
		grid-area: error;
		margin: 0;
	}

	.ab-give-section--strip .ab-hero-donate__zakat {
		grid-area: zakat;
	}

	.ab-give-section--strip .ab-hero-donate__submit {
		grid-area: submit;
	}

	.ab-give-section--strip .ab-hero-donate__trust {
		grid-area: trust;
		justify-content: flex-end;
		margin: 0;
		text-align: right;
	}

	/* All the amounts and Other in one row. */
	.ab-give-section--strip .ab-hero-donate__grid {
		grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
	}

	.ab-give-section--strip .ab-hero-donate__other-wrap {
		grid-column: span 2;
	}

	.ab-give-section--strip .ab-hero-donate__hint {
		margin: 0;
	}
}

/* ---- Wide screens: two rows, the copy in the heading row ------------------ */
@media (min-width: 1100px) {
	.ab-give-section--strip .ab-hero-donate.ab-give-card {
		grid-template-columns: 270px minmax(0, 1fr) 220px;
		grid-template-areas:
			"freq   amts   submit"
			"zakat  amts   trust"
			"error  error  error";
		align-items: start;
	}

	.ab-give-section--strip .ab-hero-donate__freq,
	.ab-give-section--strip .ab-hero-donate__freq-opt {
		min-height: 52px;
	}

	.ab-give-section--strip .ab-hero-donate__freq-opt {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
	}

	.ab-give-section--strip .ab-hero-donate__trust {
		justify-content: center;
		text-align: center;
	}
}

/* ---- Wide screens: over the hero's bottom edge ---------------------------- */
@media (min-width: 1025px) {
	/* Two classes: the post content's layout rule (".wp-container-… > * + *")
	   sets every block's margin to 0. */
	.ab-give-section--strip.alignfull {
		margin-top: -64px;
		padding-top: 0;
		background: transparent;
	}
}

/* ---------------------------------------------------------------------------
 * Split design: the copy at the left, the Give card at the right
 * ------------------------------------------------------------------------- */
.ab-give-section--split {
	padding: 56px 16px;
	border-bottom: 1px solid var(--wp--preset--color--ab-line);
}

.ab-give-section__split {
	box-sizing: border-box;
	display: grid;
	gap: 32px;
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin-inline: auto;
}

.ab-give-section--split .ab-give-section__eyebrow {
	margin-bottom: var(--wp--preset--spacing--30);
}

.ab-give-section--split .ab-give-section__title {
	margin: 0 0 var(--wp--preset--spacing--30);
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.15;
}

.ab-give-section--split .ab-give-section__lede {
	max-width: 560px;
	font-size: 1rem;
	line-height: 1.6;
}

/* The highlight: one line with an orange bar at its left. */
.ab-give-section__note {
	margin: var(--wp--preset--spacing--40) 0 0;
	padding: 4px 0 4px 16px;
	border-left: 3px solid var(--wp--custom--action--500);
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.25rem;
	line-height: 1.35;
	color: var(--wp--preset--color--ab-navy);
}

.ab-give-section__widget {
	display: flex;
	justify-content: center;
}

.ab-give-section__widget > .ab-give-card {
	max-width: 440px;
}

@media (min-width: 782px) {
	.ab-give-section--split {
		padding: 80px 24px;
	}
}

@media (min-width: 1025px) {
	.ab-give-section__split {
		grid-template-columns: minmax(0, 1fr) 420px;
		gap: 72px;
		align-items: center;
	}

	.ab-give-section__widget {
		justify-content: flex-end;
	}
}
