/* Dockery Ministries Donations — form styles.
   Font family is inherited from the theme so the form sits naturally in any section.
   Change the accent colour under Donations → Settings. */

.dmd {
	--dmd-accent: #3b2f63;
	--dmd-ink: #22232a;
	--dmd-muted: #5f6070;
	--dmd-line: #d9d9e0;
	--dmd-surface: #ffffff;
	--dmd-soft: #f6f5f9;
	--dmd-danger: #b3261e;
	--dmd-radius: 6px;

	box-sizing: border-box;
	max-width: 580px;
	margin: 0 auto;
	padding: clamp(22px, 4vw, 40px);
	background: var(--dmd-surface);
	color: var(--dmd-ink);
	border-top: 4px solid var(--dmd-accent);
	border-radius: 2px 2px var(--dmd-radius) var(--dmd-radius);
	box-shadow: 0 1px 2px rgba(34, 35, 42, .06), 0 12px 32px -12px rgba(34, 35, 42, .18);
	font-family: inherit;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}

.dmd *,
.dmd *::before,
.dmd *::after { box-sizing: border-box; }

.dmd-form { margin: 0; }

.dmd-head { margin-bottom: 28px; }

.dmd .dmd-title {
	margin: 0 0 8px;
	font-family: inherit;
	font-size: clamp(1.5rem, 3.2vw, 1.9rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--dmd-ink);
	letter-spacing: -0.01em;
}

.dmd .dmd-intro {
	margin: 0;
	color: var(--dmd-muted);
	font-size: 1rem;
	max-width: 46ch;
}

.dmd-group {
	margin: 0 0 20px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.dmd .dmd-label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-size: .92rem;
	font-weight: 600;
	color: var(--dmd-ink);
}

.dmd-optional { font-weight: 400; color: var(--dmd-muted); }

/* Amount selection — the centrepiece of the form */
.dmd-chips {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
	gap: 8px;
	margin-bottom: 10px;
}

.dmd .dmd-chip {
	appearance: none;
	margin: 0;
	padding: 14px 8px;
	font: inherit;
	font-size: 1.2rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	color: var(--dmd-ink);
	background: var(--dmd-surface);
	border: 1.5px solid var(--dmd-line);
	border-radius: var(--dmd-radius);
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: none;
	transition: background-color .15s, border-color .15s, color .15s;
}

.dmd .dmd-chip:hover { border-color: var(--dmd-accent); background: var(--dmd-surface); color: var(--dmd-ink); }

.dmd .dmd-chip[aria-pressed="true"] {
	background: var(--dmd-accent);
	border-color: var(--dmd-accent);
	color: #fff;
}

.dmd-custom {
	position: relative;
	display: block;
	margin: 0;
}

.dmd-custom-symbol {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-weight: 700;
	color: var(--dmd-muted);
	pointer-events: none;
}

.dmd .dmd-custom-input { padding-left: 32px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Inputs */
.dmd .dmd-input,
.dmd .dmd-custom-input {
	display: block;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--dmd-ink);
	background: var(--dmd-surface);
	border: 1px solid var(--dmd-line);
	border-radius: var(--dmd-radius);
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}

.dmd textarea.dmd-input { resize: vertical; min-height: 84px; }

.dmd select.dmd-input {
	appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6070' stroke-width='1.6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.dmd .dmd-input:focus,
.dmd .dmd-custom-input:focus {
	outline: none;
	border-color: var(--dmd-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--dmd-accent) 22%, transparent);
}

.dmd .dmd-chip:focus-visible,
.dmd .dmd-submit:focus-visible,
.dmd .dmd-check input:focus-visible {
	outline: 2px solid var(--dmd-accent);
	outline-offset: 2px;
}

.dmd-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 14px;
}

.dmd-payment-element { min-height: 120px; }

/* Cover fees */
.dmd .dmd-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 4px 0 22px;
	padding: 12px 14px;
	background: var(--dmd-soft);
	border-radius: var(--dmd-radius);
	font-size: .92rem;
	font-weight: 400;
	color: var(--dmd-ink);
	cursor: pointer;
}

.dmd .dmd-check input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--dmd-accent);
}

/* Messages */
.dmd-error,
.dmd-notice {
	margin: 0 0 16px;
	padding: 12px 14px;
	font-size: .93rem;
	color: var(--dmd-danger);
	background: color-mix(in srgb, var(--dmd-danger) 7%, #fff);
	border-left: 3px solid var(--dmd-danger);
	border-radius: 2px;
}

.dmd-error[hidden] { display: none; }

/* Submit */
.dmd .dmd-submit {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 16px 20px;
	font: inherit;
	font-size: 1.1rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.2;
	color: #fff;
	background: var(--dmd-accent);
	border: 0;
	border-radius: var(--dmd-radius);
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	transition: filter .15s;
}

.dmd .dmd-submit:hover { filter: brightness(1.12); color: #fff; background: var(--dmd-accent); }
.dmd .dmd-submit[disabled] { cursor: progress; filter: saturate(.6) brightness(1.1); }

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

.dmd.is-busy .dmd-spinner { display: inline-block; }

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

.dmd .dmd-fineprint {
	display: flex;
	gap: 6px;
	align-items: center;
	justify-content: center;
	margin: 14px 0 0;
	font-size: .8rem;
	color: var(--dmd-muted);
	text-align: center;
}

.dmd .dmd-testmode {
	margin: 12px 0 0;
	padding: 8px 10px;
	font-size: .8rem;
	text-align: center;
	color: #7a5200;
	background: #fff6dd;
	border-radius: 4px;
}

/* Honeypot */
.dmd-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Thank-you state */
.dmd-thanks {
	padding: 12px 0;
	text-align: center;
	outline: none;
}

.dmd-thanks[hidden] { display: none; }

.dmd-thanks-mark {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	color: var(--dmd-accent);
}

.dmd .dmd-thanks-title {
	margin: 0 0 10px;
	font-family: inherit;
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--dmd-ink);
}

.dmd .dmd-thanks-text {
	margin: 0 auto;
	max-width: 42ch;
	color: var(--dmd-muted);
}

.dmd-thanks.is-new .dmd-thanks-mark path {
	stroke-dasharray: 40;
	stroke-dashoffset: 40;
	animation: dmd-draw .5s .15s ease-out forwards;
}

@keyframes dmd-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 520px) {
	.dmd-row { grid-template-columns: 1fr; }
	.dmd-chips { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.dmd *,
	.dmd *::before,
	.dmd *::after { animation: none !important; transition: none !important; }
	.dmd-thanks.is-new .dmd-thanks-mark path { stroke-dashoffset: 0; }
}
