/* DSM donation and registration forms. */

.dsm-layout-forms .content-area,
.dsm-layout-forms .site-main,
.dsm-layout-forms #primary{
	margin: 0;
	padding: 0;
	max-width: none;
}

.dsm-form-page{
	position: relative;
}

.dsm-donation-accounts,
.dsm-donation-steps,
.dsm-form-section{
	padding-block: var(--dsm-section-space);
}

.dsm-donation-accounts,
.dsm-form-section{
	background: #fff;
}

.dsm-donation-steps{
	background: var(--dsm-background);
}

.dsm-form-section-heading{
	max-width: 760px;
	margin-bottom: 30px;
}

.dsm-form-section-heading h2{
	margin: 0 0 var(--dsm-space-sm);
}

.dsm-form-section-heading p:last-child{
	margin-bottom: 0;
	color: var(--dsm-muted);
}

.dsm-account-grid{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
	gap: var(--dsm-grid-gap);
}

/* A simple stack inside the shared card: currency, number, copy action. */
.dsm-account-card{
	align-items: flex-start;
	gap: var(--dsm-space-md);
}

.dsm-account-card div span,
.dsm-account-card div strong{
	display: block;
}

.dsm-account-card div span{
	margin-bottom: 4px;
	color: var(--dsm-muted);
}

.dsm-account-card div strong{
	font-family: var(--dsm-font-heading);
	font-size: var(--dsm-h3);
	color: var(--dsm-footer-bg);
}

.dsm-account-card code{
	overflow-wrap: anywhere;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: clamp(1.25rem, 3vw, 2rem);
	font-weight: 700;
	letter-spacing: 0.045em;
	color: #075985;
}

.dsm-account-copy{
	min-height: 44px;
	padding: 9px 14px;
	border: 1px solid var(--dsm-cta);
	border-radius: var(--dsm-radius-btn);
	background: #fff;
	font-weight: 700;
	color: #075985;
	cursor: pointer;
	transition: background-color var(--dsm-transition), color var(--dsm-transition);
}

.dsm-account-copy:hover{
	background: #e0f2fe;
}

.dsm-account-note{
	margin: 22px 0 0;
	padding-left: 16px;
	border-left: 3px solid var(--dsm-cta);
	color: var(--dsm-muted);
}

