/* ==========================================================================
   STF Messeplan – Standliste & Anmeldeformular
   Werte aus dem Claude-Design „Startseite Städtetag 2027" (Messeplan) und
   „Startseite Mobil". Farben/Schriften greifen auf die Elementor-Variablen
   (--stf-*) zurück, mit Fallbacks, falls das Kit fehlt.
   ========================================================================== */

.stf-mp,
.stf-mp-form,
.stf-mp-bar {
	--mp-ink: var(--stf-ink, #22211f);
	--mp-text: var(--stf-text, #4a4843);
	--mp-muted: var(--stf-muted, #5d5a54);
	--mp-gold: var(--stf-gold, #b08d46);
	--mp-gold-dark: var(--stf-gold-dark, #8a6a24);
	--mp-gold-light: var(--stf-gold-light, #d9b463);
	--mp-sand: var(--stf-sand, #f4f1ea);
	--mp-line: rgba(34, 33, 31, 0.12);
	--mp-error: #b3261e;
	--mp-heading: var(--stf-font-heading, 'Archivo'), 'Arial Black', sans-serif;
	--mp-body: var(--stf-font-body, 'Barlow'), system-ui, sans-serif;

	font-family: var(--mp-body);
	color: var(--mp-text);
	box-sizing: border-box;
}

.stf-mp *,
.stf-mp-form *,
.stf-mp-bar * {
	box-sizing: border-box;
}

.stf-mp .screen-reader-text,
.stf-mp-form .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- Layout [stf_messeplan] --------------------------------------------- */

/* Umschalten nach der Breite des Containers, nicht des Bildschirms: das Plugin
   sitzt in Elementor-Spalten unterschiedlicher Breite. */
.stf-mp-layout {
	container-type: inline-size;
	container-name: stfmp-layout;
}

.stf-mp-layout__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 64px;
	align-items: start;
}

.stf-mp-layout__form {
	position: sticky;
	top: var(--stf-mp-sticky-top, 140px);
}

.admin-bar .stf-mp-layout__form {
	top: calc(var(--stf-mp-sticky-top, 140px) + 32px);
}

/* --- Filter --------------------------------------------------------------- */

/* Die Liste selbst ist ebenfalls Container: Tabelle → Karten, wenn schmal. */
.stf-mp {
	container-type: inline-size;
	container-name: stfmp-list;
}

.stf-mp-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.stf-mp-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.stf-mp .stf-mp-filter__btn {
	margin: 0;
	padding: 9px 16px;
	border: 1px solid rgba(34, 33, 31, 0.2);
	border-radius: 0;
	background: #ffffff;
	color: var(--mp-text);
	font-family: var(--mp-body);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.stf-mp .stf-mp-filter__btn:hover {
	border-color: var(--mp-ink);
	background: #ffffff;
	color: var(--mp-ink);
}

.stf-mp .stf-mp-filter__btn[aria-pressed="true"] {
	border-color: var(--mp-ink);
	background: var(--mp-ink);
	color: #ffffff;
}

/* --- Tabelle -------------------------------------------------------------- */

.stf-mp-table {
	border: 1px solid var(--mp-line);
	overflow: hidden;
}

.stf-mp-row {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) 96px 124px;
	align-items: center;
	border-top: 1px solid rgba(34, 33, 31, 0.1);
	background: #ffffff;
	transition: background-color 0.15s ease;
}

.stf-mp--prices .stf-mp-row {
	grid-template-columns: 86px minmax(0, 1fr) 92px 88px 118px;
}

.stf-mp-row--head {
	border-top: 0;
	background: var(--mp-ink);
}

.stf-mp-row--head > span {
	padding: 13px 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mp-gold-light);
}

.stf-mp-row[hidden] {
	display: none;
}

.stf-mp-row.is-selected {
	background: #f6efe0;
}

.stf-mp-cell {
	min-width: 0;
	padding: 14px 12px;
	font-size: 14px;
	line-height: 1.35;
	color: var(--mp-text);
}

.stf-mp-cell--nr {
	white-space: nowrap;
	font-family: var(--mp-heading);
	font-size: 15px;
	font-weight: 700;
	color: var(--mp-ink);
}

.stf-mp-cell--price {
	font-weight: 600;
	color: var(--mp-ink);
	white-space: nowrap;
}

.stf-mp-area,
.stf-mp-size {
	display: block;
}

.stf-mp-size {
	margin-top: 2px;
	color: var(--mp-muted);
}

.stf-mp-power {
	white-space: nowrap;
}

.stf-mp-status {
	font-size: 14px;
	font-weight: 600;
}

.stf-mp-status--frei { color: #6f7d38; }
.stf-mp-status--reserviert { color: #a8802a; }
.stf-mp-status--vergeben { color: #8a857c; }

.stf-mp-cell--action {
	padding: 8px 12px;
}

.stf-mp .stf-mp-select {
	width: 100%;
	margin: 0;
	padding: 10px 6px;
	border: 1px solid var(--mp-gold);
	border-radius: 0;
	background: #ffffff;
	color: var(--mp-gold-dark);
	font-family: var(--mp-body);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.stf-mp .stf-mp-select:hover,
.stf-mp .stf-mp-select:focus {
	background: #ffffff;
	color: var(--mp-ink);
	border-color: var(--mp-gold-dark);
}

.stf-mp .stf-mp-select[aria-pressed="true"] {
	border-color: var(--mp-gold-dark);
	background: var(--mp-gold);
	color: #ffffff;
}

.stf-mp .stf-mp-select:disabled {
	border-color: var(--mp-line);
	background: transparent;
	color: #b3aea5;
	cursor: not-allowed;
}

.stf-mp .stf-mp-filter__btn:focus-visible,
.stf-mp .stf-mp-select:focus-visible,
.stf-mp-form :focus-visible {
	outline: 2px solid var(--mp-gold);
	outline-offset: 2px;
}

.stf-mp-empty {
	margin: 0;
	padding: 18px;
	border: 1px dashed var(--mp-line);
	font-size: 15px;
}

.stf-mp-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 16px;
	font-size: 14px;
	color: #6b675f;
}

.stf-mp .stf-mp-download {
	font-weight: 600;
	color: var(--mp-gold-dark);
	text-decoration: none;
}

.stf-mp .stf-mp-download:hover {
	color: var(--mp-ink);
}

/* --- Formular ------------------------------------------------------------- */

.stf-mp-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 36px;
	background: var(--mp-sand);
	border-top: 3px solid var(--mp-gold);
	scroll-margin-top: 140px;
}

.stf-mp-form__head {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.stf-mp-form .stf-mp-form__title {
	margin: 0;
	font-family: var(--mp-heading);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--mp-ink);
	text-transform: none;
	letter-spacing: 0;
}

.stf-mp-form__hint {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--mp-muted);
}

.stf-mp-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.stf-mp-form label,
.stf-mp-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mp-muted);
}

.stf-mp-req {
	color: var(--mp-gold-dark);
}

.stf-mp-form input[type="text"],
.stf-mp-form input[type="email"],
.stf-mp-form input[type="tel"],
.stf-mp-form textarea {
	width: 100%;
	margin: 0;
	padding: 13px 14px;
	border: 1px solid rgba(34, 33, 31, 0.2);
	border-radius: 0;
	background: #ffffff;
	color: var(--mp-ink);
	font-family: var(--mp-body);
	font-size: 16px;
	line-height: 1.4;
}

.stf-mp-form input:focus,
.stf-mp-form textarea:focus {
	border-color: var(--mp-gold);
	outline: none;
	box-shadow: 0 0 0 1px var(--mp-gold);
}

.stf-mp-field.has-error input,
.stf-mp-field.has-error textarea,
.stf-mp-field.has-error .stf-mp-chips {
	border-color: var(--mp-error);
}

.stf-mp-field__error {
	font-size: 13px;
	color: var(--mp-error);
}

.stf-mp-field__error:empty {
	display: none;
}

/* Gewählte Stände als Chips */
.stf-mp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	min-height: 50px;
	padding: 8px;
	border: 1px solid rgba(34, 33, 31, 0.2);
	background: #ffffff;
}

.stf-mp-chips__empty {
	align-self: center;
	padding: 0 6px;
	font-size: 16px;
	color: #8a857c;
}

.stf-mp-form .stf-mp-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 8px 6px 12px;
	border: 1px solid var(--mp-gold);
	border-radius: 0;
	background: #f6efe0;
	color: var(--mp-ink);
	font-family: var(--mp-body);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: none;
	cursor: pointer;
}

.stf-mp-form .stf-mp-chip:hover {
	background: #ffffff;
	color: var(--mp-ink);
}

.stf-mp-chip__x {
	font-size: 18px;
	line-height: 1;
	color: var(--mp-gold-dark);
}

.stf-mp-nojs {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid rgba(34, 33, 31, 0.2);
	background: #ffffff;
}

.stf-mp-nojs label {
	font-size: 15px;
	letter-spacing: 0;
	text-transform: none;
	color: var(--mp-ink);
}

/* Optionale Felder */
.stf-mp-more {
	border-top: 1px solid var(--mp-line);
	border-bottom: 1px solid var(--mp-line);
}

.stf-mp-more > summary {
	padding: 12px 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--mp-gold-dark);
	cursor: pointer;
}

.stf-mp-more[open] {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-bottom: 14px;
}

.stf-mp-field--check label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
	text-transform: none;
	color: var(--mp-text);
}

