/* Hope at Home – Write to your MP. Fonts inherit from the theme. */
.wtm {
	--wtm-accent: #612367;
	--wtm-accent-dark: #481a4d;
	--wtm-highlight: #18b4c5;
	--wtm-text: inherit;
	--wtm-muted: #6c757d;
	--wtm-border: #d5d0d8;
	--wtm-bg: #f7f4f8;
	--wtm-error: #b3261e;
	--wtm-success: #1e7a46;
	--wtm-radius: 6px;
	max-width: 720px;
	margin: 0 auto 2em;
	color: var(--wtm-text);
}

.wtm [hidden] { display: none !important; }

.wtm-step {
	background: var(--wtm-bg);
	border-radius: var(--wtm-radius);
	padding: 1.5em;
	margin: 1.5em 0;
}

.wtm h3 { margin-top: 0; }

.wtm label,
.wtm legend {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35em;
}

.wtm fieldset { border: 0; padding: 0; margin: 1.25em 0 0; }

.wtm input[type="text"],
.wtm input[type="email"],
.wtm input[type="tel"],
.wtm textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65em 0.75em;
	border: 1px solid var(--wtm-border);
	border-radius: var(--wtm-radius);
	background: #fff;
	font: inherit;
	color: inherit;
}

.wtm textarea { line-height: 1.5; resize: vertical; }

.wtm input:focus,
.wtm textarea:focus,
.wtm button:focus-visible,
.wtm summary:focus-visible {
	outline: 3px solid var(--wtm-highlight);
	outline-offset: 1px;
}

.wtm-inline { display: flex; gap: 0.5em; flex-wrap: wrap; }
.wtm-inline input { flex: 1 1 10em; max-width: 14em; text-transform: uppercase; }

.wtm-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9em 1em;
}
.wtm-field--wide { grid-column: 1 / -1; }
@media (max-width: 560px) {
	.wtm-grid { grid-template-columns: 1fr; }
}

.wtm-field { margin-top: 0.9em; }
.wtm-grid .wtm-field { margin-top: 0; }

.wtm .wtm-check {
	display: flex;
	gap: 0.6em;
	align-items: flex-start;
	font-weight: normal;
	line-height: 1.5;
	margin: 0.5em 0;
	cursor: pointer;
}
/*
 * One line tall, control centred inside: whatever size the theme draws
 * radios/checkboxes, they line up with the first line of the label.
 */
.wtm-box {
	display: flex;
	align-items: center;
	flex: none;
	height: 1.5em;
	height: 1lh;
}
.wtm .wtm-box input { margin: 0; }

.wtm-optional,
.wtm-hint { color: var(--wtm-muted); font-weight: normal; }
.wtm-hint { font-size: 0.95em; margin: 0.25em 0 0.9em; }

.wtm button.wtm-btn {
	display: inline-block;
	background: var(--wtm-accent) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: var(--wtm-radius);
	padding: 0.7em 1.4em;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}
.wtm button.wtm-btn:hover { background: var(--wtm-accent-dark) !important; }
.wtm button.wtm-btn:disabled { opacity: 0.6; cursor: wait; }
.wtm button.wtm-btn--lg { margin-top: 1.25em; padding: 0.9em 2em; font-size: 1.1em; }

.wtm button.wtm-link {
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	color: var(--wtm-accent) !important;
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
	font-size: 0.9em;
}

.wtm-mp {
	display: flex;
	gap: 1em;
	align-items: center;
	background: #fff;
	border-left: 4px solid var(--wtm-accent);
	border-radius: var(--wtm-radius);
	padding: 1em;
	margin-bottom: 1em;
}
.wtm-mp p { margin: 0; }
.wtm-mp__img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.wtm-mp__label { color: var(--wtm-muted); font-size: 0.85em; }
.wtm-mp__name { font-size: 1.25em; font-weight: 700; }
.wtm-mp__meta { font-size: 0.95em; margin-bottom: 0.25em !important; }

.wtm-count {
	font-size: 1.1em;
	color: var(--wtm-accent);
}
.wtm-count strong { font-size: 1.4em; }

.wtm-status:empty { display: none; }
.wtm-status {
	padding: 0.75em 1em;
	border-radius: var(--wtm-radius);
	background: #fff;
	border-left: 4px solid var(--wtm-highlight);
	margin: 1em 0;
}
.wtm-status--error { border-left-color: var(--wtm-error); color: var(--wtm-error); }
.wtm-status--warn { border-left-color: #ffb236; background: #fff8e8; }
.wtm-status--success { border-left-color: var(--wtm-success); color: var(--wtm-success); }

.wtm-field--invalid input,
.wtm-field--invalid textarea { border-color: var(--wtm-error); }
.wtm-error { color: var(--wtm-error); font-size: 0.9em; margin: 0.3em 0 0; }

.wtm-notice {
	padding: 0.75em 1em;
	background: var(--wtm-bg);
	border-left: 4px solid var(--wtm-accent);
	border-radius: var(--wtm-radius);
}
.wtm-notice--warn { border-left-color: #ffb236; background: #fff8e8; }

.wtm-download { font-size: 0.95em; }

.wtm-questions .wtm-q { margin: 0 0 1.25em; }
.wtm-letter-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1em;
	flex-wrap: wrap;
}
.wtm-preview {
	background: #fff;
	border: 1px solid var(--wtm-border);
	border-radius: var(--wtm-radius);
	padding: 1em 1.25em;
	white-space: pre-wrap;
	line-height: 1.55;
	font-size: 0.95em;
}
.wtm-preview .wtm-ins {
	background: #f1e6f3;
	color: inherit;
	padding: 0 0.15em;
	border-radius: 3px;
}
.wtm-preview .wtm-gap {
	color: var(--wtm-muted);
	font-style: italic;
	border-bottom: 1px dashed var(--wtm-muted);
}

.wtm-stay {
	margin-top: 1.5em;
	padding-top: 1.25em;
	border-top: 1px solid var(--wtm-border);
}
.wtm-stay fieldset { margin-top: 0; }
.wtm .wtm-stay button.wtm-btn {
	background: transparent !important;
	color: var(--wtm-accent) !important;
	border: 2px solid var(--wtm-accent) !important;
	padding: 0.5em 1.2em;
	margin-top: 0.5em;
}
.wtm .wtm-stay button.wtm-btn:hover { background: var(--wtm-bg) !important; }

.wtm-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
