@import './variables';

$thank-donor-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
$thank-donor-duration: 0.22s;

$thank-donor-max: 28.5rem;
$thank-donor-text-max: 34rem;

.giftflow-thank-donor {
	--gf-td-pad-x: clamp(0.75rem, 4vw, 1.5rem);
	--gf-td-pad-y: clamp(1.25rem, 4vw, 2rem);
	--gf-td-gap: clamp(0.875rem, 2.5vw, 1.375rem);

	display: block;
	width: 100%;
	max-width: $thank-donor-max;
	margin-inline: auto;
	box-sizing: border-box;
}

// Flat container: no border, no shadow — spacing + type do the work
.giftflow-thank-donor__card {
	position: relative;
	padding: var(--gf-td-pad-y) var(--gf-td-pad-x);
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	box-sizing: border-box;

	@media (min-width: 600px) and (max-width: 899px) {
		--gf-td-pad-x: 1.5rem;
		--gf-td-pad-y: 1.75rem;
	}

	@media (min-width: 480px) and (max-width: 599px) {
		--gf-td-pad-x: 1.25rem;
	}
}

.giftflow-thank-donor__masthead {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.625rem;
	margin-bottom: var(--gf-td-gap);
}

// Icon only — no ring, no fill box
.giftflow-thank-donor__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-bottom: 0.125rem;
	color: $success-color;
	transition: color $thank-donor-duration $thank-donor-ease, opacity $thank-donor-duration $thank-donor-ease;

	svg {
		display: block;
		width: 2.5rem;
		height: 2.5rem;
	}

	@media (min-width: 600px) {
		svg {
			width: 2.75rem;
			height: 2.75rem;
		}
	}

	@media (hover: hover) and (pointer: fine) {
		.giftflow-thank-donor__card:hover & {
			opacity: 0.92;
		}
	}
}

.giftflow-thank-donor__title {
	margin: 0;
	max-width: $thank-donor-text-max;
	// font-size: clamp(1.3125rem, 2vw + 0.9rem, 1.75rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	// line-height: 1.2;
	color: $text-color;
	text-wrap: balance;
}

.giftflow-thank-donor__main {
	max-width: $thank-donor-text-max;
	margin-inline: auto;
	margin-bottom: var(--gf-td-gap);
	// font-size: clamp(0.9375rem, 0.3vw + 0.88rem, 1.0625rem);
	// line-height: 1.65;
	// color: color-mix(in srgb, $text-color 82%, $text-light);
	text-align: center;
	font-weight: bold;

	p {
		margin: 0;
	}

	p + p {
		margin-top: 0.5rem;
	}

	@media (max-width: 479px) {
		text-align: left;
	}
}

// Secondary copy: no box, no border — spacing + size only
.giftflow-thank-donor__note {
	max-width: $thank-donor-text-max;
	margin-inline: auto;
	margin-bottom: var(--gf-td-gap);
	padding: 0;
	padding-top: 0.5rem;
	margin-top: 0.125rem;
	// font-size: clamp(0.8125rem, 0.2vw + 0.78rem, 0.875rem);
	line-height: 1.6;
	// color: $text-light;
	text-align: center;
	border: none;
	background: transparent;
	box-sizing: border-box;

	p {
		margin: 0;
	}

	p + p {
		margin-top: 0.4rem;
	}

	a {
		color: color-mix(in srgb, $text-light 25%, $text-color);
		text-decoration: underline;
		text-decoration-thickness: 1px;
		text-underline-offset: 0.2em;
		transition: color $thank-donor-duration $thank-donor-ease;

		&:hover {
			color: $text-color;
		}

		&:focus-visible {
			outline: 2px solid $secondary-color;
			outline-offset: 2px;
			border-radius: 2px;
		}
	}

	@media (max-width: 479px) {
		text-align: left;
	}

	@media (min-width: 600px) {
		padding-top: 0.625rem;
		margin-bottom: calc(var(--gf-td-gap) + 0.25rem);
	}
}

.giftflow-thank-donor__cta {
	display: flex;
	justify-content: center;
	padding-top: 0.375rem;
}

// Flat CTA: no border, no shadow
.giftflow-thank-donor__btn {
	
}

.giftflow-thank-donor__btn-label {
	position: relative;
}

@media (prefers-reduced-motion: reduce) {
	.giftflow-thank-donor__mark,
	.giftflow-thank-donor__note a,
	.giftflow-thank-donor__btn {
		transition: none;
	}
}

// Classic full-page wrapper (templates/classic/thank-donor.php)
.gfw-thank-donor-page-main {
	max-width: 100%;
}

.gfw-thank-donor-page__header {
	margin-bottom: 0.5rem;
}

.gfw-thank-donor-page__title {
	margin: 0 0 1rem;
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.25;
	color: #1a1d21;
}
