/*
 * Contacto (/contacto/) — CONTACT-01D / 01D.1 visual spec (docs/CONTACT01D_UX.md §3, §9, §10).
 * Styles the server-rendered smq/contact-form component (smq-contact plugin) inside the existing
 * .smq-page-hero + .smq-page-section page system. Tokens from tokens.css only; every selector is
 * scoped to .smq-contact*. The CTA reuses .smq-course-cta-primary unchanged (colour/size) — its former
 * contrast debt (white on --smq-blue-interactive ≈ 3.9:1) was fixed in the primitive itself by DS-A11Y-01
 * (white on --smq-blue-interactive-strong 5.13:1), never here.
 * The only literal pixel values are the frozen 01D.1 measures with no equivalent token (40/56 section
 * padding, 20/14/6 rhythm, 144px textarea, 48px targets).
 */

/* Section: 01D.1 padding 40 / 56, refined in F6.1 (human visual review) to 32 / 56 so the intro sits
   closer to the hero and the saved space goes to the field rhythm below. Width stays the shared
   760px .smq-page-section-inner (16px gutters under 768px come from page-hero.css). */
.smq-page-section.smq-contact-section {
	padding: var(--smq-space-5) 0 56px;
}

.smq-contact {
	font-family: var(--smq-font-text);
	color: var(--smq-navy-950);
	line-height: 1.6;
	/* PRG lands on #smq-contact; keep a little air above it (no sticky header on this site). */
	scroll-margin-top: var(--smq-space-3);
}

/* Orientation note: light neutral treatment — lightest gray surface, no border (F6.1: the hairline read
   as a separate technical box), no icon, no radius, no alert colour. Then 16px to the required-fields
   note and 20px to the first field (01D §3 was 20 / 14; F6.1 moves the air from the intro to the start
   of the fields). */
.smq-contact .smq-contact-orientation {
	margin: 0;
	padding: 12px var(--smq-space-3);
	background: var(--smq-gray-50);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--smq-navy-700);
}
.smq-contact .smq-contact-required-note {
	margin: var(--smq-space-3) 0 20px;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--smq-gray-600);
}

/* Form: ~640px working width inside the 760px section. */
.smq-contact-form {
	max-width: 640px;
	margin: 0;
}

/* Field rhythm (01D.1): 20px between groups, 6px label / helper / error / control. */
.smq-contact-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 20px;
	min-width: 0;
}
/* Labels 1rem / 600 stay one step above the 15px helpers. */
.smq-contact-label,
.smq-contact-legend {
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--smq-navy-950);
}
.smq-contact .smq-contact-helper {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--smq-gray-600);
}

/* Controls: 48px targets, 16px text (no iOS zoom), gray-400 border (≥3:1 on white). Focus uses the
   global :focus-visible outline from site.css. */
.smq-contact-input,
.smq-contact-select,
.smq-contact-textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 14px;
	font-family: var(--smq-font-text);
	font-size: 1rem;
	line-height: 1.5;
	color: var(--smq-navy-950);
	background: var(--smq-white);
	border: 1px solid var(--smq-gray-400);
	border-radius: 4px;
}
.smq-contact-select {
	padding-block: 10px;
}
/* 01D.1: ~5 rows / 144px, vertical resize only. */
.smq-contact-textarea {
	min-height: 144px;
	resize: vertical;
}

/* Errors: not colour-only — bold text next to the field, 2px red border on the control. Text stays
   navy (the red token is below 4.5:1 for small text on white); red is used for non-text marks only. */
.smq-contact .smq-contact-error {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	font-weight: 600;
	color: var(--smq-navy-950);
}
.smq-contact-field--invalid .smq-contact-input,
.smq-contact-field--invalid .smq-contact-select,
.smq-contact-field--invalid .smq-contact-textarea {
	border: 2px solid var(--smq-red-500);
	padding: 11px 13px;
}
.smq-contact-field--invalid .smq-contact-select {
	padding-block: 9px;
}

/* Privacy: fieldset/legend semantics kept, visual reset; whole row clickable through the label.
   F6.1: 12px checkbox/text gap, checkbox centred on the first text line (4px padding + 12.8px half
   line − 10px half box ≈ 7px), label padded into a ≥44px click row, 32px before the CTA (28 + 4). */
.smq-contact-privacy {
	border: 0;
	padding: 0;
	margin: 0 0 28px;
}
.smq-contact-legend {
	padding: 0;
	margin: 0 0 var(--smq-space-2);
}
.smq-contact-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}
.smq-contact-checkbox input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 7px 0 0;
	accent-color: var(--smq-blue-interactive);
	cursor: pointer;
}
.smq-contact-checkbox-label {
	flex: 1 1 auto;
	min-width: 0;
	padding: 4px 0;
	font-size: 1rem;
	line-height: 1.6;
	cursor: pointer;
}
.smq-contact-field--invalid .smq-contact-checkbox input[type="checkbox"] {
	outline: 2px solid var(--smq-red-500);
	outline-offset: 2px;
}

/* G4B2: first-layer data-protection information (CONTACT01D §6 details/summary, no JS). Native
   disclosure keeps keyboard/AT behaviour; summary target ≥ 28px; body in the helper scale (15px). */
