/* Paystack Donate — celebratory thank-you view, shown in place of the form once a
   payment is confirmed. Themed from --pd-brand/--pd-accent (same as the form) rather
   than fixed hex values, and self-contained (doesn't rely on inheriting variables from
   .pd-donate, since this renders as its sibling, not its child). */

.pd-thankyou {
	--pd-brand-alt: #1F5C66;
	--pd-ink: #1D2B2C;
	--pd-ink-soft: #5C6B6C;
	--pd-border: #E3E9E7;

	position: relative;
	max-width: 1560px;
	width: 100%;
	margin: 0 auto;
	font-family: 'Baloo 2', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--pd-ink) !important;
	background:
		radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--pd-accent) 12%, transparent), transparent 45%),
		radial-gradient(circle at 85% 90%, color-mix(in srgb, var(--pd-brand) 12%, transparent), transparent 45%),
		linear-gradient(180deg, color-mix(in srgb, var(--pd-brand) 8%, #fff 92%) 0%, #F7FBF6 45%, #FFFFFF 100%);
	border-radius: 18px;
	overflow: hidden;
}
.pd-thankyou *, .pd-thankyou *::before, .pd-thankyou *::after { box-sizing: border-box; }
.pd-thankyou[hidden] { display: none; }

/* Same reasoning as donation-form.css: this view can be styled by the theme's own
   font-family rules on body/button/etc. unless every element is forced explicitly. */
.pd-thankyou, .pd-thankyou * {
	font-family: 'Baloo 2', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.pd-thankyou .sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== Ambient floating hearts + one-time confetti ===== */
.pd-thankyou__float { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.pd-thankyou__heart { position: absolute; opacity: 0; animation: pd-ty-float linear infinite; }
@keyframes pd-ty-float {
	0% { transform: translateY(20px) rotate(0deg) scale(.6); opacity: 0; }
	10% { opacity: .5; }
	85% { opacity: .35; }
	100% { transform: translateY(-460px) rotate(25deg) scale(1); opacity: 0; }
}
.pd-thankyou__confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.pd-thankyou__confetti-piece {
	position: absolute; top: 0; left: 0; opacity: 0;
	animation-name: pd-ty-confetti; animation-timing-function: cubic-bezier(.15,.75,.3,1); animation-fill-mode: forwards;
}
@keyframes pd-ty-confetti {
	0% { transform: translate(0,0) rotate(0deg); opacity: 1; }
	65% { opacity: 1; }
	100% { transform: translate(var(--tx), var(--ty)) rotate(var(--rot)); opacity: 0; }
}

/* ===== Page ===== */
.pd-thankyou__page {
	position: relative; z-index: 1; max-width: 720px; margin: 0 auto;
	padding: 56px 24px 40px; display: flex; flex-direction: column; align-items: center; text-align: center;
}

/* ===== Success badge ===== */
.pd-thankyou__badge {
	position: relative; width: 130px; height: 130px; display: flex; align-items: center; justify-content: center;
	margin-bottom: 22px; opacity: 0; animation: pd-ty-pop .7s cubic-bezier(.34,1.56,.64,1) .1s forwards;
}
.pd-thankyou__badge-glow {
	position: absolute; inset: 0; border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--pd-brand) 30%, transparent), transparent 70%);
	animation: pd-ty-glow 2.6s ease-in-out infinite;
}
.pd-thankyou__badge-ring {
	position: absolute; inset: 6px; border-radius: 50%;
	border: 2px solid color-mix(in srgb, var(--pd-brand) 35%, transparent);
	animation: pd-ty-ring 2.6s ease-out infinite;
}
.pd-thankyou__badge-circle {
	position: relative; width: 92px; height: 92px; border-radius: 50%;
	background: linear-gradient(145deg, var(--pd-brand) 0%, color-mix(in srgb, var(--pd-brand) 75%, #000 25%) 100%);
	box-shadow: 0 12px 28px color-mix(in srgb, var(--pd-brand) 35%, transparent), inset 0 -4px 8px rgba(0,0,0,.08), inset 0 3px 6px rgba(255,255,255,.25);
	display: flex; align-items: center; justify-content: center;
}
.pd-thankyou__badge-circle svg { width: 44px; height: 44px; }
.pd-thankyou__check {
	fill: none; stroke: #fff; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round;
	stroke-dasharray: 40; stroke-dashoffset: 40; animation: pd-ty-draw .5s ease .5s forwards;
}
@keyframes pd-ty-pop { 0% { opacity: 0; transform: scale(.4) rotate(-15deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes pd-ty-glow { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.18); opacity: .5; } }
@keyframes pd-ty-ring { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes pd-ty-draw { to { stroke-dashoffset: 0; } }

/* ===== Headline ===== */
.pd-thankyou__title {
	font-weight: 800; font-size: clamp(36px, 6vw, 50px); color: var(--pd-brand-alt) !important; line-height: 1.05;
	opacity: 0; transform: translateY(14px); animation: pd-ty-up .6s ease .3s forwards;
}
.pd-thankyou__headline {
	margin-top: 6px; font-weight: 800; font-size: clamp(20px, 3.4vw, 28px); color: var(--pd-brand) !important;
	opacity: 0; transform: translateY(14px); animation: pd-ty-up .6s ease .45s forwards;
}
.pd-thankyou__subtext {
	margin-top: 16px; max-width: 560px; color: var(--pd-ink-soft) !important; font-size: 15.5px; line-height: 1.65; font-weight: 500;
	opacity: 0; transform: translateY(14px); animation: pd-ty-up .6s ease .58s forwards;
}
.pd-thankyou__subtext strong { color: var(--pd-brand-alt) !important; }

.pd-thankyou__impact {
	margin-top: 10px; display: inline-flex; align-items: center; gap: 8px;
	background: color-mix(in srgb, var(--pd-accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--pd-accent) 40%, transparent);
	color: color-mix(in srgb, var(--pd-brand) 80%, #000 20%) !important; font-weight: 700; font-size: 13.5px; padding: 8px 16px; border-radius: 999px;
	opacity: 0; transform: translateY(14px); animation: pd-ty-up .6s ease .66s forwards;
}
.pd-thankyou__impact svg { width: 15px; height: 15px; flex-shrink: 0; }

.pd-thankyou__divider { display: flex; align-items: center; gap: 14px; margin: 24px 0 20px; opacity: 0; animation: pd-ty-up .6s ease .74s forwards; }
.pd-thankyou__divider span { width: 56px; height: 1px; background: linear-gradient(90deg, transparent, var(--pd-border)); }
.pd-thankyou__divider span:last-child { background: linear-gradient(90deg, var(--pd-border), transparent); }
.pd-thankyou__divider svg { width: 17px; height: 17px; color: var(--pd-brand) !important; animation: pd-ty-heartbeat 1.6s ease-in-out infinite; }
@keyframes pd-ty-heartbeat { 0%,100% { transform: scale(1); } 25% { transform: scale(1.2); } 40% { transform: scale(1); } }

.pd-thankyou__tagline {
	font-weight: 600; color: var(--pd-ink) !important; font-size: 14.5px; margin-bottom: 30px;
	opacity: 0; animation: pd-ty-up .6s ease .8s forwards;
}
@keyframes pd-ty-up { to { opacity: 1; transform: translateY(0); } }

/* ===== Live stats ===== */
.pd-thankyou__stats {
	width: 100%; max-width: 460px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 34px;
	opacity: 0; animation: pd-ty-up .6s ease .88s forwards;
}
.pd-thankyou__stat {
	background: linear-gradient(160deg, color-mix(in srgb, var(--pd-brand-alt) 6%, transparent), color-mix(in srgb, var(--pd-brand) 6%, transparent));
	border: 1px solid var(--pd-border); border-radius: 14px; padding: 16px 8px;
}
.pd-thankyou__stat-value { font-weight: 800; font-size: clamp(17px,2.6vw,22px); color: var(--pd-brand-alt) !important; font-variant-numeric: tabular-nums; }
.pd-thankyou__stat-label { font-size: 11px; font-weight: 600; color: var(--pd-ink-soft) !important; margin-top: 4px; }

/* ===== Journey ===== */
.pd-thankyou__journey { width: 100%; max-width: 580px; margin: 0 auto 40px; opacity: 0; animation: pd-ty-up .6s ease .95s forwards; }
.pd-thankyou__journey-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pd-ink-soft) !important; margin-bottom: 16px; }
.pd-thankyou__journey-steps { display: flex; align-items: flex-start; justify-content: space-between; position: relative; }
.pd-thankyou__journey-track { position: absolute; top: 15px; left: 32px; right: 32px; height: 3px; background: var(--pd-border); border-radius: 3px; overflow: hidden; z-index: 0; }
.pd-thankyou__journey-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--pd-brand), var(--pd-accent)); border-radius: 3px; animation: pd-ty-fill 1.4s ease 1.3s forwards; }
@keyframes pd-ty-fill { to { width: 78%; } }
.pd-thankyou__journey-step {
	position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 25%;
	opacity: 0; transform: translateY(8px); animation: pd-ty-up .5s ease forwards;
}
.pd-thankyou__journey-step:nth-child(2) { animation-delay: 1s; }
.pd-thankyou__journey-step:nth-child(3) { animation-delay: 1.1s; }
.pd-thankyou__journey-step:nth-child(4) { animation-delay: 1.2s; }
.pd-thankyou__step-dot {
	width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: #fff; border: 2.5px solid var(--pd-brand); color: var(--pd-brand) !important; margin-bottom: 7px;
}
.pd-thankyou__step-dot svg { width: 14px; height: 14px; }
.pd-thankyou__journey-step.pd-is-pending .pd-thankyou__step-dot {
	border-color: var(--pd-border); color: var(--pd-ink-soft) !important; animation: pd-ty-dot-pulse 1.6s ease-in-out infinite;
}
@keyframes pd-ty-dot-pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pd-accent) 35%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.pd-thankyou__step-label { font-size: 12px; font-weight: 700; color: var(--pd-ink) !important; }
.pd-thankyou__step-sub { font-size: 10px; color: var(--pd-ink-soft) !important; font-weight: 500; }