.stf-mp-field--check input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--mp-gold);
}

.stf-mp-form .stf-mp-field--check a {
	color: var(--mp-gold-dark);
}

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

.stf-mp-captcha .h-captcha {
	margin: 0;
}

.stf-mp-form .stf-mp-submit {
	margin: 0;
	padding: 16px 24px;
	border: 0;
	border-radius: 0;
	background: var(--mp-gold);
	color: #ffffff;
	font-family: var(--mp-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.stf-mp-form .stf-mp-submit:hover,
.stf-mp-form .stf-mp-submit:focus {
	background: var(--mp-ink);
	color: #ffffff;
}

.stf-mp-form .stf-mp-submit[aria-busy="true"] {
	opacity: 0.7;
	cursor: progress;
}

.stf-mp-form__notice {
	padding: 16px;
	border-left: 3px solid var(--mp-gold);
	background: #ffffff;
	font-size: 15px;
	line-height: 1.5;
	color: var(--mp-text);
}

.stf-mp-form__notice.is-error {
	border-left-color: var(--mp-error);
}

.stf-mp-form__notice[hidden] {
	display: none;
}

.stf-mp-form__foot {
	margin: 0;
	padding-top: 12px;
	border-top: 1px solid var(--mp-line);
	font-size: 13px;
	line-height: 1.5;
	color: #6b675f;
}

/* Mobile Leiste „Zur Anmeldung" */
.stf-mp-bar {
	display: none;
}

/* --- Schmaler Container: Liste und Formular untereinander ------------------ */

@container stfmp-layout (max-width: 960px) {
	.stf-mp-layout__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.stf-mp-layout__form {
		position: static;
	}
}

/* --- Mobile Leiste unten -------------------------------------------------- */

@media (max-width: 1024px) {
	.stf-mp-bar:not([hidden]) {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 70;
		display: flex;
		align-items: center;
		gap: 14px;
		padding: 12px 18px;
		background: var(--mp-ink);
		box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.25);
		text-decoration: none;
	}

	.stf-mp-bar__text {
		flex: 1;
		min-width: 0;
		overflow: hidden;
		font-family: var(--mp-heading);
		font-size: 15px;
		font-weight: 700;
		color: #ffffff;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.stf-mp-bar__cta {
		flex: 0 0 auto;
		padding: 13px 16px;
		background: var(--mp-gold);
		color: #ffffff;
		font-size: 13px;
		font-weight: 600;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}
}

/* --- Schmale Liste: Karten statt Tabelle ----------------------------------- */

/* 540px: Tabelle bleibt in normalen Desktop-Spalten (ab ca. 560px) lesbar. */
@container stfmp-list (max-width: 540px) {
	.stf-mp-filter {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.stf-mp .stf-mp-filter__btn {
		padding: 13px 10px;
		font-size: 12px;
	}

	.stf-mp-table {
		display: flex;
		flex-direction: column;
		gap: 10px;
		border: 0;
		overflow: visible;
	}

	.stf-mp-row--head {
		display: none;
	}

	.stf-mp-row,
	.stf-mp--prices .stf-mp-row {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 2px 12px;
		padding: 16px;
		border: 1px solid rgba(34, 33, 31, 0.14);
	}

	.stf-mp-row.is-selected {
		border-color: var(--mp-gold);
	}

	.stf-mp-cell {
		padding: 0;
	}

	.stf-mp-cell--nr {
		grid-column: 1;
		grid-row: 1;
		font-size: 19px;
	}

	.stf-mp-cell--status {
		grid-column: 2;
		grid-row: 1;
		align-self: baseline;
	}

	.stf-mp-status {
		font-size: 12px;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	.stf-mp-cell--area,
	.stf-mp-cell--price {
		grid-column: 1 / -1;
		color: var(--mp-muted);
	}

	.stf-mp-cell--area {
		grid-row: 2;
		display: flex;
		flex-direction: column-reverse;
		gap: 2px;
		margin-top: 8px;
	}

	.stf-mp-cell--price {
		grid-row: 3;
		color: var(--mp-ink);
	}

	.stf-mp-cell--action {
		grid-column: 1 / -1;
		grid-row: 4;
		margin-top: 12px;
	}

	.stf-mp .stf-mp-select {
		padding: 14px;
	}

}

@media (max-width: 767px) {
	.stf-mp-form {
		padding: 28px 18px;
	}

	/* Platz für die fixe Leiste unten */
	.stf-mp-layout {
		padding-bottom: 72px;
	}
}

/* ==========================================================================
   Noch nicht live: Hinweis für Besucher, Platzhalter-Karte, Admin-Vorschau
   ========================================================================== */
.stf-mp-soon {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 32px;
	border: 1px solid rgba(34, 33, 31, 0.14);
	background: var(--mp-sand);
}

.stf-mp-soon .stf-mp-soon__badge {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--mp-gold);
}

.stf-mp-soon .stf-mp-soon__title {
	margin: 0;
	font-family: var(--mp-heading);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--mp-ink);
}

.stf-mp-soon .stf-mp-soon__text {
	max-width: 560px;
	font-size: 16px;
	line-height: 1.55;
	color: var(--mp-muted);
}

.stf-mp-soon .stf-mp-soon__text p {
	margin: 0 0 10px;
}

.stf-mp-soon .stf-mp-soon__text p:last-child {
	margin-bottom: 0;
}

.stf-mp-soon .stf-mp-soon__text a {
	color: var(--mp-gold-dark);
	font-weight: 600;
}

.stf-mp-form--soon {
	gap: 16px;
}

.stf-mp-form--soon .stf-mp-form__hint {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--mp-muted);
}

