/* Vereins-Mitgliedsantrag – Formular */
.vma {
	--vma-accent: #1f4e79;
	--vma-border: #c9d1db;
	--vma-bg: #ffffff;
	--vma-soft: #f4f6f9;
	--vma-text: #1d2327;
	--vma-muted: #5f6b7a;
	--vma-error: #b42318;
	--vma-ok: #1e7b3a;
	--vma-radius: 8px;
	color: var(--vma-text);
	font-size: 16px;
	line-height: 1.5;
	max-width: 760px;
	margin: 0 auto;
}
.vma *, .vma *::before, .vma *::after { box-sizing: border-box; }
.vma-form { background: var(--vma-bg); }
.vma-logo { float: right; width: 64px; height: auto; margin: 0 0 8px 16px; }
.vma-title { color: var(--vma-accent); margin: 0 0 2px; font-size: 1.6em; line-height: 1.2; }
.vma-org { margin: 0 0 12px; color: var(--vma-muted); font-weight: 600; }
.vma-intro { background: var(--vma-soft); border-left: 4px solid var(--vma-accent); padding: 12px 14px; border-radius: 0 var(--vma-radius) var(--vma-radius) 0; font-size: .92em; clear: both; }

.vma fieldset { border: 1px solid var(--vma-border); border-radius: var(--vma-radius); padding: 14px 18px 8px; margin: 20px 0; min-width: 0; }
.vma legend { font-weight: 700; color: var(--vma-accent); padding: 0 6px; font-size: 1.05em; }

.vma-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 14px; }
.vma-grid > .vma-field { grid-column: span 6; }
.vma-grid > [data-field="anrede"] { grid-column: span 2; }
.vma-grid > [data-field="vorname"], .vma-grid > [data-field="nachname"] { grid-column: span 3; }
.vma-grid > [data-field="anrede"] + [data-field="vorname"] { grid-column: span 2; }
.vma-grid > [data-field="anrede"] ~ [data-field="nachname"] { grid-column: span 2; }
.vma-grid > [data-field="plz"] { grid-column: span 2; }
.vma-grid > [data-field="ort"] { grid-column: span 4; }
.vma-grid > [data-field="geburtsdatum"], .vma-grid > [data-field="telefon"] { grid-column: span 3; }
.vma-grid > [data-field="iban"] { grid-column: span 4; }
.vma-grid > [data-field="bic"] { grid-column: span 2; }
.vma-grid > [data-field="bank"], .vma-grid > [data-field="erster_einzug"] { grid-column: span 3; }
@media (max-width: 560px) {
	.vma-grid > .vma-field[data-field] { grid-column: span 6 !important; }
	.vma fieldset { padding: 12px 12px 6px; }
}

