/**
 * GBZ Donations — front-end styles.
 * Mobile-first, SaaS-style, green/blue trust palette.
 */

.gbzdf-wrap {
	--gbzdf-blue: #2563eb;
	--gbzdf-blue-dark: #1d4ed8;
	--gbzdf-green: #16a34a;
	--gbzdf-green-dark: #15803d;
	--gbzdf-ink: #0f172a;
	--gbzdf-muted: #64748b;
	--gbzdf-line: #e2e8f0;
	--gbzdf-bg: #f8fafc;
	--gbzdf-radius: 12px;
	--gbzdf-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);

	box-sizing: border-box;
	max-width: 520px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--gbzdf-ink);
}

.gbzdf-wrap *,
.gbzdf-wrap *::before,
.gbzdf-wrap *::after {
	box-sizing: inherit;
}

.gbzdf-card {
	background: #fff;
	border: 1px solid var(--gbzdf-line);
	border-radius: var(--gbzdf-radius);
	box-shadow: var(--gbzdf-shadow);
	padding: 28px;
}

.gbzdf-card--notice {
	text-align: center;
	color: var(--gbzdf-muted);
}

.gbzdf-form__header {
	text-align: center;
	margin-bottom: 22px;
}

.gbzdf-form__title {
	margin: 0 0 6px;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.2;
}

.gbzdf-form__subtitle {
	margin: 0;
	color: var(--gbzdf-muted);
	font-size: 0.95rem;
}

.gbzdf-field {
	margin-bottom: 18px;
}

.gbzdf-label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--gbzdf-ink);
}

.gbzdf-input {
	width: 100%;
	padding: 12px 14px;
	font-size: 1rem;
	color: var(--gbzdf-ink);
	background: #fff;
	border: 1px solid var(--gbzdf-line);
	border-radius: 10px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gbzdf-input:focus {
	outline: none;
	border-color: var(--gbzdf-blue);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* Amount grid */
.gbzdf-amounts {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

@media (min-width: 420px) {
	.gbzdf-amounts {
		grid-template-columns: repeat(4, 1fr);
	}
}

.gbzdf-amount {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 14px 8px;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--gbzdf-ink);
	background: var(--gbzdf-bg);
	border: 1.5px solid var(--gbzdf-line);
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}

.gbzdf-amount:hover {
	border-color: var(--gbzdf-blue);
}

.gbzdf-amount:active {
	transform: translateY(1px);
}

.gbzdf-amount:focus-visible {
	outline: none;
	border-color: var(--gbzdf-blue);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.gbzdf-amount.is-selected {
	color: #fff;
	background: var(--gbzdf-blue);
	border-color: var(--gbzdf-blue);
}

.gbzdf-amount__symbol {
	font-size: 0.9em;
	opacity: 0.85;
}

/* Custom amount */
.gbzdf-custom {
	position: relative;
	display: flex;
	align-items: center;
}

.gbzdf-custom__symbol {
	position: absolute;
	left: 14px;
	color: var(--gbzdf-muted);
	font-weight: 600;
	pointer-events: none;
}

.gbzdf-custom__input {
	padding-left: 30px;
}

/* Gateways */
.gbzdf-gateways {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.gbzdf-gateway {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border: 1.5px solid var(--gbzdf-line);
	border-radius: 10px;
	cursor: pointer;
	font-weight: 600;
}

.gbzdf-gateway input {
	accent-color: var(--gbzdf-blue);
}

/* Submit */
.gbzdf-submit {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 14px 18px;
	margin-top: 4px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
	background: var(--gbzdf-green);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.gbzdf-submit:hover {
	background: var(--gbzdf-green-dark);
}

.gbzdf-submit:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
}

.gbzdf-submit[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.gbzdf-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: gbzdf-spin 0.7s linear infinite;
}

.gbzdf-submit.is-loading .gbzdf-spinner {
	display: inline-block;
}

@keyframes gbzdf-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Inline message */
.gbzdf-message {
	min-height: 1.2em;
	margin: 14px 0 0;
	font-size: 0.9rem;
	text-align: center;
}

.gbzdf-message--error {
	color: #b91c1c;
}

.gbzdf-message--success {
	color: var(--gbzdf-green-dark);
}

/* Toasts */
.gbzdf-toast-region {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: calc(100vw - 32px);
}

.gbzdf-toast {
	padding: 14px 18px;
	border-radius: 10px;
	color: #fff;
	font-size: 0.92rem;
	font-weight: 600;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.gbzdf-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.gbzdf-toast--success {
	background: var(--gbzdf-green);
}

.gbzdf-toast--error {
	background: #dc2626;
}

.gbzdf-toast--info {
	background: var(--gbzdf-blue);
}

@media (prefers-reduced-motion: reduce) {
	.gbzdf-toast,
	.gbzdf-amount,
	.gbzdf-input,
	.gbzdf-submit {
		transition: none;
	}

	.gbzdf-spinner {
		animation-duration: 1.5s;
	}
}