.smq-contact-privacy-info {
	margin: 0 0 12px;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: var(--smq-gray-600);
}
.smq-contact-privacy-summary {
	min-height: 28px;
	padding: 2px 0;
	color: var(--smq-navy-950);
	font-weight: 600;
	cursor: pointer;
}
.smq-contact-privacy-list {
	margin: var(--smq-space-2) 0 0;
	padding: 12px var(--smq-space-3);
	background: var(--smq-gray-50);
}
.smq-contact-privacy-item + .smq-contact-privacy-item {
	margin-top: 8px;
}
.smq-contact-privacy-item dt {
	font-weight: 600;
	color: var(--smq-navy-950);
}
.smq-contact-privacy-item dd {
	margin: 0;
}

/* Links on the light surface: navy + underline (the interactive blue is below 4.5:1 as text). */
.smq-contact a {
	color: var(--smq-navy-950);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.smq-contact a:hover {
	color: var(--smq-blue-brand);
}

/* CTA: existing .smq-course-cta-primary (colour, radius, weight untouched). Button-element reset,
   +4px before it (01D.1). F6.1: more presence on desktop — 52px height, wider 40px side padding and
   1rem text; still natural width (full width only under 768px). Focus outline recoloured for the
   white surface only — the primitive's white outline is designed for dark bands. */
.smq-contact-submit.smq-course-cta-primary {
	min-height: 52px;
	padding: 14px 40px;
	font-size: 1rem;
	justify-content: center;
	margin-top: var(--smq-space-1);
	border: 0;
	cursor: pointer;
}
.smq-contact-submit.smq-course-cta-primary:focus-visible {
	outline: 3px solid var(--smq-navy-950);
	outline-offset: 3px;
}

/* States: restrained panels on the gray-50 surface; a 3px left mark carries the tone (neutral /
   confirmation / problem) — the heading and text always state it too. */
.smq-contact-status,
.smq-contact-summary,
.smq-contact-context {
	margin: 0 0 var(--smq-space-4);
	padding: 20px var(--smq-space-4);
	background: var(--smq-gray-50);
	border: 1px solid var(--smq-gray-200);
	border-left: 3px solid var(--smq-gray-400);
}
.smq-contact-status--success {
	border-left-color: var(--smq-green-500);
}
.smq-contact-status--server-error,
.smq-contact-summary {
	border-left-color: var(--smq-red-500);
}
.smq-contact-status-title,
.smq-contact-summary-title {
	margin: 0 0 var(--smq-space-2);
	font-family: var(--smq-font-display);
	font-weight: 700;
	font-size: 1.35rem;
	line-height: 1.25;
	color: var(--smq-navy-950);
}
.smq-contact-summary-title {
	font-size: 1.1rem;
}
.smq-contact .smq-contact-status-lead,
.smq-contact .smq-contact-status-text,
.smq-contact .smq-contact-summary-text {
	margin: 0 0 var(--smq-space-2);
}
.smq-contact-status > :last-child,
.smq-contact-summary > :last-child,
.smq-contact-context > :last-child {
	margin-bottom: 0;
}
.smq-contact-summary:focus {
	outline: 3px solid var(--smq-blue-interactive);
	outline-offset: 2px;
}
.smq-contact-summary-list {
	margin: 0;
	padding-left: 1.2em;
}
.smq-contact-summary-list li + li {
	margin-top: var(--smq-space-1);
}

/* Reference: readable mono value that wraps instead of overflowing on narrow screens. */
.smq-contact .smq-contact-ref {
	margin: var(--smq-space-3) 0;
}
.smq-contact-ref-label {
	display: block;
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--smq-gray-600);
}
.smq-contact-ref-value {
	font-family: var(--smq-font-mono);
	font-size: 1.15rem;
	font-weight: 500;
	overflow-wrap: anywhere;
}

/* Verified-context notice (F9): same eyebrow language as the page hero, on the light surface. */
.smq-contact .smq-contact-context-label {
	margin: 0 0 var(--smq-space-1);
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--smq-gray-600);
}
.smq-contact .smq-contact-context-title {
	margin: 0 0 var(--smq-space-1);
	font-weight: 600;
}
.smq-contact .smq-contact-context-meta,
.smq-contact .smq-contact-context-action {
	margin: 0 0 var(--smq-space-1);
	font-size: 0.9rem;
	color: var(--smq-gray-600);
}

/* Long unbroken input (emails, refs, pasted text) never widens the page. */
.smq-contact-status,
.smq-contact-summary,
.smq-contact-context,
.smq-contact-checkbox-label {
	overflow-wrap: anywhere;
}

/* Baseline responsive (WEB-014): 375 / 768 / 1440px. */
@media (max-width: 768px) {
	.smq-page-section.smq-contact-section {
		padding: var(--smq-space-5) 0 var(--smq-space-6);
	}
	.smq-contact-submit.smq-course-cta-primary {
		display: flex;
		width: 100%;
	}
	.smq-contact-status,
	.smq-contact-summary,
	.smq-contact-context {
		padding: var(--smq-space-3);
	}
}
