/* Fosia Collect: the Pay / Donate form and its payment status.
   Uses the theme's font; colours are custom properties a theme can override, e.g.
   .fcol { --fcol-accent: #0f766e; } */
.fcol {
	--fcol-accent: #1959ff;
	--fcol-accent-ink: #ffffff;
	--fcol-accent-soft: #eef3ff;
	--fcol-surface: #ffffff;
	--fcol-ink: #101828;
	--fcol-text: #344054;
	--fcol-muted: #5d6679;
	--fcol-line: #d6dbe4;
	--fcol-field: #ffffff;
	--fcol-error: #b42318;
	--fcol-error-soft: #fef3f2;
	--fcol-ok: #067647;
	--fcol-ok-soft: #ecfdf3;
	--fcol-wait: #1d4ed8;
	--fcol-wait-soft: #eff4ff;
	--fcol-todo: #b54708;
	--fcol-todo-soft: #fffaeb;
	--fcol-radius: 14px;
	--fcol-radius-sm: 10px;
	box-sizing: border-box;
	width: 100%;
	max-width: 34rem;
	margin: 0 0 1.75rem;
	color: var(--fcol-text);
	font: inherit;
	line-height: 1.5;
	text-align: left;
}
.fcol.alignwide { max-width: 46rem; }
.fcol *, .fcol *::before, .fcol *::after { box-sizing: border-box; }
.fcol [hidden] { display: none !important; }
.fcol ::selection { background: var(--fcol-accent); color: var(--fcol-accent-ink); }

.fcol-card {
	margin: 0;
	padding: clamp(1.1rem, 4vw, 1.75rem);
	border: 1px solid var(--fcol-line);
	border-radius: var(--fcol-radius);
	background: var(--fcol-surface);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px -12px rgba(16, 24, 40, 0.14);
}
.fcol-form { display: flex; flex-direction: column; gap: 1.15rem; }

.fcol-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; }
.fcol .fcol-title {
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--fcol-ink);
	font-family: inherit;
	font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.6rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
	text-wrap: balance;
}
.fcol .fcol-text { margin: -0.4rem 0 0; color: var(--fcol-text); font-size: 1rem; max-width: 65ch; }
.fcol-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: var(--fcol-todo-soft);
	color: var(--fcol-todo);
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}
.fcol-badge--block { display: block; margin: 1rem 0 0; white-space: normal; border-radius: var(--fcol-radius-sm); }

/* Labels and fields */
.fcol-field { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; }
.fcol .fcol-label {
	display: block;
	margin: 0;
	padding: 0;
	color: var(--fcol-ink);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
}
.fcol .fcol-label--small { font-size: 0.9rem; }
.fcol-optional { color: var(--fcol-muted); font-weight: 400; }
.fcol .fcol-input {
	display: block;
	width: 100%;
	min-height: 3rem;
	margin: 0;
	padding: 0.7rem 0.85rem;
	border: 1.5px solid var(--fcol-line);
	border-radius: var(--fcol-radius-sm);
	background: var(--fcol-field);
	color: var(--fcol-ink);
	font: inherit;
	font-size: 1.0625rem;
	line-height: 1.3;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.fcol .fcol-input::placeholder { color: var(--fcol-muted); opacity: 1; }
.fcol .fcol-input:hover { border-color: #b3bccb; }
.fcol .fcol-input:focus { outline: none; border-color: var(--fcol-accent); box-shadow: 0 0 0 3px rgba(25, 89, 255, 0.22); }
.fcol .fcol-input[aria-invalid="true"] { border-color: var(--fcol-error); }
.fcol .fcol-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18); }
.fcol .fcol-textarea { min-height: 5.5rem; resize: vertical; }
.fcol .fcol-select {
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6679' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-position: right 0.75rem center;
	background-repeat: no-repeat;
	background-size: 1.1rem;
}
.fcol .fcol-hint { margin: 0; color: var(--fcol-muted); font-size: 0.875rem; line-height: 1.45; }

