/* Spielfreunde Flohmarkt – öffentliche Formulare. Übernimmt Schrift und Farben vom Theme. */

.sffm { --sffm-rand: color-mix(in srgb, currentColor 25%, transparent); --sffm-leicht: color-mix(in srgb, currentColor 6%, transparent); }
.sffm *, .sffm *::before, .sffm *::after { box-sizing: border-box; }

.sffm-felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1.25rem; }
.sffm-feld { margin: 0 0 1rem; }
.sffm-feld label { display: block; font-weight: 600; margin-bottom: .3rem; }
.sffm input[type=text], .sffm input[type=email], .sffm input[type=tel] {
	width: 100%; padding: .55rem .7rem; font: inherit; color: inherit; background: transparent;
	border: 1px solid var(--sffm-rand); border-radius: 6px;
}
.sffm input:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.sffm-pflicht { color: #b42318; }
.sffm-optional, .sffm-hinweis { opacity: .75; font-size: .9em; }

.sffm-tabelle-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0 .5rem; }
.sffm-tabelle, .sffm-ergebnis { width: 100%; border-collapse: collapse; }
.sffm-tabelle th, .sffm-ergebnis th { text-align: left; font-size: .9em; padding: .4rem .4rem; border-bottom: 2px solid var(--sffm-rand); white-space: nowrap; }
.sffm-tabelle td, .sffm-ergebnis td { padding: .25rem .4rem; border-bottom: 1px solid var(--sffm-rand); vertical-align: middle; }
.sffm-tabelle input[type=text] { padding: .4rem .5rem; }
.sffm-col-nr { width: 2.5em; opacity: .6; font-variant-numeric: tabular-nums; }
.sffm-col-preis { width: 7.5em; }
.sffm-col-typ { width: 4.5em; text-align: center !important; }
.sffm-col-typ input { width: 1.3em; height: 1.3em; cursor: pointer; }
.sffm-tabelle th.sffm-col-typ { text-align: center; }
.sffm-tabelle input[type=text] { min-width: 0; }
.sffm-tabelle td:nth-child(2) input { min-width: 12em; }
.sffm-zeile-fehler td { background: rgba(180, 35, 24, .08); }
.sffm-rechts { text-align: right; white-space: nowrap; }

.sffm-zeile-plus {
	font: inherit; cursor: pointer; padding: .45rem .9rem; border-radius: 6px;
	border: 1px dashed var(--sffm-rand); background: var(--sffm-leicht); color: inherit;
}
.sffm-zeile-plus:hover { border-style: solid; }

.sffm-consent label { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.sffm-consent input { width: 1.3em; height: 1.3em; margin-top: .15em; flex: none; }

.sffm-knopf { margin: 1.25rem 0; }
.sffm button.wp-block-button__link { font-family: inherit; cursor: pointer; }
.sffm-button[disabled] { opacity: .6; cursor: progress; }
.sffm-busy { cursor: progress; }

.sffm-meldung:empty { display: none; }
.sffm-meldung { margin: 1rem 0; padding: .9rem 1.1rem; border-radius: 8px; border-left: 4px solid currentColor; background: var(--sffm-leicht); }
.sffm-meldung p:first-child { margin-top: 0; }
.sffm-meldung p:last-child { margin-bottom: 0; }
.sffm-meldung-fehler { border-left-color: #b42318; background: rgba(180, 35, 24, .07); }
.sffm-meldung-erfolg { border-left-color: #2f7d32; background: rgba(47, 125, 50, .08); }
.sffm-meldung ul { margin: .4rem 0 0; padding-left: 1.2rem; }

.sffm-dialog { max-width: min(30rem, calc(100vw - 2rem)); border: none; border-radius: 10px; padding: 1.5rem; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.sffm-dialog::backdrop { background: rgba(0,0,0,.45); }
.sffm-dialog h3 { margin-top: 0; }

.sffm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.sffm-closed { padding: 1rem 1.2rem; border-radius: 8px; background: var(--sffm-leicht); }

@media (max-width: 600px) {
	.sffm-col-nr { display: none; }
	.sffm-col-preis { width: 5.5em; }
	.sffm-col-typ { width: 3.2em; }
	.sffm-tabelle td:nth-child(2) input { min-width: 9em; }
}