.stf-mp-form--soon .stf-mp-submit {
	display: block;
	text-align: center;
	text-decoration: none;
}

.stf-mp-form .stf-mp-contact {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding-top: 14px;
	border-top: 1px solid var(--mp-line);
	font-size: 15px;
	line-height: 1.4;
	color: var(--mp-text);
}

.stf-mp-form .stf-mp-contact__name {
	font-weight: 600;
	color: var(--mp-ink);
}

.stf-mp-form .stf-mp-contact__tel {
	font-weight: 600;
	color: var(--mp-ink);
	text-decoration: none;
}

.stf-mp-form .stf-mp-contact__tel:hover {
	color: var(--mp-gold-dark);
}

.stf-mp-form .stf-mp-form__foot a {
	color: var(--mp-gold-dark);
	font-weight: 600;
}

.stf-mp-preview {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-left: 4px solid #b3261e;
	background: #fdf0ee;
	color: #22211f;
	font-family: var(--stf-font-body, 'Barlow'), system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

.stf-mp-preview a {
	color: #8a1c16;
	font-weight: 600;
	text-decoration: underline;
}

@media (max-width: 767px) {
	.stf-mp-soon {
		padding: 22px 20px;
		gap: 9px;
	}

	.stf-mp-soon .stf-mp-soon__badge {
		font-size: 11px;
	}

	.stf-mp-soon .stf-mp-soon__title {
		font-size: 21px;
	}

	.stf-mp-soon .stf-mp-soon__text {
		font-size: 15px;
	}
}