/* Field with a unit before or after (+250, RWF) */
.fcol-affix { position: relative; display: flex; align-items: stretch; }
.fcol-affix .fcol-input { flex: 1 1 auto; min-width: 0; font-variant-numeric: tabular-nums; }
.fcol-affix__unit {
	display: inline-flex;
	flex: none;
	align-items: center;
	padding: 0 0.85rem;
	border: 1.5px solid var(--fcol-line);
	background: #f5f7fa;
	color: var(--fcol-text);
	font-size: 1rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.fcol-affix:not(.fcol-affix--lead) .fcol-input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.fcol-affix:not(.fcol-affix--lead) .fcol-affix__unit { border-left: 0; border-radius: 0 var(--fcol-radius-sm) var(--fcol-radius-sm) 0; }
.fcol-affix--lead .fcol-input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.fcol-affix--lead .fcol-affix__unit { border-right: 0; border-radius: var(--fcol-radius-sm) 0 0 var(--fcol-radius-sm); }

/* Amounts */
.fcol .fcol-amounts { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.fcol .fcol-amounts legend { margin-bottom: 0.6rem; }
.fcol-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.25rem), 1fr)); gap: 0.6rem; }
@media (max-width: 420px) {
	.fcol-chips { grid-template-columns: 1fr 1fr; }
	.fcol-chip--other:nth-child(odd) { grid-column: 1 / -1; }
}
.fcol-chip { position: relative; display: block; margin: 0; cursor: pointer; }
.fcol-chip input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.fcol-chip__face {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0.15rem 0.3rem;
	min-height: 3.5rem;
	padding: 0.75rem 0.5rem;
	border: 1.5px solid var(--fcol-line);
	border-radius: var(--fcol-radius-sm);
	background: var(--fcol-field);
	color: var(--fcol-ink);
	text-align: center;
	transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.fcol-chip__num { font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fcol-chip__cur { color: var(--fcol-muted); font-size: 0.8rem; font-weight: 600; }
.fcol-chip:hover .fcol-chip__face { border-color: #b3bccb; }
.fcol-chip input:checked + .fcol-chip__face {
	border-color: var(--fcol-accent);
	background: var(--fcol-accent-soft);
	box-shadow: inset 0 0 0 1.5px var(--fcol-accent);
}
.fcol-chip input:checked + .fcol-chip__face .fcol-chip__cur { color: var(--fcol-accent); }
.fcol-chip input:focus-visible + .fcol-chip__face { outline: 3px solid rgba(25, 89, 255, 0.4); outline-offset: 2px; }
.fcol-chip input:active + .fcol-chip__face { transform: scale(0.98); }
.fcol-other { margin-top: 0.2rem; }
/* "Your amount" only once "Other" is picked (without the script too, in browsers that know :has). */
.fcol-amounts:not(:has(input[value="other"]:checked)) .fcol-other { display: none; }
.fcol-other[hidden] { display: none; }

/* Fixed amount */
.fcol-fixed {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	padding: 0.9rem 1rem;
	border-radius: var(--fcol-radius-sm);
	background: var(--fcol-accent-soft);
}
.fcol-fixed__label { color: var(--fcol-text); font-weight: 600; }
.fcol-fixed__value { color: var(--fcol-ink); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.015em; }

/* Checkbox */
.fcol-check { display: flex; gap: 0.6rem; align-items: flex-start; margin: -0.35rem 0 0; color: var(--fcol-text); font-size: 0.95rem; cursor: pointer; }
.fcol-check input { flex: none; width: 1.15rem; height: 1.15rem; margin: 0.15rem 0 0; accent-color: var(--fcol-accent); }

/* Errors */
.fcol .fcol-error { display: flex; gap: 0.4rem; align-items: flex-start; margin: 0; color: var(--fcol-error); font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.fcol .fcol-error .fcol-icon { width: 1.1rem; height: 1.1rem; flex: none; margin-top: 0.05rem; }
.fcol-alert {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	padding: 0.85rem 1rem;
	border: 1px solid #fecdca;
	border-radius: var(--fcol-radius-sm);
	background: var(--fcol-error-soft);
	color: var(--fcol-error);
}
.fcol-alert:focus { outline: none; }
.fcol-alert p { margin: 0; color: #912018; font-weight: 600; }
.fcol-alert .fcol-icon { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; }

/* Submit */
.fcol .fcol-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	width: 100%;
	min-height: 3.4rem;
	margin: 0.2rem 0 0;
	padding: 0.8rem 1.25rem;
	border: 0;
	border-radius: var(--fcol-radius-sm);
	background: var(--fcol-accent);
	color: var(--fcol-accent-ink);
	font: inherit;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1), 0 6px 16px -8px rgba(25, 89, 255, 0.6);
	transition: filter 0.15s ease, transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.15s ease;
}
.fcol .fcol-submit:hover { filter: brightness(0.93); color: var(--fcol-accent-ink); }
.fcol .fcol-submit:active { transform: translateY(1px); }
.fcol .fcol-submit:focus-visible { outline: 3px solid rgba(25, 89, 255, 0.45); outline-offset: 3px; }
.fcol .fcol-submit .fcol-icon { width: 1.25rem; height: 1.25rem; transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1); }
.fcol .fcol-submit:hover .fcol-icon { transform: translateX(3px); }
.fcol .fcol-submit[aria-busy="true"] { cursor: progress; filter: saturate(0.7); }
.fcol .fcol-submit[aria-busy="true"] .fcol-icon { animation: fcol-spin 0.9s linear infinite; }
.fcol .fcol-submit--inline { width: auto; min-height: 2.9rem; font-size: 1rem; }
.fcol-estimate { margin: -0.4rem 0 -0.2rem; color: var(--fcol-text); font-size: 0.92rem; font-variant-numeric: tabular-nums; text-align: center; }
.fcol-estimate[hidden] { display: none; }
.fcol .fcol-assure {
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
	justify-content: center;
	margin: -0.3rem 0 0;
	color: var(--fcol-muted);
	font-size: 0.85rem;
	line-height: 1.45;
	text-align: left;
}
.fcol-assure .fcol-icon { flex: none; width: 1rem; height: 1rem; margin-top: 0.1rem; color: var(--fcol-ok); }

/* Honeypot: off-screen for people, there for robots */
.fcol-trap { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Status after PawaPay */
.fcol-state { --fcol-tone: var(--fcol-todo); --fcol-tone-soft: var(--fcol-todo-soft); display: flex; gap: 1rem; align-items: flex-start; border-color: color-mix(in srgb, var(--fcol-tone) 28%, var(--fcol-line)); }
.fcol-state--ok { --fcol-tone: var(--fcol-ok); --fcol-tone-soft: var(--fcol-ok-soft); }
.fcol-state--wait { --fcol-tone: var(--fcol-wait); --fcol-tone-soft: var(--fcol-wait-soft); }
.fcol-state--error { --fcol-tone: var(--fcol-error); --fcol-tone-soft: var(--fcol-error-soft); }
.fcol-state__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--fcol-tone-soft);
	color: var(--fcol-tone);
}
.fcol-state__icon .fcol-icon { width: 1.6rem; height: 1.6rem; }
.fcol-state__body { flex: 1 1 auto; min-width: 0; }
.fcol .fcol-state__title { margin: 0.2rem 0 0.45rem; padding: 0; border: 0; color: var(--fcol-ink); font-family: inherit; font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.45rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
.fcol .fcol-state__title:focus { outline: none; }
.fcol .fcol-state__text { margin: 0 0 0.4rem; max-width: 60ch; }
.fcol .fcol-state__checked { margin: 0.4rem 0 0; color: var(--fcol-muted); font-size: 0.85rem; }
.fcol .fcol-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 1rem 0 0; padding: 0.9rem 0 0; border-top: 1px solid var(--fcol-line); font-size: 0.95rem; }
.fcol .fcol-facts div { display: contents; }
.fcol .fcol-facts dt { margin: 0; color: var(--fcol-muted); font-weight: 400; }
.fcol .fcol-facts dd { margin: 0; color: var(--fcol-ink); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fcol-facts__soft { color: var(--fcol-muted); font-weight: 400; }
.fcol-facts__ref { letter-spacing: 0.04em; }
.fcol-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.1rem 0 0; }
.fcol-inline { margin: 0; }
.fcol .fcol-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.9rem;
	padding: 0.65rem 1.1rem;
	border: 1.5px solid var(--fcol-line);
	border-radius: var(--fcol-radius-sm);
	background: var(--fcol-surface);
	color: var(--fcol-ink);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}
.fcol .fcol-btn:hover { border-color: #9aa4b5; background: #f7f8fa; color: var(--fcol-ink); }
.fcol .fcol-btn:focus-visible { outline: 3px solid rgba(25, 89, 255, 0.45); outline-offset: 2px; }
.fcol .fcol-btn--primary { border-color: var(--fcol-accent); background: var(--fcol-accent); color: var(--fcol-accent-ink); }
.fcol .fcol-btn--primary:hover { background: var(--fcol-accent); color: var(--fcol-accent-ink); filter: brightness(0.93); }
.fcol-card--notice { border-style: dashed; box-shadow: none; }
.fcol-card--notice .fcol-text { margin: 0.6rem 0 0; }

.fcol-spin { animation: fcol-spin 1.1s linear infinite; }
.fcol-state.is-stopped .fcol-spin { animation: none; }
@keyframes fcol-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
	.fcol-state { flex-direction: column; gap: 0.75rem; }
	.fcol-actions > * { flex: 1 1 100%; }
	.fcol-actions .fcol-submit--inline, .fcol-actions .fcol-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.fcol *, .fcol *::before, .fcol *::after { transition: none !important; animation: none !important; }
}
