/**
 * Shire Fire Doors — Stage B confirmation block.
 *
 * Every custom property falls back to the value the child theme currently ships,
 * so this renders correctly whether or not brand-tokens.md has been folded into
 * the theme yet.
 *
 * Colour rules from brand-tokens.md that this file obeys:
 *   · brand red on white is AA at body size (5.30) — safe for the rule and the button
 *   · the deeper red #A81F1D (7.29) carries any small text
 *   · flame orange and amber are graphic colours and appear on no text here
 */

.sfd-cq {
	margin: 1.75rem 0 0;
	padding: 1.5rem 1.5rem 1.25rem;
	background: var(--paper-alt, #f7f5f3);
	border: 1px solid var(--line, #dfd9d4);
	border-left: 4px solid var(--brand-red, #ce2927);
	border-radius: 3px;
	max-width: 62ch;
}

.sfd-cq--pending {
	border-left-color: var(--line, #dfd9d4);
	background: transparent;
	border-color: transparent;
	padding: 1rem 0 0;
}

.sfd-cq__pending {
	margin: 0;
	color: var(--ink-muted, #5c554f);
	font-size: 0.95rem;
	font-style: italic;
}

.sfd-cq__title {
	margin: 0 0 0.6rem;
	font-family: var(--sfd-font-heading, var(--global-heading-font-family, sans-serif));
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--ink, #231f20);
}

.sfd-cq__summary,
.sfd-cq__lead,
.sfd-cq__reassure,
.sfd-cq__closing {
	font-family: var(--sfd-font-body, var(--global-body-font-family, serif));
	line-height: var(--sfd-leading-prose, 1.7);
	color: var(--ink, #231f20);
}

.sfd-cq__summary {
	margin: 0 0 1.1rem;
}

.sfd-cq__lead {
	margin: 0 0 0.9rem;
	font-weight: 600;
}

/* ── the questions ────────────────────────────────────────────────────────── */

.sfd-cq__form {
	margin: 0;
}

.sfd-cq__field + .sfd-cq__field {
	margin-top: 1rem;
}

.sfd-cq__q {
	display: block;
	margin-bottom: 0.4rem;
	font-family: var(--sfd-font-heading, var(--global-heading-font-family, sans-serif));
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1.45;
	color: var(--ink, #231f20);
}

.sfd-cq__a {
	display: block;
	width: 100%;
	padding: 0.6rem 0.7rem;
	font: inherit;
	font-family: var(--sfd-font-body, var(--global-body-font-family, serif));
	font-size: 1rem;
	line-height: 1.5;
	color: var(--ink, #231f20);
	background: #fff;
	border: 1px solid var(--line, #dfd9d4);
	border-radius: 3px;
	resize: vertical;
	min-height: 2.9rem;
	box-sizing: border-box;
}

.sfd-cq__a:focus {
	outline: 2px solid var(--brand-red, #ce2927);
	outline-offset: 1px;
	border-color: var(--brand-red, #ce2927);
}

/* ── actions ──────────────────────────────────────────────────────────────── */

.sfd-cq__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.1rem;
	margin-top: 1.2rem;
}

.sfd-cq__send,
.sfd-cq__skip {
	font-family: var(--sfd-font-heading, var(--global-heading-font-family, sans-serif));
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
}

.sfd-cq__send {
	padding: 0.65rem 1.3rem;
	color: #fff;
	background: var(--brand-red, #ce2927);
	border: 1px solid var(--brand-red, #ce2927);
	border-radius: 3px;
}

.sfd-cq__send:hover:not(:disabled),
.sfd-cq__send:focus-visible {
	background: var(--brand-red-deep, #a81f1d);
	border-color: var(--brand-red-deep, #a81f1d);
}

.sfd-cq__send:disabled {
	opacity: 0.6;
	cursor: default;
}

/* The skip is a real, reachable control, not a faint afterthought — a visitor
   must be able to leave without answering and without hunting for how. */
.sfd-cq__skip {
	padding: 0.65rem 0;
	color: var(--brand-red-deep, #a81f1d);
	background: none;
	border: 0;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sfd-cq__skip:hover:not(:disabled),
.sfd-cq__skip:focus-visible {
	color: var(--ink, #231f20);
}

.sfd-cq__send:focus-visible,
.sfd-cq__skip:focus-visible {
	outline: 2px solid var(--ink, #231f20);
	outline-offset: 2px;
}

.sfd-cq__reassure {
	margin: 0.9rem 0 0;
	font-size: 0.95rem;
	color: var(--ink-muted, #5c554f);
}

.sfd-cq__closing {
	margin: 0;
}

.sfd-cq--done {
	border-left-color: var(--ok, #2d6042);
}

/* ── small screens ────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.sfd-cq {
		padding: 1.15rem 1.1rem 1rem;
	}
	.sfd-cq__actions {
		flex-direction: column;
		align-items: stretch;
	}
	.sfd-cq__send {
		width: 100%;
	}
	.sfd-cq__skip {
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sfd-cq,
	.sfd-cq * {
		transition: none !important;
	}
}
