/*
 * Aspnäset – anmälan till stämma.
 * Samma formspråk som ändringsformuläret: färger och typsnitt från temats presets med reservvärden.
 */
.astm-wrap {
	--astm-text: var(--wp--preset--color--text, #1d2a24);
	--astm-muted: var(--wp--preset--color--dampad, #4a5a52);
	--astm-green-dark: var(--wp--preset--color--gron-mork, #1f4e3d);
	--astm-green: var(--wp--preset--color--gron, #3f8a1f);
	--astm-leaf: var(--wp--preset--color--lov, #86c440);
	--astm-sage: var(--wp--preset--color--salvia, #e9efe2);
	--astm-line: var(--wp--preset--color--linje, #e2ded3);
	--astm-field-line: #cfcabd;
	--astm-white: var(--wp--preset--color--vit, #ffffff);
	--astm-error: #a4262c;
	--astm-error-bg: #fdf0ef;
	--astm-error-line: #efc9c6;
	--astm-serif: var(--wp--preset--font-family--literata, Literata, Georgia, serif);
	max-width: 40rem;
	margin: 0 auto;
	color: var(--astm-text);
}
.astm-wrap *,
.astm-wrap *::before,
.astm-wrap *::after { box-sizing: border-box; }
.astm-wrap strong { font-weight: 700; }

/* ===== Stämmans uppgifter ===== */
.astm-info {
	background: var(--astm-sage);
	border-radius: 16px;
	padding: 1.25rem 1.5rem;
	margin: 0 0 1.5rem;
}
.astm-info__title {
	margin: 0 0 .6rem;
	font-family: var(--astm-serif);
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--astm-green-dark);
}
.astm-info dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: .2rem 1rem;
	margin: 0;
}
.astm-info dt { font-weight: 700; }
.astm-info dd { margin: 0; }

.astm-intro { margin: 0 0 1.5rem; }

/* ===== Formulär ===== */
.astm-form {
	background: var(--astm-white);
	border: 1px solid var(--astm-line);
	border-radius: 16px;
	padding: 1.75rem 1.75rem .5rem;
}
.astm-grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 0 1.25rem;
}
.astm-field { margin: 0 0 1.25rem; min-width: 0; }
.astm-label {
	display: block;
	margin: 0 0 .4rem;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}
.astm-req { color: var(--astm-error); font-weight: 700; }
.astm-optional { color: var(--astm-muted); font-weight: 400; font-size: .9em; }

.astm-wrap input[type="text"],
.astm-wrap input[type="email"],
.astm-wrap input[type="number"] {
	display: block;
	width: 100%;
	margin: 0;
	padding: 12px 14px;
	min-height: 48px;
	border: 1px solid var(--astm-field-line);
	border-radius: 10px;
	background: var(--astm-white);
	color: var(--astm-text);
	font-family: inherit;
	font-size: 16px; /* 16px hindrar zoom i iOS */
	font-weight: 400;
	line-height: 1.4;
	box-shadow: none;
}
.astm-wrap input:hover { border-color: #b9b3a3; }
.astm-wrap input:focus {
	outline: 2px solid var(--astm-green);
	outline-offset: 0;
	border-color: var(--astm-green);
}
.astm-help {
	margin: .4rem 0 0;
	font-size: .875rem;
	line-height: 1.45;
	color: var(--astm-muted);
}

.astm-actions { margin: .5rem 0 1.25rem; }
.astm-wrap .astm-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 14px 30px;
	border: 0;
	border-radius: 999px;
	background: var(--astm-green-dark);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .15s;
}
.astm-wrap .astm-submit:hover { background: #2b6650; }
.astm-wrap .astm-submit:focus-visible { outline: 3px solid var(--astm-leaf); outline-offset: 2px; }

/* ===== Fel, meddelanden och kvitto ===== */
.astm-has-error input { border-color: var(--astm-error) !important; }
.astm-error {
	margin: .4rem 0 0;
	color: var(--astm-error);
	font-size: .9rem;
	font-weight: 600;
}
.astm-error-summary {
	border: 1px solid var(--astm-error-line);
	border-left: 4px solid var(--astm-error);
	background: var(--astm-error-bg);
	border-radius: 14px;
	padding: 1.1rem 1.4rem;
	margin: 0 0 1.5rem;
}
.astm-error-summary p { margin: 0 0 .4rem; color: var(--astm-error); }
.astm-error-summary ul { margin: 0 0 0 1.25rem; padding: 0; }
.astm-error-summary a { color: var(--astm-error); }

.astm-notice {
	border-radius: 14px;
	padding: .9rem 1.2rem;
	margin: 0 0 1.25rem;
	background: var(--astm-white);
	border: 1px solid var(--astm-line);
}

.astm-success {
	background: var(--astm-sage);
	border-radius: 16px;
	padding: 2rem 2rem 1.5rem;
}
.astm-success h3 {
	display: flex;
	align-items: center;
	gap: .7rem;
	margin: 0 0 1rem;
	font-family: var(--astm-serif);
	font-weight: 600;
	color: var(--astm-green-dark);
}
.astm-success h3::before {
	content: "✓";
	flex: none;
	display: grid;
	place-items: center;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 999px;
	background: var(--astm-green-dark);
	color: #fff;
	font-size: 1.1rem;
}
.astm-success a { color: var(--astm-green-dark); font-weight: 600; }
.astm-success p:last-child { margin-bottom: 0; }

/* Honeypot */
.astm-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 700px) {
	.astm-grid { grid-template-columns: 1fr; }
	.astm-form { padding: 1.25rem 1.1rem .25rem; }
	.astm-wrap .astm-submit { width: 100%; }
	.astm-success { padding: 1.5rem 1.25rem 1.25rem; }
}
