/* MAA Formulär – uses the theme's colours when available. */
.maa-form {
	--mf-orange: var(--orange, #fd6100);
	--mf-ink: var(--ink, #161616);
	--mf-border: #8a8a8a;
	--mf-muted: var(--grey-700, #474747);
	--mf-err: var(--err, #b3261e);
	--mf-err-bg: var(--err-bg, #fdf0ef);
	--mf-radius: var(--radius-sm, 6px);
	max-width: 760px;
}
.maa-form .screen-reader-text, .maa-hp {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.maa-hp { left: -9999px; }
.maa-required-note { font-size: .95rem; color: var(--mf-muted); }
.maa-req { color: var(--mf-err); font-weight: 700; }
.maa-grid { display: grid; gap: 20px 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .maa-grid { grid-template-columns: 1fr 1fr; } .maa-wide { grid-column: 1 / -1; } }
.maa-field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--mf-ink); }
.maa-hint { margin: -2px 0 8px; font-size: .92rem; color: var(--mf-muted); }
.maa-field input[type=text], .maa-field input[type=email], .maa-field input[type=tel], .maa-field input[type=date], .maa-field select, .maa-field textarea {
	width: 100%; min-height: 50px; padding: 11px 14px;
	font: inherit; font-size: 1rem; color: var(--mf-ink);
	background: #fff; border: 2px solid var(--mf-border); border-radius: var(--mf-radius);
	transition: border-color .15s, box-shadow .15s;
}
.maa-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.maa-field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.maa-field input:focus-visible, .maa-field select:focus-visible, .maa-field textarea:focus-visible {
	outline: none; border-color: #0f0f0f; box-shadow: 0 0 0 3px var(--mf-orange);
}
.maa-field input[type=file] { display: block; width: 100%; padding: 14px; border: 2px dashed var(--mf-border); border-radius: var(--mf-radius); background: #fafaf8; font: inherit; font-size: .95rem; cursor: pointer; }
.maa-field input[type=file]:focus-visible { outline: 3px solid var(--mf-orange); outline-offset: 2px; }
.maa-field input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-right: 12px; padding: 10px 16px; border: 0; border-radius: var(--mf-radius); background: #0f0f0f; color: #fff; cursor: pointer; }
.maa-file-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: .92rem; color: var(--mf-muted); }
.maa-file-list li::before { content: "✓ "; color: var(--ok, #1d6b34); }
.maa-field.has-error input, .maa-field.has-error select, .maa-field.has-error textarea { border-color: var(--mf-err); }
.maa-error[hidden] { display: none; }
.maa-error { margin: 8px 0 0; color: var(--mf-err); font-weight: 600; font-size: .95rem; display: flex; gap: 6px; }
.maa-error::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 1.3em; height: 1.3em; border-radius: 50%; background: var(--mf-err); color: #fff; font-size: .8em; font-weight: 800; margin-top: .1em; }
.maa-summary { border: 2px solid var(--mf-err); background: var(--mf-err-bg); border-radius: var(--mf-radius); padding: 16px 18px; margin-bottom: 22px; }
.maa-summary:focus { outline: 3px solid var(--mf-orange); outline-offset: 2px; }
.maa-summary ul { margin: 6px 0 0; padding-left: 1.2em; }
.maa-summary a { color: var(--mf-err); font-weight: 600; }
.maa-summary p:last-child { margin: 0; }
.maa-note { margin: 24px 0 0; padding: 14px 16px; background: #fff4ec; border-left: 5px solid var(--mf-orange); border-radius: var(--mf-radius); }
.maa-actions { margin-top: 20px; }
.maa-submit { width: 100%; position: relative; }
@media (min-width: 640px) { .maa-submit { width: auto; min-width: 280px; } }
.maa-submit[disabled] { opacity: .75; cursor: progress; }
.maa-spinner { display: none; width: 18px; height: 18px; border: 3px solid rgb(0 0 0 / .25); border-top-color: #0f0f0f; border-radius: 50%; animation: maa-spin .8s linear infinite; }
.maa-form.is-sending .maa-spinner { display: inline-block; }
.maa-privacy { font-size: .92rem; color: var(--mf-muted); margin-top: 14px; }
.maa-success { max-width: 760px; padding: 28px; border-radius: var(--radius, 10px); background: #edf7ef; border: 2px solid #1d6b34; }
.maa-success:focus { outline: 3px solid var(--orange, #fd6100); outline-offset: 3px; }
.maa-success h2 { font-size: 1.4rem; margin-top: 0; color: #12471f; }
.maa-success p:last-child { margin-bottom: 0; }
.maa-admin-note { padding: 12px 16px; margin-bottom: 20px; background: #fff8e1; border: 2px solid #8a6d00; border-radius: 6px; font-size: .95rem; }
@keyframes maa-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .maa-spinner { animation-duration: 2s; } }
