/* MCF 捐款回條 — front-end form styles (scoped to .mcf-form / .mcf-result) */

.mcf-form,
.mcf-result {
	--mcf-primary: #8a1f2b;
	--mcf-border: #dcdcdc;
	--mcf-muted: #6b6b6b;
	--mcf-sunken: #f6f6f4;
	box-sizing: border-box;
	color: #222;
	line-height: 1.7;
}

.mcf-form *,
.mcf-result * {
	box-sizing: border-box;
}

.mcf-section {
	border: 1px solid var(--mcf-border);
	border-radius: 8px;
	padding: 18px 20px;
	margin: 0 0 18px;
}

.mcf-legend {
	font-weight: 700;
	font-size: 1.05em;
	padding: 0 8px;
	color: var(--mcf-primary);
}

.mcf-field {
	margin: 0 0 14px;
}

.mcf-field:last-child {
	margin-bottom: 0;
}

.mcf-label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}

.mcf-req {
	color: #c0392b;
}

.mcf-input {
	width: 100%;
	max-width: 480px;
	padding: 9px 11px;
	border: 1px solid var(--mcf-border);
	border-radius: 6px;
	font-size: 15px;
	background: #fff;
}

.mcf-input:focus {
	outline: 2px solid rgba(138, 31, 43, 0.25);
	border-color: var(--mcf-primary);
}

.mcf-input-inline {
	width: 130px;
	max-width: 130px;
	margin-left: 6px;
	display: inline-block;
}

.mcf-row-2 {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.mcf-row-2 > .mcf-field {
	flex: 1 1 220px;
}

.mcf-inline-opts,
.mcf-amount-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 18px;
}

.mcf-amount-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 18px;
}

.mcf-opt {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
	cursor: pointer;
}

.mcf-opt-wide {
	grid-column: 1 / -1;
}

.mcf-opt-strong {
	font-weight: 600;
}

.mcf-note {
	margin-top: 12px;
	padding: 10px 12px;
	background: var(--mcf-sunken);
	border-left: 3px solid var(--mcf-primary);
	border-radius: 4px;
	font-size: 0.95em;
}

.mcf-hint {
	margin: 6px 0 0;
	font-size: 0.9em;
	color: var(--mcf-muted);
}

.mcf-guide {
	margin-top: 14px;
}

.mcf-guide-box {
	border: 1px dashed var(--mcf-border);
	border-radius: 6px;
	padding: 12px 14px;
	background: #fbfbfa;
}

.mcf-guide-row {
	display: flex;
	gap: 12px;
	padding: 4px 0;
}

.mcf-guide-row .mcf-k {
	flex: 0 0 96px;
	color: var(--mcf-muted);
}

.mcf-guide-row .mcf-v {
	flex: 1 1 auto;
	font-weight: 600;
}

.mcf-qr {
	margin-top: 10px;
}

.mcf-qr img {
	max-width: 160px;
	height: auto;
	display: block;
}

.mcf-privacy {
	padding: 0;
	border: 0;
}

.mcf-privacy a {
	color: var(--mcf-primary);
}

.mcf-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 6px;
}

.mcf-btn {
	display: inline-block;
	padding: 11px 26px;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	font-size: 15px;
}

.mcf-btn-primary {
	background: var(--mcf-primary);
	color: #fff;
}

.mcf-btn-primary:hover {
	filter: brightness(1.08);
}

.mcf-btn-ghost {
	background: transparent;
	color: #444;
	border-color: var(--mcf-border);
}

.mcf-result {
	border-radius: 8px;
	padding: 20px 22px;
	margin: 0 0 20px;
}

.mcf-result h2 {
	margin: 0 0 8px;
	font-size: 1.25em;
}

.mcf-result p {
	margin: 0 0 6px;
}

.mcf-result-ok {
	background: #f2f8f3;
	border: 1px solid #bfe0c6;
}

.mcf-result-error {
	background: #fdf2f2;
	border: 1px solid #f0c2c2;
}

/* Disabled inline input (custom amount until "其他金額" is picked). */
.mcf-input-inline:disabled {
	background: var(--mcf-sunken);
	cursor: not-allowed;
}

/* Success pages: centre the message and keep the page footer at the bottom. */
body.mcf-result-page {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body.mcf-result-page footer,
body.mcf-result-page .site-footer,
body.mcf-result-page #colophon,
body.mcf-result-page #footer {
	margin-top: auto;
}

.mcf-result-ok {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	min-height: 55vh;
	width: 100%;
	max-width: 720px;
	margin: 0 auto 20px;
}

.mcf-result-ok h2 {
	font-size: 1.5em;
	margin-bottom: 12px;
}

@media (max-width: 560px) {
	.mcf-amount-grid {
		grid-template-columns: 1fr;
	}
}