.dsm-donation-steps__grid{
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dsm-donation-steps__grid li{
	display: flex;
	align-items: flex-start;
	gap: var(--dsm-space-md);
	padding: var(--dsm-card-pad);
	border: 1px solid var(--dsm-border-subtle);
	border-radius: var(--dsm-radius-card);
	background: var(--card);
}

.dsm-donation-steps__grid li > span{
	display: grid;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	place-items: center;
	border-radius: 50%;
	background: #075985;
	font-weight: 700;
	color: #fff;
}

.dsm-donation-steps__grid strong{
	display: block;
	margin-bottom: 6px;
	font-family: var(--dsm-font-heading);
	color: var(--dsm-footer-bg);
}

.dsm-donation-steps__grid p{
	margin: 0;
	color: var(--dsm-muted);
}

.dsm-form-layout{
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
	align-items: start;
	gap: clamp(28px, 5vw, 60px);
}

/* Chrome comes from .dsm-card; the form card only widens its own padding. */
.dsm-form-card{
	border: 1px solid var(--dsm-border);
	border-radius: var(--dsm-radius-card);
	background: var(--card);
	box-shadow: var(--dsm-shadow-sm);
	padding: var(--dsm-card-pad);
}

.dsm-form-card__heading h2{
	margin: 0 0 var(--dsm-space-sm);
}

.dsm-form-card__heading > p:last-child{
	margin: 0;
	color: var(--dsm-muted);
}

.dsm-form-unavailable,
.dsm-form-status{
	margin: var(--dsm-space-lg) 0;
	padding: var(--dsm-space-md) var(--dsm-space-lg);
	border-radius: var(--dsm-radius-btn);
}

.dsm-form-unavailable{
	border: 1px solid #f59e0b;
	background: #fffbeb;
	color: #78350f;
}

.dsm-form-unavailable p,
.dsm-form-status p{
	margin: 4px 0 0;
}

.dsm-form{
	margin-top: 28px;
}

.dsm-form-grid{
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.dsm-form-field > label:not(.dsm-form-consent){
	display: block;
	margin-bottom: 7px;
	font-weight: 700;
	color: var(--dsm-footer-bg);
}

.dsm-form-field input[type="file"]{
	padding: 10px;
	background: #f8fafc;
}

.dsm-form-field input:disabled,
.dsm-form-field textarea:disabled,
.dsm-form-field select:disabled{
	cursor: not-allowed;
	opacity: 1;
	border-color: #cbd5e1;
	background-color: #f1f5f9;
	color: #475569;
	-webkit-text-fill-color: #475569;
}

.dsm-form-actions button:disabled{
	background-color: #cbd5e1;
	border: 1px solid #94a3b8;
	color: #334155;
	box-shadow: none;
	cursor: not-allowed;
	opacity: 1;
}

.dsm-form-required,
.dsm-form-error{
	color: #b91c1c;
}

.dsm-form-help,
.dsm-form-error{
	margin: 6px 0 0;
	font-size: 0.875rem;
}

.dsm-form-help{
	color: var(--dsm-muted);
}

.dsm-form-consent{
	display: flex;
	align-items: flex-start;
	gap: 12px;
	color: var(--dsm-text);
}

.dsm-form-consent input{
	width: 20px;
	height: 20px;
	min-height: 20px;
	margin-top: 3px;
}

.dsm-form-actions{
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--dsm-border);
}

.dsm-form-actions p{
	margin: 0;
	font-size: 0.875rem;
	color: var(--dsm-muted);
}

.dsm-form-honeypot{
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.dsm-form-aside h2{
	margin-top: 0;
	font-size: var(--dsm-h3);
}

.dsm-form-aside ul{
	margin: 0;
	padding-left: 20px;
}

.dsm-form-aside li + li{
	margin-top: 10px;
}

.dsm-form-aside__contact{
	display: grid;
	gap: 8px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--dsm-border);
}

.dsm-form-aside__contact strong{
	color: var(--dsm-footer-bg);
}

@media (max-width: 1023px) {
	.dsm-form-hero__inner,
	.dsm-form-layout {
		grid-template-columns: 1fr;
	}

	.dsm-form-hero__badge {
		max-width: 560px;
	}

	.dsm-form-aside {
		position: static;
	}
}

@media (max-width: 767px) {
	.dsm-account-grid,
	.dsm-donation-steps__grid,
	.dsm-form-grid {
		grid-template-columns: 1fr;
	}

	.dsm-form-field--wide {
		grid-column: auto;
	}

	.dsm-account-card {
		grid-template-columns: 1fr;
	}

	.dsm-account-card code,
	.dsm-account-copy {
		grid-column: auto;
	}

	.dsm-account-copy {
		width: 100%;
	}

	.dsm-form-actions {
		align-items: stretch;
		flex-direction: column;
	}

	.dsm-form-actions .dsm-btn {
		width: 100%;
	}
}

/* ==========================================================================
   Consolidated from ui-polish.css — field states and the guidance rail.
   ========================================================================== */
.dsm-form-field input:not([type="checkbox"]),
.dsm-form-field textarea,
.dsm-form-field select{
	width: 100%;
	min-height: 50px;
	border-width: 1.5px;
	border-color: #b8ccda;
	background: #fbfdfe;
}

.dsm-form-field input:focus,
.dsm-form-field textarea:focus,
.dsm-form-field select:focus{
	border-color: var(--dsm-cta);
	background: var(--dsm-white);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--dsm-primary) 24%, transparent);
}

.dsm-form-field input:user-invalid,
.dsm-form-field textarea:user-invalid,
.dsm-form-field select:user-invalid{
	border-color: #b91c1c;
}

/* The rail follows the form on desktop and stops following once stacked. */
.dsm-form-aside{
	position: sticky;
	top: 7rem;
	border-top: 4px solid var(--dsm-accent-coral);
	box-shadow: var(--dsm-shadow-editorial);
}

.dsm-form-aside__privacy{
	margin: var(--dsm-space-md) 0 0;
	color: var(--dsm-muted);
	font-size: var(--dsm-text-sm);
	line-height: 1.6;
}

@media (max-width: 1023px) {
	.dsm-form-aside {
		position: static;
	}
}

/* Modifier classes composed at render time (status, badge, side). */
.dsm-form-unavailable,
.dsm-form-status--notice {
	border: 1px solid #f59e0b;
	background: #fffbeb;
	color: #78350f;
}

.dsm-form-status--error {
	border: 1px solid #dc2626;
	background: #fef2f2;
	color: #7f1d1d;
}

.dsm-form-status--success {
	border: 1px solid #15803d;
	background: #f0fdf4;
	color: #14532d;
}
