/* AFC Giving front end: the progress tracker block and the "Giving to …" line on the Give page.
   Enqueued only when one of them renders (includes/giving.php). */

/* ---------- progress tracker */
.afc-progress {
	--afc-pg-ink: var(--wp--preset--color--ink, #211912); --afc-pg-accent: var(--wp--preset--color--clay, #b16148);
	position: relative; box-sizing: border-box; padding: 1.75rem 2rem; border-radius: 16px;
	background: #fff; border: 1px solid rgba(33, 25, 18, .08); box-shadow: 0 1px 2px rgba(33, 25, 18, .04), 0 18px 40px -28px rgba(33, 25, 18, .35);
	color: var(--afc-pg-ink);
}
.afc-progress > * { margin: 0; }
.afc-progress-heading { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; margin-bottom: 1.25rem; }
.afc-progress-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.75rem 2.5rem; }
.afc-progress-row > * { margin: 0; }
.afc-progress-figure { font-size: .95rem; line-height: 1.4; color: var(--wp--preset--color--ink-soft, #4c453e); }
.afc-progress-num { font-family: var(--wp--preset--font-family--serif, Georgia, serif); font-size: 2.25rem; line-height: 1; color: var(--afc-pg-ink); margin-right: .15rem; font-variant-numeric: tabular-nums; }
.afc-progress-segs { display: flex; gap: 6px; margin-top: 1rem; }
.afc-progress-seg { flex: 1; height: 10px; border-radius: 999px; background: rgba(33, 25, 18, .1); }
.afc-progress-seg.is-on { background: var(--afc-pg-accent); }
.afc-progress-bar { height: 10px; margin-top: 1rem; border-radius: 999px; background: rgba(33, 25, 18, .1); overflow: hidden; }
.afc-progress-bar span { display: block; height: 100%; border-radius: inherit; background: var(--afc-pg-accent); }
.afc-progress-updated { margin-top: 1.25rem; font-size: .78rem; color: var(--wp--preset--color--ink-muted, #6d665f); }
.afc-progress.is-preview { border: 1.5px dashed rgba(138, 75, 15, .45); background: repeating-linear-gradient(135deg, #fff 0 14px, #fffaf3 14px 28px); }
.afc-progress-flag {
	display: inline-flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: 1.25rem !important; padding: .35rem .8rem; border-radius: 999px;
	background: #fcf0e3; color: #8a4b0f; font-size: .78rem; line-height: 1.4;
}
.afc-progress-flag a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 600px) {
	.afc-progress { padding: 1.35rem 1.25rem; }
	.afc-progress-num { font-size: 1.9rem; }
}

/* ---------- Give page: selected project */
.afc-giving-context {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1rem; align-items: center;
	padding: .9rem 1.1rem; border-radius: 12px; background: #faf6f0; border: 1px solid #ecdfcd;
}
.afc-giving-context > * { margin: 0; }
.afc-giving-context-main > * { margin: 0; }
.afc-giving-context-for { font-size: .8rem; color: var(--wp--preset--color--ink-muted, #6d665f); }
.afc-giving-context-for strong { color: var(--wp--preset--color--ink, #211912); font-weight: 600; }
.afc-giving-context-choice { font-size: 1rem; margin-top: .15rem !important; color: var(--wp--preset--color--ink, #211912); }
.afc-giving-context-amt { font-family: var(--wp--preset--font-family--serif, Georgia, serif); font-size: 1.15rem; margin-left: .2rem; white-space: nowrap; }
.afc-giving-context-change { font-size: .82rem; color: var(--wp--preset--color--ink, #211912); text-decoration: underline; text-underline-offset: 3px; }
.afc-giving-context-note {
	grid-column: 1 / -1; display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; line-height: 1.45; color: var(--wp--preset--color--ink-soft, #4c453e);
	padding-top: .55rem; margin-top: .3rem !important; border-top: 1px solid #ecdfcd;
}
.afc-giving-context-note + .afc-giving-context-note { border-top: 0; padding-top: 0; margin-top: 0 !important; }
.afc-giving-context-note::before {
	content: ""; flex: none; width: 1rem; height: 1rem; margin-top: .1rem; border-radius: 50%;
	background: var(--wp--preset--color--clay, #b16148) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 4.2v4.6M8 11.2v.1' stroke='white' stroke-width='1.8' stroke-linecap='round'/></svg>") center / 100% no-repeat;
}
.afc-giving-context[hidden], .afc-giving-context [hidden] { display: none !important; }
.afc-giving-context, .afc-gift .afc-gift-panel > .afc-giving-context { margin: 0 1.5rem 1rem !important; }
@media (max-width: 600px) { .afc-giving-context, .afc-gift .afc-gift-panel > .afc-giving-context { margin: 0 1.1rem .9rem !important; } }
