/* =========================================================
   EVENT-VERWALTUNG – SEITENLAYOUT
   ========================================================= */

body > h1,
body > h2,
body > .event-form,
body > .search-form,
body > table,
body > .error_messages {
	width: min(100% - 48px, 1400px);
	margin-right: auto;
	margin-left: auto;
	box-sizing: border-box;
}


/* =========================================================
   HAUPTÜBERSCHRIFT
   ========================================================= */

body > h1 {
	position: relative;

	margin-top: 48px;
	margin-bottom: 48px;
	padding: 0 0 26px;

	color: var(--accent);
	font-family: var(--fire-display);
	font-size: clamp(54px, 7vw, 94px);
	font-weight: 400;
	letter-spacing: 0.01em;
	line-height: 0.92;

	border-bottom: 1px solid var(--stecki-line);

	-webkit-text-fill-color: currentColor;
	-webkit-text-stroke: 0;
}

body > h1::before {
	content: "Szenentracker";

	display: block;

	margin-bottom: 9px;

	color: var(--fire-accent-light);
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1.5;
	text-transform: uppercase;

	-webkit-text-stroke: 0;
}

body > h1::after {
	content: "";

	position: absolute;
	bottom: -1px;
	left: 0;

	width: min(180px, 35%);
	height: 1px;

	background:
		linear-gradient(
			to right,
			var(--fire-accent),
			var(--accent)
		);
}


/* =========================================================
   ABSCHNITTSÜBERSCHRIFTEN
   ========================================================= */

body > h2 {
	position: relative;

	margin-top: 48px;
	margin-bottom: 20px;
	padding-bottom: 13px;

	color: var(--accent);
	font-family: var(--fire-display);
	font-size: clamp(30px, 4vw, 46px);
	font-weight: 400;
	letter-spacing: 0.015em;
	line-height: 1;

	border-bottom: 1px solid var(--stecki-line);
}

body > h2::after {
	content: "";

	position: absolute;
	bottom: -1px;
	left: 0;

	width: 70px;
	height: 1px;

	background: rgba(178, 139, 173, 0.55);
}


/* =========================================================
   FORMULARGRUNDLAGE
   ========================================================= */

body > .event-form,
body > .search-form {
	position: relative;

	display: grid;
	gap: 22px;

	padding: 28px;

	color: var(--stecki-text);

	background:
		linear-gradient(
			135deg,
			var(--stecki-fraktion-bg),
			transparent 42%
		),
		var(--stecki-panel);

	border: 1px solid var(--stecki-line);
}

body > .event-form::before,
body > .event-form::after,
body > .search-form::before,
body > .search-form::after {
	content: "";

	position: absolute;

	width: 26px;
	height: 26px;

	pointer-events: none;
}

body > .event-form::before,
body > .search-form::before {
	top: 9px;
	left: 9px;

	border-top: 1px solid var(--stecki-scrollbar);
	border-left: 1px solid var(--stecki-scrollbar);
}

body > .event-form::after,
body > .search-form::after {
	right: 9px;
	bottom: 9px;

	border-right: 1px solid var(--stecki-line-strong);
	border-bottom: 1px solid var(--stecki-line-strong);
}


/* =========================================================
   EVENT-FORMULAR
   ========================================================= */