/* ===== Actions ===== */
.pd-thankyou__actions {
	display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; position: relative;
	opacity: 0; animation: pd-ty-up .6s ease 1.35s forwards;
}
.pd-thankyou__btn {
	display: inline-flex; align-items: center; gap: 8px; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 14px;
	padding: 13px 22px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; position: relative; overflow: hidden;
	text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.pd-thankyou__btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.pd-thankyou__btn:active { transform: scale(.96); }

.pd-thankyou__btn--primary {
	background: linear-gradient(135deg, var(--pd-brand) 0%, color-mix(in srgb, var(--pd-brand) 75%, #000 25%) 100%) !important;
	color: #fff !important; box-shadow: 0 10px 22px color-mix(in srgb, var(--pd-brand) 32%, transparent);
}
.pd-thankyou__btn--primary:hover { transform: translateY(-2px); }

.pd-thankyou__btn--outline { background: #fff !important; color: color-mix(in srgb, var(--pd-brand) 80%, #000 20%) !important; border-color: var(--pd-brand) !important; }
.pd-thankyou__btn--outline:hover { background: color-mix(in srgb, var(--pd-brand) 8%, #fff 92%) !important; transform: translateY(-2px); }

.pd-thankyou__btn--dark-outline { background: #fff !important; color: var(--pd-brand-alt) !important; border-color: var(--pd-brand-alt) !important; }
.pd-thankyou__btn--dark-outline:hover { background: color-mix(in srgb, var(--pd-brand-alt) 6%, #fff 94%) !important; transform: translateY(-2px); }

.pd-thankyou__ripple {
	position: absolute; border-radius: 50%; background: rgba(255,255,255,.5); transform: scale(0);
	animation: pd-ty-ripple .6s ease-out forwards; pointer-events: none;
}
.pd-thankyou__btn--outline .pd-thankyou__ripple, .pd-thankyou__btn--dark-outline .pd-thankyou__ripple { background: color-mix(in srgb, var(--pd-brand) 25%, transparent); }
@keyframes pd-ty-ripple { to { transform: scale(3); opacity: 0; } }

/* ===== Share popover ===== */
.pd-thankyou__share-wrap { position: relative; }
.pd-thankyou__share-popover {
	position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(6px) scale(.96);
	background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.16); border: 1px solid var(--pd-border);
	padding: 12px; display: flex; gap: 8px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 20;
}
.pd-thankyou__share-popover.pd-is-open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0) scale(1); }
.pd-thankyou__share-opt {
	width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: #F6FBF6; color: var(--pd-brand-alt) !important; border: 1px solid var(--pd-border); cursor: pointer;
	transition: transform .2s ease, background .2s ease; text-decoration: none;
}
.pd-thankyou__share-opt:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--pd-brand) 10%, #fff 90%); }
.pd-thankyou__share-opt svg { width: 17px; height: 17px; }

.pd-thankyou__signature {
	font-weight: 700; font-size: 16px; color: color-mix(in srgb, var(--pd-brand) 80%, #000 20%) !important;
	display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
	opacity: 0; animation: pd-ty-up .6s ease 1.45s forwards;
}
.pd-thankyou__signature svg { width: 17px; height: 17px; color: var(--pd-brand) !important; animation: pd-ty-heartbeat 1.6s ease-in-out infinite; }

/* ===== Footer ===== */
.pd-thankyou__footer {
	width: 100%; max-width: 620px; border-top: 1px solid var(--pd-border); margin-top: 24px; padding-top: 18px;
	display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: center;
	opacity: 0; animation: pd-ty-up .6s ease 1.55s forwards;
}
.pd-thankyou__foot-item { font-size: 12px; font-weight: 600; color: var(--pd-ink-soft) !important; }
.pd-thankyou__foot-item a { color: var(--pd-brand-alt) !important; text-decoration: none; font-weight: 700; }
.pd-thankyou__foot-item a:hover { text-decoration: underline; }

/* ===== Toasts ===== */
.pd-thankyou__toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 9999; align-items: center; }
.pd-thankyou__toast {
	display: flex; align-items: center; gap: 10px; background: var(--pd-brand-alt) !important; color: #fff !important; font-weight: 600;
	font-size: 13px; padding: 11px 17px; border-radius: 999px; box-shadow: 0 20px 50px rgba(0,0,0,.16);
	opacity: 0; transform: translateY(14px); animation: pd-ty-toast-in .35s ease forwards, pd-ty-toast-out .35s ease 2.4s forwards;
}
.pd-thankyou__toast svg { width: 15px; height: 15px; color: var(--pd-accent) !important; flex-shrink: 0; }
@keyframes pd-ty-toast-in { to { opacity: 1; transform: translateY(0); } }
@keyframes pd-ty-toast-out { to { opacity: 0; transform: translateY(-10px); } }

@media (max-width: 640px) {
	.pd-thankyou__actions { flex-direction: column; width: 100%; }
	.pd-thankyou__btn { width: 100%; justify-content: center; }
	.pd-thankyou__journey-track { left: 16px; right: 16px; }
	.pd-thankyou__step-label { font-size: 10.5px; }
	.pd-thankyou__step-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.pd-thankyou *, .pd-thankyou *::before, .pd-thankyou *::after {
		animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
	}
	.pd-thankyou__heart, .pd-thankyou__confetti-piece { display: none !important; }
}

@media print {
	.pd-thankyou__float, .pd-thankyou__confetti, .pd-thankyou__toasts, .pd-thankyou__actions,
	.pd-thankyou__share-popover, .pd-thankyou__divider, .pd-thankyou__stats, .pd-thankyou__journey { display: none !important; }
	.pd-thankyou { background: #fff !important; }
	.pd-thankyou__page { padding: 20px; }
	.pd-thankyou__badge { width: 70px; height: 70px; margin-bottom: 10px; }
	.pd-thankyou__badge-circle { width: 52px; height: 52px; }
	.pd-thankyou__title { font-size: 28px; }
	.pd-thankyou__headline { font-size: 18px; }
}