.vma-field { margin: 0 0 12px; }
.vma-field > label, .vma-label { display: block; font-weight: 600; font-size: .9em; margin-bottom: 4px; }
.vma input[type=text], .vma input[type=email], .vma input[type=tel], .vma input[type=date],
.vma input[type=month], .vma input[type=number], .vma select {
	width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; color: inherit;
	border: 1px solid var(--vma-border); border-radius: 6px; background: #fff;
}
.vma input:focus-visible, .vma select:focus-visible, .vma button:focus-visible, .vma summary:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--vma-accent) 45%, transparent); outline-offset: 1px; border-color: var(--vma-accent);
}
.vma .vma-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }
.vma input.vma-inline-num { width: 7em; min-height: 36px; display: inline-block; margin: -4px 4px 0; padding: 4px 8px; vertical-align: middle; }
.vma-req { color: var(--vma-error); }
.vma-hint { display: block; color: var(--vma-muted); font-size: .82em; margin-top: 3px; }
.vma-small { font-size: .85em; color: var(--vma-muted); }
.vma-hint-box { background: #fff8e5; border: 1px solid #f0d58c; border-radius: 6px; padding: 8px 12px; font-size: .9em; }

.vma-choices { display: flex; flex-direction: column; gap: 6px; }
.vma-choices--row { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; }
.vma .vma-choice { display: block; position: relative; padding-left: 30px; font-weight: 400; cursor: pointer; margin: 0; }
.vma .vma-choice > input[type=radio], .vma .vma-choice > input[type=checkbox] { position: absolute; left: 0; top: 2px; width: 20px; height: 20px; margin: 0; accent-color: var(--vma-accent); }
.vma-choice.is-disabled { opacity: .45; cursor: not-allowed; }

.vma-details { background: var(--vma-soft); border-radius: 6px; padding: 8px 12px; margin: 0 0 12px; font-size: .85em; }
.vma-details summary { cursor: pointer; font-weight: 600; }

/* Unterschriftsfeld im Formular: gesperrt, nur Vorschau */
.vma-sig { -webkit-user-select: none; user-select: none; position: relative; border: 2px dashed var(--vma-border); border-radius: var(--vma-radius); background: #fff; min-height: 120px; display: flex; align-items: center; justify-content: center; padding: 10px; }
.vma-sig.has-ink { border-style: solid; border-color: var(--vma-accent); flex-direction: column; gap: 8px; }
.vma-sig-preview { display: block; max-width: 100%; max-height: 120px; width: auto; height: auto; cursor: pointer; }
.vma .vma-sig-open { background: transparent; border: 0; color: var(--vma-accent); font: inherit; font-weight: 700; padding: 14px 18px; cursor: pointer; border-radius: 6px; min-height: 48px; }
.vma .vma-sig-open:hover { background: var(--vma-soft); }
.vma-sig.has-ink .vma-sig-open { font-weight: 600; font-size: .9em; padding: 6px 12px; min-height: 36px; border: 1px solid var(--vma-border); background: #fff; }
.vma .vma-sig-clear { position: absolute; top: 6px; right: 6px; background: #fff; border: 1px solid var(--vma-border); border-radius: 4px; padding: 2px 10px; font: inherit; font-size: .8em; cursor: pointer; color: var(--vma-text); }

/* Unterschriftsfenster */
html.vma-noscroll, html.vma-noscroll body { overflow: hidden !important; overscroll-behavior: none; }
.vma-dialog-root { position: fixed; inset: 0; z-index: 999999; background: rgba(15, 23, 42, .6); display: flex; align-items: center; justify-content: center; padding: 12px; max-width: none; margin: 0; }
.vma-dialog-root[hidden] { display: none !important; }
.vma-dialog { background: #fff; border-radius: 12px; width: 100%; max-width: 760px; max-height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.35); outline: none; }
.vma-dialog-head { display: flex; flex-direction: column; gap: 2px; }
.vma-dialog-head strong { color: var(--vma-accent); font-size: 1.1em; }
.vma-dialog-hint, .vma-dialog-rotate { color: var(--vma-muted); font-size: .85em; }
.vma-dialog-rotate { display: none; }
.vma-pad { position: relative; flex: 1 1 auto; height: clamp(160px, 50vh, 320px); border: 2px solid var(--vma-accent); border-radius: 8px; background: #fff; touch-action: none; -webkit-user-select: none; user-select: none; }
.vma-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.vma-pad::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 28%; border-bottom: 1px solid #b8c0cc; pointer-events: none; }
.vma-pad-x { position: absolute; left: 3%; bottom: calc(28% + 2px); color: #9aa4b1; font-size: 18px; pointer-events: none; }
.vma-dialog-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vma-spacer { flex: 1 1 auto; }
.vma .vma-btn-sec { background: #fff; color: var(--vma-text); border: 1px solid var(--vma-border); border-radius: 6px; padding: 10px 14px; font: inherit; cursor: pointer; min-height: 44px; }
.vma .vma-btn-sec[disabled], .vma .vma-btn[disabled] { opacity: .45; cursor: not-allowed; }
.vma-dialog .vma-btn { padding: 10px 20px; min-height: 44px; }
@media (max-width: 600px) and (orientation: portrait) {
	.vma-dialog-rotate { display: block; }
	.vma-pad { height: clamp(160px, 42vh, 300px); }
}
@media (max-height: 500px) {   /* Smartphone quer */
	.vma-dialog-root { padding: 4px; }
	.vma-dialog { padding: 8px; gap: 6px; height: 100%; border-radius: 8px; }
	.vma-dialog-hint { display: none; }
	.vma-pad { height: auto; min-height: 120px; }
}

.vma-btn { display: inline-block; background: var(--vma-accent); color: #fff; border: 0; border-radius: 6px; padding: 12px 26px; font: inherit; font-weight: 700; cursor: pointer; min-height: 48px; }
.vma-btn:hover { filter: brightness(1.1); }
/* Theme-Stile (z. B. Elementor: Großbuchstaben, nowrap) für unsere Schaltflächen neutralisieren */
.vma button.vma-btn, .vma .vma-btn { white-space: normal !important; text-transform: none !important; letter-spacing: normal !important; max-width: 100%; height: auto; line-height: 1.3; text-align: center; word-break: normal; overflow-wrap: anywhere; box-sizing: border-box; }
.vma .vma-btn--block { display: block; width: 100%; }
.vma-confirm h3 { margin: 0 0 10px; }
.vma-confirm-mail { background: #fff; border: 1px solid var(--vma-border); border-radius: 6px; padding: 10px 12px; }
.vma-btn[disabled] { opacity: .6; cursor: wait; }

.vma-err { display: block; color: var(--vma-error); font-size: .85em; min-height: 0; }
.vma-field.has-error input, .vma-field.has-error select { border-color: var(--vma-error); }
.vma-field.has-error .vma-sig { border-color: var(--vma-error); border-style: solid; }
.vma-form-error { background: #fdecea; color: var(--vma-error); border-radius: 6px; padding: 10px 14px; margin: 10px 0; }

.vma-notice { border-radius: var(--vma-radius); padding: 16px 20px; margin: 16px 0; }
.vma-notice--ok { background: #e8f5ec; border: 1px solid #a6d8b5; color: #14532d; }
.vma-notice--info { background: var(--vma-soft); border: 1px solid var(--vma-border); }
.vma-notice--error { background: #fdecea; border: 1px solid #f5b5ae; color: var(--vma-error); }
.vma-notice h3 { margin-top: 0; color: var(--vma-accent); }

.vma-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.vma [hidden] { display: none !important; }

/* Links gut sichtbar machen – auch wenn das Theme Unterstreichungen entfernt */
.vma a.vma-link, .vma .vma-details a { color: var(--vma-accent) !important; text-decoration: underline !important; text-underline-offset: 2px; font-weight: 600; }
.vma-docs-intro { margin: 0 0 6px; font-size: .9em; color: var(--vma-muted); }
.vma-docs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.vma a.vma-doc { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; min-height: 44px; border: 1px solid var(--vma-accent); border-radius: 6px; background: #fff; color: var(--vma-accent) !important; text-decoration: none !important; font-weight: 600; font-size: .95em; line-height: 1.2; }
.vma a.vma-doc:hover, .vma a.vma-doc:focus-visible { background: var(--vma-accent); color: #fff !important; }
.vma-ext { font-size: .85em; }
.vma .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