body > .event-form {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

body > .event-form label {
	display: flex;
	flex-direction: column;
	gap: 8px;

	min-width: 0;

	color: var(--stecki-text);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.5;
	text-transform: uppercase;
}

body > .event-form textarea {
	grid-column: 1 / -1;
}

body > .event-form .actions {
	grid-column: 1 / -1;

	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 12px;

	padding-top: 5px;
}


/* =========================================================
   SUCHFORMULAR
   ========================================================= */

body > .search-form {
	grid-template-columns:
		minmax(220px, 1fr)
		minmax(180px, 0.7fr)
		minmax(180px, 0.7fr)
		auto;
	align-items: end;
}

body > .search-form label {
	display: flex;
	flex-direction: column;
	gap: 8px;

	min-width: 0;

	color: var(--stecki-text);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.5;
	text-transform: uppercase;
}


/* =========================================================
   EINGABEFELDER
   ========================================================= */

body > .event-form input[type="text"],
body > .event-form textarea,
body > .search-form input[type="text"] {
	width: 100%;
	min-width: 0;
	padding: 10px 12px;

	box-sizing: border-box;

	color: var(--stecki-text);
	font-family: inherit;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.6;
	text-transform: none;

	background: var(--stecki-panel);
	border: 1px solid var(--stecki-line);
	border-radius: 0;
	outline: none;

	transition:
		background 0.18s ease,
		border-color 0.18s ease;
}

body > .event-form textarea {
	min-height: 170px;

	resize: vertical;
}

body > .event-form input[type="text"]:hover,
body > .event-form textarea:hover,
body > .search-form input[type="text"]:hover {
	border-color: var(--stecki-link-line);
}

body > .event-form input[type="text"]:focus,
body > .event-form textarea:focus,
body > .search-form input[type="text"]:focus {
	background: var(--stecki-hover-bg);
	border-color: var(--stecki-progress-strong);
}


/* =========================================================
   PLACEHOLDER
   ========================================================= */

body > .event-form textarea::placeholder,
body > .search-form input::placeholder {
	color: var(--stecki-empty);
}


/* =========================================================
   BUTTONS
   Überschreibt auch die Inline-Styles im Template
   ========================================================= */

body > .event-form .button,
body > .search-form .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	min-height: 38px;
	margin: 0 !important;
	padding: 9px 16px !important;

	box-sizing: border-box;

	color: var(--stecki-hover-text) !important;
	font-family: inherit;
	font-size: 11px !important;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;

	background:
		linear-gradient(
			to right,
			var(--stecki-progress-soft),
			var(--stecki-fraktion-bg)
		) !important;

	border: 1px solid var(--stecki-link-line) !important;
	border-radius: 0 !important;
	outline: none;

	cursor: pointer;

	transition:
		background 0.18s ease,
		border-color 0.18s ease,
		color 0.18s ease;
}

body > .event-form .button:hover,
body > .search-form .button:hover {
	color: var(--stecki-hover-text) !important;

	background:
		linear-gradient(
			to right,
			var(--stecki-progress-soft),
			var(--stecki-fraktion-bg)
		) !important;

	border-color: var(--stecki-line-strong) !important;
}


/* =========================================================
   ABBRECHEN-BUTTON
   ========================================================= */

body > .event-form .actions a.button {
	color: var(--stecki-muted) !important;

	background: transparent !important;
	border-color: var(--stecki-line) !important;
}

body > .event-form .actions a.button:hover {
	color: var(--stecki-hover-text) !important;
	border-color: var(--stecki-line-strong) !important;
}


/* =========================================================
   FEHLERMELDUNGEN
   ========================================================= */

body > .error_messages {
	position: relative;

	margin-top: 0;
	margin-bottom: 24px;
	padding: 15px 17px !important;

	color: rgba(232, 189, 194, 0.92);
	font-size: 12px;
	line-height: 1.7;

	background:
		linear-gradient(
			to right,
			rgba(160, 75, 87, 0.1),
			transparent 65%
		) !important;

	border: 1px solid rgba(190, 100, 110, 0.28) !important;
	border-radius: 0;
}


/* =========================================================
   EVENT-TABELLE
   ========================================================= */

body > table {
	width: min(100% - 48px, 1400px) !important;
	margin-top: 0 !important;
	margin-right: auto;
	margin-bottom: 80px;
	margin-left: auto;

	border-spacing: 0;
	border-collapse: separate !important;

	background: transparent;
	border: 1px solid var(--stecki-line);
}

body > table th,
body > table td {
	padding: 13px 15px !important;

	color: var(--stecki-text);

	border: 0 !important;
	border-right: 1px solid var(--fire-border-soft) !important;
	border-bottom: 1px solid var(--fire-border-soft) !important;
}

body > table th:last-child,
body > table td:last-child {
	border-right: 0 !important;
}

body > table tbody tr:last-child td {
	border-bottom: 0 !important;
}


/* =========================================================
   TABELLENKOPF
   ========================================================= */

body > table th {
	color: var(--stecki-muted);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.11em;
	line-height: 1.45;
	text-align: left;
	text-transform: uppercase;

	background:
		linear-gradient(
			to right,
			var(--stecki-fraktion-bg),
			transparent 70%
		) !important;
}


/* =========================================================
   TABELLENZEILEN
   ========================================================= */

body > table td {
	color: var(--stecki-text);
	font-size: 12px;
	line-height: 1.7;

	background: var(--stecki-panel);
}

body > table tbody tr:nth-child(even) td {
	background: var(--stecki-panel);
}

body > table tbody tr:hover td {
	background:
		linear-gradient(
			to right,
			var(--stecki-fraktion-bg),
			transparent 72%
		);
}


/* =========================================================
   LINKS UND BUTTONS IN DER TABELLE
   ========================================================= */

body > table a {
	color: var(--stecki-text);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;

	border-bottom: 1px solid transparent;

	transition:
		color 0.18s ease,
		border-color 0.18s ease;
}

body > table a:hover {
	color: var(--stecki-hover-text);

	border-bottom-color: var(--stecki-link-line);
}


/* =========================================================
   LEERE TABELLE
   ========================================================= */

body > table tbody td[colspan] {
	padding: 30px !important;

	color: var(--stecki-empty);
	font-style: italic;
	text-align: center;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 950px) {

	body > .event-form {
		grid-template-columns: 1fr;
	}

	body > .event-form textarea,
	body > .event-form .actions {
		grid-column: auto;
	}

	body > .search-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body > .search-form .button {
		width: 100%;
	}

}

@media (max-width: 700px) {

	body > h1,
	body > h2,
	body > .event-form,
	body > .search-form,
	body > table,
	body > .error_messages {
		width: min(100% - 24px, 1400px) !important;
	}

	body > h1 {
		margin-top: 30px;
		margin-bottom: 36px;

		font-size: clamp(44px, 15vw, 68px);
	}

	body > .event-form,
	body > .search-form {
		padding: 22px 17px;
	}

	body > .search-form {
		grid-template-columns: 1fr;
	}

	body > .event-form .actions {
		align-items: stretch;
		flex-direction: column;
	}

	body > .event-form .actions .button,
	body > .search-form .button {
		width: 100%;
	}

	body > table {
		display: block;

		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	body > table th,
	body > table td {
		min-width: 130px;
	}

	body > table th:nth-child(2),
	body > table td:nth-child(2) {
		min-width: 260px;
	}

}

@media (max-width: 700px), (max-device-width: 700px) {
	body > h1 { font-size: clamp(48px, 15vw, 70px); }
	body > h1::before { font-size: 13px; }
	body > h2 { font-size: clamp(36px, 10vw, 48px); }

	body > .event-form label,
	body > .search-form label { font-size: 14px; }

	body > .event-form input[type="text"],
	body > .event-form textarea,
	body > .search-form input[type="text"] {
		font-size: 17px;
		line-height: 1.65;
	}

	body > .event-form .button,
	body > .search-form .button {
		min-height: 44px;
		font-size: 14px !important;
	}

	body > .error_messages {
		font-size: 15px;
		line-height: 1.7;
	}

	body > table th { font-size: 13px; }

	body > table td {
		font-size: 16px;
		line-height: 1.65;
	}

	body > table a {
		font-size: 14px;
		line-height: 1.5;
	}
}

@media (max-width: 480px), (max-device-width: 480px) {
	body > h1 { font-size: clamp(46px, 17vw, 64px); }
	body > h2 { font-size: clamp(34px, 12vw, 44px); }

	body > .event-form label,
	body > .search-form label { font-size: 15px; }

	body > .event-form input[type="text"],
	body > .event-form textarea,
	body > .search-form input[type="text"] {
		font-size: 18px;
	}

	body > table th { font-size: 14px; }
	body > table td { font-size: 17px; }
	body > table a { font-size: 15px; }
}

