/* Asgaros Forum Spaces — Frontend-Stile (barrierearm). */

/* Forum-ähnliche Wrapper-Struktur für Spaces-Hub. */
#af-wrapper.afspaces-wrapper {
	/* width: 100%; */
	max-width: 1394px;
	margin: 0;
	padding: 1rem;
	background: #fff;
	position: relative;
}

#af-wrapper.afspaces-wrapper {
	font-family: var(--theme-font-family);
	line-height: initial !important;
}

#af-wrapper.afspaces-wrapper {
	border-radius: 30px 30px 30px 30px;
	background-color: #fafbfc;
	border: 1px solid var(--theme-palette-color-5) !important;
	padding: 50px;
	box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
	margin: 50px auto !important;

}

#af-wrapper.afspaces-wrapper {
	font-size: inherit !important;
}

#af-wrapper {
	font-family: Verdana, Tahoma, sans-serif;
	font-size: 13px;
	color: #444;
	line-height: 1.65;
	text-shadow: none;
}

/* Breadcrumb Navigation — Forum-Stil. */
.afspaces-breadcrumb {
	display: flex;
	gap: 0.5rem;
	margin: 1rem 0 1.5rem 0;
	padding: 0;
	font-size: 0.95rem;
	color: #555d66;
	list-style: none;
}

.afspaces-breadcrumb a {
	color: #2271b1;
	text-decoration: none;
}

.afspaces-breadcrumb a:hover,
.afspaces-breadcrumb a:focus {
	text-decoration: underline;
}

.afspaces-breadcrumb-sep {
	margin: 0 0.25rem;
	color: #8a8a8a;
}

/* Hub-Navigation — ähnlich Asgaros-Forum-Tabs. */
.afspaces-hub-nav {
	border-bottom: 2px solid #e5e5e5;
	margin: 1rem 0;
	padding: 0;
}

.afspaces-hub-nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 0;
	flex-wrap: wrap;
}

.afspaces-hub-nav li {
	margin: 0;
	padding: 0;
}

.afspaces-hub-tab {
	display: inline-block;
	padding: 0.75rem 1rem;
	color: #555d66;
	text-decoration: none;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	transition: all 0.2s ease;
	cursor: pointer;
	font-weight: 500;
}

.afspaces-hub-tab:hover {
	color: #2271b1;
	background: #f5f5f5;
}

.afspaces-hub-tab.is-active {
	color: #2271b1;
	border-bottom-color: #2271b1;
	font-weight: 700;
}

.afspaces-hub-content {
	padding: 1.5rem 0;
}

.afspaces-space-context {
	margin: 1rem 0 0;
}

.afspaces-space-context-title {
	margin: 0;
	font-size: 1.25rem;
}

.afspaces-space-nav {
	margin-top: 0.5rem;
}

.afspaces-dashboard,
.afspaces-members,
.afspaces-invitations,
.afspaces-join-requests,
.afspaces-my-invitations {
	max-width: 60rem;
	margin: 1.5rem 0;
	font-size: 1rem;
	line-height: 1.5;
}

.afspaces-dashboard h2,
.afspaces-members h2,
.afspaces-members h3,
.afspaces-invitations h2,
.afspaces-invitations h3,
.afspaces-join-requests h2,
.afspaces-join-requests h3,
.afspaces-my-invitations h2 {
	margin-top: 1.5rem;
}

.afspaces-space-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 1rem;
}

.afspaces-space-item {
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	padding: 1rem;
}

.afspaces-space-actions {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.afspaces-button {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: #2271b1 !important;
	color: #fff !important;
	border: 1px solid #2271b1 !important;
	border-radius: 4px;
	text-decoration: none;
	cursor: pointer;
	min-height: 44px;
	font-size: 1rem;
}

.afspaces-button:hover,
.afspaces-button:focus {
	background: #135e96 !important;
}

.afspaces-button-danger {
	background: #d63638 !important;
	border-color: #d63638 !important;
}

.afspaces-button-danger:hover,
.afspaces-button-danger:focus {
	background: #b32d2e !important;
}

.afspaces-button:focus-visible,
.afspaces-search input:focus-visible,
.afspaces-inline-form button:focus-visible {
	outline: 3px solid #ffb900;
	outline-offset: 2px;
}

.afspaces-message {
	padding: 0.75rem 1rem;
	border-radius: 4px;
	margin: 1rem 0;
	border: 1px solid transparent;
}

.afspaces-message-success {
	background: #edfaef;
	border-color: #46b450;
	color: #1a5d23;
}

.afspaces-message-error {
	background: #fcf0f1;
	border-color: #d63638;
	color: #8a1f1d;
}

.afspaces-member-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

.afspaces-member-table th,
.afspaces-member-table td {
	border: 1px solid #c3c4c7;
	padding: 0.5rem 0.75rem;
	text-align: left;
}

.afspaces-member-table th {
	background: #f0f0f1;
}

/* Registrierung bestehender Foren: Status bleibt auch ohne Farbe verständlich. */
.afspaces-space-registration-table td {
	vertical-align: top;
}

.afspaces-space-registration-table .afspaces-registration-help {
	display: block;
	margin-top: 0.35rem;
	color: #5a6570;
	font-size: 0.9em;
}

.afspaces-status {
	display: inline-block;
	padding: 0.25rem 0.55rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-weight: 700;
	line-height: 1.25;
}

.afspaces-status-registered {
	color: #1a5d23;
	background: #edfaef;
}

.afspaces-status-registrable {
	color: #135e96;
	background: #eef6fc;
}

.afspaces-status-setup_required {
	color: #6b4d00;
	background: #fff8db;
}

.afspaces-empty-state {
	margin: 1rem 0;
}

@media (max-width: 700px) {
	.afspaces-space-registration-table,
	.afspaces-space-registration-table thead,
	.afspaces-space-registration-table tbody,
	.afspaces-space-registration-table tr,
	.afspaces-space-registration-table td {
		display: block;
	}

	.afspaces-space-registration-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.afspaces-space-registration-table tr {
		margin-bottom: 1rem;
		border: 1px solid #c3c4c7;
		border-radius: 6px;
		overflow: hidden;
	}

	.afspaces-space-registration-table td {
		display: grid;
		grid-template-columns: minmax(8rem, 36%) minmax(0, 1fr);
		gap: 0.75rem;
		border: 0;
		border-bottom: 1px solid #e1e8ed;
		padding: 0.75rem;
	}

	.afspaces-space-registration-table td::before {
		content: attr(data-label);
		font-weight: 700;
	}

	.afspaces-space-registration-table td:last-child {
		border-bottom: 0;
	}

	.afspaces-space-registration-table .afspaces-inline-form {
		display: block;
	}

	.afspaces-space-registration-table .afspaces-button {
		max-width: 100%;
		box-sizing: border-box;
		text-align: center;
	}
}

.afspaces-search {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: end;
	margin: 1rem 0;
}

.afspaces-search label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.afspaces-search input[type="search"] {
	min-height: 44px;
	padding: 0.5rem;
	min-width: 16rem;
}

.afspaces-inline-form {
	display: inline;
}

.afspaces-invitations-table .afspaces-inline-form {
	display: inline-flex;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	margin-right: 0.5rem;
}

.afspaces-my-invitations .afspaces-inline-form {
	display: inline-flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.afspaces-button-secondary {
	background: #50575e !important;
	border-color: #50575e !important;
}

.afspaces-button-secondary:hover,
.afspaces-button-secondary:focus {
	background: #3c434a !important;
}

.afspaces-tag {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	background: #f0f0f1;
	border-radius: 3px;
	font-size: 0.875rem;
}

.afspaces-pagination {
	margin: 1rem 0;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.afspaces-pagination a {
	padding: 0.5rem 0.75rem;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	text-decoration: none;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.afspaces-pagination a[aria-current="page"] {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

.afspaces-link-back {
	display: inline-block;
	margin-bottom: 1rem;
	color: #2271b1;
	text-decoration: none;
	font-size: 0.95rem;
}

.afspaces-link-back:hover,
.afspaces-link-back:focus {
	text-decoration: underline;
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.afspaces-working-group-card {
	border-left: 4px solid var(--afspaces-accent, #2271b1);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 251, 0.95));
}

.afspaces-working-group-card-header {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	margin-bottom: 0.75rem;
}

.afspaces-working-group-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--afspaces-accent, #2271b1) 12%, white);
	color: var(--afspaces-accent, #2271b1);
	font-size: 1.2rem;
	flex: 0 0 auto;
}

.afspaces-responsibles-list {
	list-style: none;
	padding: 0;
	margin: 0.5rem 0 0;
	display: grid;
	gap: 0.5rem;
}

.afspaces-responsibles-list li {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	flex-wrap: wrap;
}

/* Arbeitsgruppen als Kacheln (Discover + Profil) */
.afspaces-group-tiles {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
	align-items: start;
}

.afspaces-group-tile {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	padding: 1.15rem 1.25rem;
	border: 1px solid #e2e6ea;
	border-top: 4px solid var(--afspaces-accent, #2d5d7f);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(16, 42, 67, 0.06);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.afspaces-group-tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 22px rgba(16, 42, 67, 0.12);
}

.afspaces-group-tile-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.afspaces-group-avatar {
	flex: 0 0 auto;
}

.afspaces-group-tile-heading {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.afspaces-group-tile-title {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.25;
}

.afspaces-role-tag {
	align-self: flex-start;
}

.afspaces-group-tile-desc {
	margin: 0;
	color: #3c434a;
}

.afspaces-group-tile-topics {
	margin: 0;
	font-size: 0.85rem;
	color: #6b7280;
}

.afspaces-group-tile-actions {
	margin-top: auto;
	padding-top: 0.35rem;
}

/* Mitglieder-Accordion */
.afspaces-members-accordion {
	border-top: 1px solid #eef1f4;
	padding-top: 0.5rem;
}

.afspaces-members-summary {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	list-style: none;
	font-weight: 700;
	color: var(--afspaces-accent, #2d5d7f);
	padding: 0.35rem 0.15rem;
	border-radius: 8px;
}

.afspaces-members-summary::-webkit-details-marker {
	display: none;
}

.afspaces-members-summary-hint::before {
	content: "\25BE";
	display: inline-block;
	transition: transform 0.15s ease;
	font-size: 0.8em;
	color: #6b7280;
}

.afspaces-members-accordion[open] .afspaces-members-summary-hint::before {
	transform: rotate(180deg);
}

.afspaces-members-summary:hover,
.afspaces-members-summary:focus-visible {
	text-decoration: underline;
	outline: none;
}

.afspaces-members-empty {
	margin: 0.5rem 0 0;
	color: #6b7280;
}

/* Mitgliederliste mit Avataren */
.afspaces-working-group-members {
	margin: 1.25rem 0;
}

.afspaces-working-group-members>strong {
	display: block;
	margin-bottom: 0.6rem;
	font-size: 1.05rem;
}

.afspaces-members-grid {
	list-style: none;
	padding: 0;
	margin: 0.5rem 0 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.6rem;
}

.afspaces-member-card {
	margin: 0;
}

.afspaces-member-link {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.5rem 0.7rem;
	border: 1px solid #e2e6ea;
	border-left: 3px solid var(--afspaces-accent, #2d5d7f);
	border-radius: 12px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 1px 2px rgba(16, 42, 67, 0.05);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.afspaces-member-link:hover,
.afspaces-member-link:focus {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(16, 42, 67, 0.12);
	border-color: color-mix(in srgb, var(--afspaces-accent, #2d5d7f) 45%, #e2e6ea);
}

.afspaces-member-avatar {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	line-height: 0;
}

.afspaces-member-avatar img {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	object-fit: cover;
	background: #eef3f7;
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px color-mix(in srgb, var(--afspaces-accent, #2d5d7f) 20%, #fff);
}

.afspaces-member-name {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Geführtes Beitritts-Panel */
.afspaces-join-panel {
	margin: 1rem 0;
	padding: 1rem;
	border: 1px solid color-mix(in srgb, var(--afspaces-accent, #2271b1) 30%, #dcdcde);
	border-radius: 10px;
	background: color-mix(in srgb, var(--afspaces-accent, #2271b1) 5%, white);
}

.afspaces-join-heading {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
}

.afspaces-join-intro {
	margin: 0 0 0.65rem;
	color: #3c434a;
}

.afspaces-join-form {
	display: grid;
	gap: 0.5rem;
}

.afspaces-join-label {
	font-weight: 600;
}

.afspaces-join-textarea {
	width: 100%;
	resize: vertical;
}

.afspaces-join-submit {
	justify-self: start;
}

.afspaces-form-grid {
	display: grid;
	gap: 0.75rem;
	margin: 1rem 0;
}

.afspaces-form-grid label {
	font-weight: 600;
}

.afspaces-form-grid input[type="text"],
.afspaces-form-grid input[type="search"],
.afspaces-form-grid input[type="color"],
.afspaces-form-grid select,
.afspaces-form-grid textarea,
.afspaces-discover-filter input[type="search"],
.afspaces-discover-filter select {
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
}

.afspaces-form-grid textarea {
	min-height: 8rem;
	resize: vertical;
}

.afspaces-discover-filter,
.afspaces-filter {
	display: flex;
	gap: 0.75rem;
	align-items: end;
	flex-wrap: wrap;
	margin: 1rem 0;
}

.afspaces-discover-filter label,
.afspaces-filter label {
	font-weight: 600;
}

.afspaces-profile-view,
.afspaces-working-group-view,
.afspaces-working-group-settings,
.afspaces-discover {
	max-width: 68rem;
	margin: 1.5rem 0;
	font-size: 1rem;
	line-height: 1.5;
}

.afspaces-inline-hint {
	margin: 0;
	color: #4f5f6f;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}

@media (max-width: 780px) {

	.afspaces-member-table,
	.afspaces-member-table thead,
	.afspaces-member-table tbody,
	.afspaces-member-table th,
	.afspaces-member-table td,
	.afspaces-member-table tr {
		display: block;
	}

	.afspaces-member-table thead {
		position: absolute;
		left: -9999px;
	}

	.afspaces-member-table tr {
		border: 1px solid #c3c4c7;
		margin-bottom: 0.75rem;
	}

	.afspaces-member-table td {
		border: 0;
		border-bottom: 1px solid #e2e4e7;
	}

	.afspaces-working-group-card-header {
		flex-direction: column;
	}

	.afspaces-form-grid,
	.afspaces-discover-filter,
	.afspaces-filter {
		grid-template-columns: 1fr;
	}
}

/* Spaces-Hub: Brotkrümel, Unternavigation und Inhalt. */
.afspaces-hub {
	max-width: 60rem;
	margin: 1.5rem 0;
	font-size: 1rem;
	line-height: 1.5;
}

.afspaces-breadcrumb {
	font-size: 0.9rem;
	margin-bottom: 0.75rem;
}

.afspaces-breadcrumb a {
	color: #2271b1;
	text-decoration: none;
}

.afspaces-breadcrumb a:hover,
.afspaces-breadcrumb a:focus {
	text-decoration: underline;
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.afspaces-breadcrumb-sep {
	color: #646970;
	padding: 0 0.25rem;
}

/* .afspaces-hub-nav {
	margin: 0 0 1.5rem;
	border-bottom: 2px solid #c3c4c7;
} */
.afspaces-hub-nav {
	margin: 0 0 1.5rem;
	/* border-bottom: 2px solid #c3c4c7; */
	background: #2d5d7f;
	border: 1px solid #2d5d7f;
	border-radius: 17px;
}

.afspaces-hub-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.afspaces-hub-tab {
	display: inline-block;
	padding: 0.5rem 1rem;
	min-height: 44px;
	line-height: 1.9;
	text-decoration: none;
	color: #fff;

}

.afspaces-hub-tab:hover,
.afspaces-hub-tab:focus {
	background: #f0f0f1;
	color: #2d5d7f;
	border-radius: 10px 10px 0 0;
}

.afspaces-hub-tab:focus-visible {
	outline: 3px solid #ffb900;
	outline-offset: 2px;
}

.afspaces-hub-tab.is-active {
	background: #fff;
	color: #1d2327;
	font-weight: 600;
	border-color: #c3c4c7;
	border-bottom: 2px solid #fff;
	margin-bottom: -2px;
}

/* Einstiegs-Panel innerhalb der Forum-Übersicht. */
.afspaces-forum-panel {
	border: 1px solid #c3c4c7;
	border-left: 4px solid #2271b1;
	border-radius: 6px;
	padding: 1rem;
	margin: 0 0 1.5rem;
	background: #f6f7f7;
}

.afspaces-forum-panel-heading {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
}

.afspaces-forum-panel-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/*
 * Innerhalb des Asgaros-Wrappers (#af-wrapper) setzt das Forum eigene
 * Link-Farben über ID-Selektoren durch. Damit unsere Buttons und Links im
 * Forum korrekt aussehen, erhöhen wir die Spezifität passend.
 */
#af-wrapper .afspaces-forum-panel {
	box-sizing: border-box;
}

#af-wrapper a.afspaces-button:not(a.button):not(a.highlight-admin):not(a.highlight-moderator),
#af-wrapper a.afspaces-button:link:not(a.button):not(a.highlight-admin):not(a.highlight-moderator),
#af-wrapper a.afspaces-button:visited:not(a.button):not(a.highlight-admin):not(a.highlight-moderator) {
	color: #fff !important;
	text-decoration: none;
}


#af-wrapper .afspaces-button:hover,
#af-wrapper .afspaces-button:focus {
	color: #fff !important;
}




#af-wrapper a.afspaces-button-secondary:not(a.button):not(a.highlight-admin):not(a.highlight-moderator),
#af-wrapper a.afspaces-button-secondary:link:not(a.button):not(a.highlight-admin):not(a.highlight-moderator),
#af-wrapper a.afspaces-button-secondary:visited:not(a.button):not(a.highlight-admin):not(a.highlight-moderator) {
	background: #50575e !important;
	border-color: #50575e !important;
	color: #fff !important;
}

#af-wrapper a.afspaces-button-secondary:hover:not(a.button):not(a.highlight-admin):not(a.highlight-moderator) {
	background: #5c677c !important;

}

#af-wrapper .afspaces-forum-panel-heading {
	color: #1d2327;
}

/* Toggle-Status des Menüpunkts. */
a.afspaces-link {
	cursor: pointer;
	user-select: none;
}

a.afspaces-link.is-active {
	font-weight: 600;
	opacity: 0.8;
}

/*
 * Asgaros-nahe Baseline fuer AFSpaces.
 * Feintuning kann ueber die AFSpaces-Look-&-Feel-Einstellungen erfolgen.
 */
#af-wrapper.afspaces-wrapper {
	max-width: 1380px;
	margin: 40px auto !important;
	padding: 34px;
	background: #f7f9fc;
	border: 1px solid #d8e0e8 !important;
	border-radius: 30px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
	font-family: Verdana, Tahoma, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	color: #2f3f50;
}

#af-wrapper.afspaces-wrapper .afspaces-breadcrumb {
	font-size: 0.95rem;
	margin: 0 0 0.9rem;
	color: #6b7b8c;
}

#af-wrapper.afspaces-wrapper .afspaces-breadcrumb a {
	color: #2d5d7f;
}

#af-wrapper.afspaces-wrapper .afspaces-hub-nav {
	background: #356486;
	border: 1px solid #356486;
	border-radius: 16px;
	overflow: hidden;
	margin: 0 0 1.5rem;
}

#af-wrapper.afspaces-wrapper .afspaces-hub-nav ul {
	gap: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-hub-tab {
	padding: 0.65rem 1.2rem;
	min-height: 44px;
	line-height: 1.7;
	color: #ffffff;
	border-radius: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-hub-tab:hover,
#af-wrapper.afspaces-wrapper .afspaces-hub-tab:focus {
	background: rgba(255, 255, 255, 0.16);
	color: #ffffff;
}

#af-wrapper.afspaces-wrapper .afspaces-hub-tab.is-active {
	background: #ffffff;
	color: #1d2f43;
	font-weight: 700;
	border-bottom: none;
	margin-bottom: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-dashboard h2,
#af-wrapper.afspaces-wrapper .afspaces-members h2,
#af-wrapper.afspaces-wrapper .afspaces-invitations h2,
#af-wrapper.afspaces-wrapper .afspaces-join-requests h2,
#af-wrapper.afspaces-wrapper .afspaces-my-invitations h2,
#af-wrapper.afspaces-wrapper .afspaces-space-context-title {
	color: #224c75;
	font-size: clamp(2rem, 4.5vw, 2.9rem);
	line-height: 1.15;
	letter-spacing: 0.01em;
}

#af-wrapper.afspaces-wrapper .afspaces-space-context-title {
	font-size: 1.55rem;
	margin-bottom: 0.35rem;
}

#af-wrapper.afspaces-wrapper .afspaces-space-item {
	background: #ffffff;
	border: 1px solid #ced7e0;
	border-radius: 8px;
}

#af-wrapper.afspaces-wrapper .afspaces-member-table th {
	background: #ecf1f6;
	color: #203648;
	font-weight: 700;
}

#af-wrapper.afspaces-wrapper .afspaces-member-table td,
#af-wrapper.afspaces-wrapper .afspaces-member-table th {
	border-color: #d5dee7;
}

#af-wrapper.afspaces-wrapper .afspaces-pagination a {
	background: #f2f4f7;
	color: #2f3f50;
	border-color: #cad4de;
}

#af-wrapper.afspaces-wrapper .afspaces-button {
	background: #2f74ae !important;
	border-color: #2f74ae !important;
}

#af-wrapper.afspaces-wrapper .afspaces-button-secondary {
	background: #667789 !important;
	border-color: #667789 !important;
}

@media (max-width: 780px) {
	.afspaces-hub-nav ul {
		flex-direction: column;
	}

	.afspaces-hub-tab {
		border-radius: 4px;
		border: 1px solid #c3c4c7;
	}

	.afspaces-hub-tab.is-active {
		margin-bottom: 0;
	}
}

/* Final Asgaros-aligned integration baseline. */
#af-wrapper.afspaces-wrapper {
	max-width: 1290px;
	margin: 0 auto !important;
	padding: 20px 20px 5px;
	background: #fafbfc;
	border: 1px solid #e1e8ed !important;
	border-radius: 30px;
	box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
	font-family: Quicksand, sans-serif;
	font-size: 20px;
	font-weight: 500;
	line-height: normal !important;
	color: #444;
}

#af-wrapper.afspaces-wrapper #forum-header.afspaces-forum-header {
	display: flex;
	align-items: stretch;
	gap: 10px;
	padding: 2px;
	margin: 0;
	background: #2d5d7f;
	border: 0;
	border-radius: 9px;
}

#af-wrapper.afspaces-wrapper #forum-navigation.afspaces-hub-nav {
	flex: 1 1 auto;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 9px;
	overflow: hidden;
}

#af-wrapper.afspaces-wrapper #forum-navigation.afspaces-hub-nav ul {
	gap: 0;
	align-items: stretch;
	height: auto;
	flex-wrap: wrap;
}

#af-wrapper.afspaces-wrapper #forum-navigation.afspaces-hub-nav li+li {
	border-left: 1px solid rgba(255, 255, 255, 0.45);
}

#af-wrapper.afspaces-wrapper #forum-navigation .afspaces-hub-tab {
	display: inline-flex;
	align-items: center;
	padding: 0 17px;
	height: 44px;
	line-height: 44px;
	font-family: Quicksand, sans-serif;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #fff;
	background: transparent;
	border: 0;
	border-radius: 0;
	white-space: nowrap;
}

#af-wrapper.afspaces-wrapper #forum-navigation .afspaces-hub-tab:hover,
#af-wrapper.afspaces-wrapper #forum-navigation .afspaces-hub-tab:focus {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border-radius: 0;
}

#af-wrapper.afspaces-wrapper #forum-navigation .afspaces-hub-tab.is-active {
	background: #fff;
	color: #1d2327;
	font-weight: 700;
	margin: 0;
	border: 0;
	border-radius: 0;
}

#af-wrapper.afspaces-wrapper #forum-search.afspaces-forum-search {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 238px;
	height: 44px;
	padding: 0 14px;
	background: #fff;
	border: 0;
	border-radius: 9px;
	color: #444;
	box-sizing: border-box;
	flex: 0 0 238px;
	margin-left: auto;
}

#af-wrapper.afspaces-wrapper #forum-search .search-icon {
	font-size: 20px;
	color: #444;
	line-height: 1;
}

#af-wrapper.afspaces-wrapper #forum-search .afspaces-header-search-btn {
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: #444;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	font: inherit;
	font-size: 20px;
	line-height: 1;
}

#af-wrapper.afspaces-wrapper #forum-search .afspaces-header-search-btn:hover {
	opacity: 0.8;
}

#af-wrapper.afspaces-wrapper #forum-search .afspaces-header-search-btn:focus {
	outline: 2px solid #2d5d7f;
	outline-offset: -2px;
	border-radius: 4px;
}

#af-wrapper.afspaces-wrapper .afspaces-breadcrumb,
#af-wrapper.afspaces-wrapper #forum-breadcrumbs.afspaces-breadcrumb {
	display: flex;
	align-items: center;
	gap: 0;
	padding: 0 8px;
	margin: 0;
	font-family: Quicksand, sans-serif;
	font-size: 11px;
	font-weight: 500;
	line-height: 26px;
	color: #888;
	list-style: none;
}

#af-wrapper.afspaces-wrapper .afspaces-breadcrumb a {
	padding-right: 6px;
	color: #888;
	text-decoration: none;
}

#af-wrapper.afspaces-wrapper .afspaces-breadcrumb-sep {
	padding: 0 8px 0 2px;
	margin: 0;
	color: #888;
}

#af-wrapper.afspaces-wrapper .afspaces-hub-content {
	padding: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-dashboard,
#af-wrapper.afspaces-wrapper .afspaces-members,
#af-wrapper.afspaces-wrapper .afspaces-invitations,
#af-wrapper.afspaces-wrapper .afspaces-join-requests,
#af-wrapper.afspaces-wrapper .afspaces-my-invitations {
	max-width: none;
	margin: 0 0 15px;
	font-family: Quicksand, sans-serif;
	font-size: 20px;
	font-weight: 500;
	line-height: normal;
}

#af-wrapper.afspaces-wrapper .afspaces-dashboard h2,
#af-wrapper.afspaces-wrapper .afspaces-members h2,
#af-wrapper.afspaces-wrapper .afspaces-invitations h2,
#af-wrapper.afspaces-wrapper .afspaces-join-requests h2,
#af-wrapper.afspaces-wrapper .afspaces-my-invitations h2 {
	margin: 0;
	padding: 16px 0;
	font-family: Quicksand, sans-serif;
	font-size: 42px;
	font-weight: 700;
	line-height: 40px;
	color: #f6a81d;
	letter-spacing: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-space-context {
	margin: 10px 0 15px;
}

#af-wrapper.afspaces-wrapper .afspaces-space-context-title {
	margin: 0 0 10px;
	padding: 0;
	font-family: Quicksand, sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: #2d5d7f;
}

#af-wrapper.afspaces-wrapper .afspaces-space-nav {
	margin-top: 0;
	background: #2d5d7f;
	border: 0;
	border-radius: 9px;
	padding: 2px;
	overflow: hidden;
}

#af-wrapper.afspaces-wrapper .afspaces-space-nav ul {
	gap: 0;
	flex-wrap: wrap;
	min-height: 44px;
}

#af-wrapper.afspaces-wrapper .afspaces-space-nav li+li {
	border-left: 1px solid rgba(255, 255, 255, 0.45);
}

#af-wrapper.afspaces-wrapper .afspaces-space-nav .afspaces-hub-tab {
	padding: 0 24px;
	height: 44px;
	line-height: 44px;
	font-size: 20px;
	font-weight: 500;
	color: #fff;
	background: transparent;
	border: 0;
	border-radius: 0;
	display: inline-flex;
	align-items: center;
}

#af-wrapper.afspaces-wrapper .afspaces-space-nav .afspaces-hub-tab.is-active {
	background: #fff;
	color: #1d2327;
	font-weight: 700;
	margin: 0;
	border: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-space-list {
	gap: 15px;
}

#af-wrapper.afspaces-wrapper .afspaces-search,
#af-wrapper.afspaces-wrapper .afspaces-filter,
#af-wrapper.afspaces-wrapper .afspaces-message,
#af-wrapper.afspaces-wrapper .afspaces-notice,
#af-wrapper.afspaces-wrapper .afspaces-created-invite-link,
#af-wrapper.afspaces-wrapper .afspaces-search-results li {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 9px;
	box-shadow: none;
	box-sizing: border-box;
}

#af-wrapper.afspaces-wrapper .afspaces-section-card {
	padding: 0 16px 16px;
	margin: 0 0 15px;
	overflow: hidden;
}

#af-wrapper.afspaces-wrapper .afspaces-section-title {
	margin: 0 -16px 14px;
	padding: 12px 16px;
	background: #f7f8fa;
	border-bottom: 1px solid #eee;
	font-family: Quicksand, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #4e6173;
}

#af-wrapper.afspaces-wrapper .afspaces-search,
#af-wrapper.afspaces-wrapper .afspaces-filter,
#af-wrapper.afspaces-wrapper .afspaces-created-invite-link {
	padding: 14px 16px;
	margin: 0 0 15px;
}

#af-wrapper.afspaces-wrapper .afspaces-section-card>.afspaces-search,
#af-wrapper.afspaces-wrapper .afspaces-section-card>.afspaces-filter,
#af-wrapper.afspaces-wrapper .afspaces-section-card>.afspaces-created-invite-link {
	padding: 0;
	margin: 0 0 15px;
	background: transparent;
	border: 0;
	border-radius: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-section-card>.afspaces-search:last-child,
#af-wrapper.afspaces-wrapper .afspaces-section-card>.afspaces-filter:last-child,
#af-wrapper.afspaces-wrapper .afspaces-section-card>.afspaces-created-invite-link:last-child {
	margin-bottom: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-message,
#af-wrapper.afspaces-wrapper .afspaces-notice {
	padding: 12px 16px;
	margin: 0 0 15px;
}

#af-wrapper.afspaces-wrapper .afspaces-search-results {
	list-style: none;
	padding: 0;
	margin: 0 0 15px;
	display: grid;
	gap: 15px;
}

#af-wrapper.afspaces-wrapper .afspaces-search-results li {
	padding: 14px 16px;
}

#af-wrapper.afspaces-wrapper .afspaces-section-card>.afspaces-search-results {
	margin-bottom: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-space-item,
#af-wrapper.afspaces-wrapper .afspaces-member-table {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 9px;
	box-shadow: none;
}

#af-wrapper.afspaces-wrapper .afspaces-space-item {
	padding: 18px 20px;
}

#af-wrapper.afspaces-wrapper .afspaces-forum-row {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 0;
	min-height: 96px;
	line-height: normal;
}

#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #eef3f7;
	color: #2d5d7f;
	flex: 0 0 46px;
	font-size: 22px;
}

#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-name {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-title {
	display: inline-block;
	font-family: Quicksand, sans-serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: #2d5d7f;
	text-decoration: none;
	margin: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-title:hover,
#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-title:focus {
	text-decoration: underline;
}

#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-description,
#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-stats {
	display: block;
	margin: 0;
	font-family: Quicksand, sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	color: #5b6670;
}

#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-stats {
	color: #444;
	font-weight: 700;
}

#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-poster {
	flex: 0 0 auto;
	margin-left: auto;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	max-width: 42%;
}

#af-wrapper.afspaces-wrapper .afspaces-forum-row .afspaces-space-actions {
	justify-content: flex-end;
}

#af-wrapper.afspaces-wrapper .afspaces-space-item p,
#af-wrapper.afspaces-wrapper .afspaces-search-results li p,
#af-wrapper.afspaces-wrapper .afspaces-members p,
#af-wrapper.afspaces-wrapper .afspaces-invitations p,
#af-wrapper.afspaces-wrapper .afspaces-join-requests p,
#af-wrapper.afspaces-wrapper .afspaces-my-invitations p {
	font-size: 20px;
	line-height: 1.45;
}

#af-wrapper.afspaces-wrapper .afspaces-space-item h3,
#af-wrapper.afspaces-wrapper .afspaces-members h3,
#af-wrapper.afspaces-wrapper .afspaces-invitations h3,
#af-wrapper.afspaces-wrapper .afspaces-join-requests h3,
#af-wrapper.afspaces-wrapper .afspaces-my-invitations h3 {
	font-family: Quicksand, sans-serif;
	font-weight: 700;
	color: #2d5d7f;
}

#af-wrapper.afspaces-wrapper .afspaces-space-item h3 {
	font-size: 28px;
	line-height: 1.2;
	margin: 0 0 12px;
}

#af-wrapper.afspaces-wrapper .afspaces-members h3,
#af-wrapper.afspaces-wrapper .afspaces-invitations h3,
#af-wrapper.afspaces-wrapper .afspaces-join-requests h3,
#af-wrapper.afspaces-wrapper .afspaces-my-invitations h3 {
	font-size: 26px;
	line-height: 1.25;
	margin: 0 0 12px;
}

#af-wrapper.afspaces-wrapper .afspaces-member-table {
	overflow: hidden;
	border-collapse: separate;
	border-spacing: 0;
	margin: 0 0 15px;
}

#af-wrapper.afspaces-wrapper .afspaces-member-table th,
#af-wrapper.afspaces-wrapper .afspaces-member-table td {
	padding: 14px 16px;
	font-family: Quicksand, sans-serif;
	font-size: 18px;
	line-height: 1.35;
}

#af-wrapper.afspaces-wrapper .afspaces-member-table th {
	background: #f7f8fa;
	color: #4e6173;
	font-size: 16px;
	font-weight: 700;
	text-transform: none;
}

#af-wrapper.afspaces-wrapper .afspaces-member-table tbody tr:nth-child(even) td {
	background: #fcfcfd;
}

#af-wrapper.afspaces-wrapper .afspaces-search label,
#af-wrapper.afspaces-wrapper .afspaces-filter label {
	font-family: Quicksand, sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #4e6173;
}

#af-wrapper.afspaces-wrapper .afspaces-search input[type="search"],
#af-wrapper.afspaces-wrapper .afspaces-filter select,
#af-wrapper.afspaces-wrapper .afspaces-inline-form input[type="text"],
#af-wrapper.afspaces-wrapper .afspaces-inline-form input[type="number"],
#af-wrapper.afspaces-wrapper .afspaces-inline-form input[type="datetime-local"],
#af-wrapper.afspaces-wrapper .afspaces-invite-link-form select,
#af-wrapper.afspaces-wrapper .afspaces-invite-link-form input[type="number"] {
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #d5dce3;
	border-radius: 6px;
	background: #fff;
	font-family: Quicksand, sans-serif;
	font-size: 16px;
	color: #444;
	box-sizing: border-box;
}

#af-wrapper.afspaces-wrapper .afspaces-tag {
	background: #edf3f8;
	color: #2d5d7f;
	font-family: Quicksand, sans-serif;
	font-size: 14px;
	font-weight: 700;
	border-radius: 999px;
	padding: 4px 10px;
}

/* --- Mitglieder-Karten & Avatare (Theme-Override) --- */
#af-wrapper.afspaces-wrapper .afspaces-members-grid {
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 10px;
}

#af-wrapper.afspaces-wrapper .afspaces-member-link {
	padding: 8px 12px;
	border-radius: 14px;
}

#af-wrapper.afspaces-wrapper .afspaces-member-avatar {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
}

#af-wrapper.afspaces-wrapper .afspaces-member-avatar img {
	width: 46px !important;
	height: 46px !important;
	max-width: 46px !important;
	min-width: 46px;
	border-radius: 999px;
	object-fit: cover;
}

#af-wrapper.afspaces-wrapper .afspaces-member-name {
	font-family: Quicksand, sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #2d5d7f;
}

#af-wrapper.afspaces-wrapper .afspaces-working-group-members>strong {
	font-family: Quicksand, sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: #2d5d7f;
}

/* --- Arbeitsgruppen-Karte Feinschliff --- */
#af-wrapper.afspaces-wrapper .afspaces-working-group-card {
	border: 1px solid #e2e6ea;
	border-left: 5px solid var(--afspaces-accent, #2d5d7f);
	border-radius: 16px;
	padding: 1.5rem;
	box-shadow: 0 2px 10px rgba(16, 42, 67, 0.06);
}

#af-wrapper.afspaces-wrapper .afspaces-working-group-view h2 {
	font-family: Quicksand, sans-serif;
	color: #2d5d7f;
}

#af-wrapper.afspaces-wrapper .afspaces-working-group-card-header {
	gap: 1rem;
	align-items: center;
	padding-bottom: 1rem;
	margin-bottom: 1rem;
	border-bottom: 1px solid #eef1f4;
}

#af-wrapper.afspaces-wrapper .afspaces-working-group-icon {
	width: 3.25rem;
	height: 3.25rem;
	font-size: 1.4rem;
	background: color-mix(in srgb, var(--afspaces-accent, #2d5d7f) 14%, #fff);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--afspaces-accent, #2d5d7f) 25%, #fff);
}

/* --- Geführtes Beitritts-Panel --- */
#af-wrapper.afspaces-wrapper .afspaces-join-panel {
	margin: 1.25rem 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid color-mix(in srgb, var(--afspaces-accent, #2d5d7f) 25%, #e2e6ea);
	border-radius: 16px;
	background: linear-gradient(180deg, color-mix(in srgb, var(--afspaces-accent, #2d5d7f) 7%, #fff), #fff);
}

#af-wrapper.afspaces-wrapper .afspaces-join-heading {
	font-family: Quicksand, sans-serif;
	font-size: 19px;
	font-weight: 700;
	color: #2d5d7f;
	margin: 0 0 0.35rem;
}

#af-wrapper.afspaces-wrapper .afspaces-join-textarea {
	min-height: 60px;
	padding: 0.6rem 0.8rem;
	border: 1px solid #c3c4c7;
	border-radius: 10px;
	font-family: inherit;
	font-size: 15px;
}

/* --- Verantwortlichen-Liste als Chips --- */
#af-wrapper.afspaces-wrapper .afspaces-responsibles-list li {
	padding: 4px 6px;
}

/* --- Arbeitsgruppen-Kacheln (Discover + Profil) --- */
#af-wrapper.afspaces-wrapper .afspaces-group-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 18px;
	align-items: start;
	margin: 0;
	padding: 0;
}

#af-wrapper.afspaces-wrapper .afspaces-space-item.afspaces-group-tile {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	padding: 1.25rem 1.35rem;
	border: 1px solid #e2e6ea;
	border-top: 4px solid var(--afspaces-accent, #2d5d7f);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 2px 12px rgba(16, 42, 67, 0.07);
}

#af-wrapper.afspaces-wrapper .afspaces-space-item.afspaces-group-tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(16, 42, 67, 0.14);
}

#af-wrapper.afspaces-wrapper .afspaces-group-tile .afspaces-group-tile-title {
	font-family: Quicksand, sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
	color: #2d5d7f;
}

#af-wrapper.afspaces-wrapper .afspaces-group-tile .afspaces-group-tile-title a {
	color: #2d5d7f;
	text-decoration: none;
}

#af-wrapper.afspaces-wrapper .afspaces-group-tile .afspaces-group-tile-title a:hover,
#af-wrapper.afspaces-wrapper .afspaces-group-tile .afspaces-group-tile-title a:focus {
	text-decoration: underline;
}

#af-wrapper.afspaces-wrapper .afspaces-group-tile .afspaces-group-tile-desc {
	font-size: 16px;
	line-height: 1.5;
	margin: 0;
	color: #4a545e;
}

#af-wrapper.afspaces-wrapper .afspaces-group-tile .afspaces-group-tile-topics {
	font-size: 14px;
	margin: 0;
	color: #6b7280;
}

#af-wrapper.afspaces-wrapper .afspaces-members-summary {
	font-family: Quicksand, sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: var(--afspaces-accent, #2d5d7f);
}

#af-wrapper.afspaces-wrapper .afspaces-members-accordion[open] {
	padding-bottom: 0.25rem;
}

#af-wrapper.afspaces-wrapper .afspaces-button,
#af-wrapper.afspaces-wrapper .afspaces-button-secondary,
#af-wrapper.afspaces-wrapper .afspaces-button-danger {
	min-height: 37px;
	padding: 0 14px;
	border-radius: 4px;
	font-family: Quicksand, sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 37px;
}

#af-wrapper.afspaces-wrapper .afspaces-pagination {
	gap: 6px;
}

#af-wrapper.afspaces-wrapper .afspaces-pagination a {
	min-height: 37px;
	padding: 0 14px;
	border-radius: 4px;
	font-family: Quicksand, sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 37px;
	background: #f2f2f2;
	border-color: #ddd;
	color: #888;
}

#af-wrapper.afspaces-wrapper .afspaces-pagination a[aria-current="page"] {
	background: #2d5d7f;
	border-color: #2d5d7f;
	color: #fff;
}

@media (max-width: 1100px) {
	#af-wrapper.afspaces-wrapper #forum-header.afspaces-forum-header {
		flex-wrap: wrap;
	}

	#af-wrapper.afspaces-wrapper #forum-search.afspaces-forum-search {
		width: 100%;
		flex-basis: 100%;
	}
}

@media (max-width: 780px) {
	#af-wrapper.afspaces-wrapper {
		padding: 16px 16px 4px;
	}

	#af-wrapper.afspaces-wrapper #forum-navigation.afspaces-hub-nav ul,
	#af-wrapper.afspaces-wrapper .afspaces-space-nav ul {
		flex-wrap: wrap;
		height: auto;
	}

	#af-wrapper.afspaces-wrapper #forum-navigation.afspaces-hub-nav li,
	#af-wrapper.afspaces-wrapper .afspaces-space-nav li {
		border-left: 0 !important;
	}

	#af-wrapper.afspaces-wrapper #forum-navigation .afspaces-hub-tab,
	#af-wrapper.afspaces-wrapper .afspaces-space-nav .afspaces-hub-tab {
		width: 100%;
		justify-content: flex-start;
	}

	#af-wrapper.afspaces-wrapper .afspaces-forum-row {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	#af-wrapper.afspaces-wrapper .afspaces-forum-row .forum-poster {
		max-width: none;
		width: 100%;
		margin-left: 0;
		justify-content: flex-start;
	}
}

/* ===== Forensuche (AFSpaces Search) ===== */
#af-wrapper .afspaces-search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
}

#af-wrapper .afspaces-search-form .afspaces-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
}

#af-wrapper .afspaces-search-form input[type="search"],
#af-wrapper .afspaces-search-form select {
	min-height: 2.5rem;
	padding: 0.35rem 0.6rem;
}

#af-wrapper .afspaces-search-status {
	margin: 1rem 0 0.5rem;
	font-weight: 600;
}

#af-wrapper .afspaces-search-results-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

#af-wrapper .afspaces-search-result {
	padding: 1rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#af-wrapper .afspaces-search-result-title {
	margin: 0 0 0.25rem;
	font-size: 1.1rem;
}

#af-wrapper .afspaces-search-result-meta {
	margin: 0 0 0.4rem;
	font-size: 0.9rem;
	opacity: 0.85;
}

#af-wrapper .afspaces-search-result-snippet {
	margin: 0 0 0.4rem;
	line-height: 1.5;
}

#af-wrapper .afspaces-search-result-snippet mark {
	padding: 0 0.1em;
	background: #fff3b0;
	color: inherit;
}

#af-wrapper .afspaces-search-pagination,
.afspaces-search-overlay .afspaces-search-pagination {
	margin-top: 1.25rem;
}

/* Pager im Forum-Look (funktioniert auch im Overlay ausserhalb von #af-wrapper). */
.afspaces-pagination-list {
	list-style: none !important;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.afspaces-pagination-list>li {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

.afspaces-pagination-list a,
.afspaces-pagination-list button,
.afspaces-pagination-list .afspaces-button-link,
#af-wrapper .afspaces-pagination-list a,
#af-wrapper .afspaces-pagination-list .afspaces-button-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	min-height: 2.1rem;
	padding: 0.35rem 0.8rem;
	border: 1px solid #cfd8e0;
	border-radius: 6px;
	background: #fff;
	color: #2d5d7f;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.afspaces-pagination-list a:hover,
.afspaces-pagination-list button:hover,
.afspaces-pagination-list .afspaces-button-link:hover,
#af-wrapper .afspaces-pagination-list a:hover,
#af-wrapper .afspaces-pagination-list .afspaces-button-link:hover {
	background: #2d5d7f;
	color: #fff;
	border-color: #2d5d7f;
	text-decoration: none;
}

.afspaces-pagination-list .afspaces-pagination-status,
#af-wrapper .afspaces-pagination-list .afspaces-pagination-status {
	display: inline-flex;
	align-items: center;
	min-height: 2.1rem;
	padding: 0.35rem 0.9rem;
	border: 1px solid transparent;
	border-radius: 6px;
	background: #eef2f5;
	color: #3a4a58;
	font-weight: 600;
}

/* Hybrid-Suche: Semantik-Schalter & Quellen-Badges */
#af-wrapper .afspaces-search-form .afspaces-field-checkbox {
	flex-direction: row;
	align-items: center;
	gap: 0.4rem;
}

#af-wrapper .afspaces-tag.afspaces-source-forum {
	background: #2d5d7f;
	color: #fff;
}

#af-wrapper .afspaces-tag.afspaces-source-wp {
	background: #4a7c59;
	color: #fff;
}

/* ===== Suche: Filterleiste, Spinner, Overlay (Modal) ===== */
#af-wrapper .afspaces-search-form .afspaces-search-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
}

#af-wrapper .afspaces-search-form .afspaces-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
}

#af-wrapper .afspaces-search-form .afspaces-field-grow {
	flex: 1 1 240px;
	min-width: 200px;
}

#af-wrapper .afspaces-search-form .afspaces-field-submit {
	justify-content: flex-end;
}

#af-wrapper .afspaces-search-form .afspaces-field-submit .afspaces-button {
	min-height: 2.6rem;
}

#af-wrapper .afspaces-search-form input[type="search"],
#af-wrapper .afspaces-search-form input[type="text"],
#af-wrapper .afspaces-search-form input[type="date"],
#af-wrapper .afspaces-search-form select {
	min-height: 2.6rem;
	padding: 0.35rem 0.6rem;
	box-sizing: border-box;
}

#af-wrapper .afspaces-search-form .afspaces-field-checkbox {
	flex-direction: row;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.75rem;
}

#af-wrapper .afspaces-search-filters {
	margin-top: 0.75rem;
}

#af-wrapper .afspaces-search-filters>summary {
	cursor: pointer;
	font-weight: 600;
	padding: 0.35rem 0;
}

#af-wrapper .afspaces-search-filter-row {
	margin-top: 0.5rem;
}

/* Ladebalken auf der Suchseite */
body.afspaces-is-searching::after {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 100%;
	background: linear-gradient(90deg, transparent, #2d5d7f, transparent);
	background-size: 40% 100%;
	background-repeat: no-repeat;
	animation: afspaces-progress 1s linear infinite;
	z-index: 100000;
}

@keyframes afspaces-progress {
	0% {
		background-position: -40% 0;
	}

	100% {
		background-position: 140% 0;
	}
}

/* Spinner */
.afspaces-spinner {
	display: inline-block;
	width: 1.1rem;
	height: 1.1rem;
	border: 2px solid rgba(45, 93, 127, 0.25);
	border-top-color: #2d5d7f;
	border-radius: 50%;
	animation: afspaces-spin 0.8s linear infinite;
	vertical-align: middle;
	margin-right: 0.5rem;
}

@keyframes afspaces-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ===== Such-Overlay (Modal) ===== */
body.afspaces-search-open {
	overflow: hidden;
}

.afspaces-search-overlay[hidden] {
	display: none;
}

.afspaces-search-overlay {
	position: fixed;
	inset: 0;
	z-index: 100010;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 5vh 1rem 1rem;
}

.afspaces-search-overlay__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(20, 30, 40, 0.55);
}

.afspaces-search-overlay__dialog {
	position: relative;
	background: #fff;
	color: #222;
	width: min(1000px, 100%);
	max-height: 90vh;
	overflow: auto;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
	padding: 1.25rem 1.5rem 1.5rem;
}

.afspaces-search-overlay__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
}

.afspaces-search-overlay__title {
	margin: 0;
	font-size: 1.3rem;
}

.afspaces-search-overlay__close {
	background: transparent;
	border: none;
	font-size: 1.8rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	color: #444;
}

.afspaces-search-overlay__close:hover {
	color: #000;
}

.afspaces-search-modal-form .afspaces-search-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: flex-end;
}

.afspaces-search-modal-form .afspaces-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
}

.afspaces-search-modal-form .afspaces-field-grow {
	flex: 1 1 100%;
}

.afspaces-search-modal-form input,
.afspaces-search-modal-form select {
	min-height: 2.5rem;
	padding: 0.35rem 0.6rem;
	box-sizing: border-box;
}

.afspaces-search-modal-status {
	display: flex;
	align-items: center;
	min-height: 1.6rem;
	margin: 0.75rem 0 0.25rem;
	font-weight: 600;
}

.afspaces-search-modal-results .afspaces-search-results-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.afspaces-search-modal-results .afspaces-search-result {
	padding: 0.85rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	font-size: 1.05rem;
}

.afspaces-search-modal-results .afspaces-search-result-title {
	margin: 0 0 0.25rem;
	font-size: 1.25rem;
}

.afspaces-search-modal-results .afspaces-search-result-snippet mark,
#af-wrapper .afspaces-search-result-snippet mark {
	background: #fff3b0;
	color: inherit;
	padding: 0 0.1em;
}

.afspaces-button-link {
	background: transparent;
	border: none;
	color: #2d5d7f;
	cursor: pointer;
	text-decoration: underline;
	padding: 0.25rem 0.4rem;
}

.afspaces-search-link {
	text-decoration: none;
	font-weight: bold;
}

.afspaces-search-trigger__icon {
	margin-right: 0.3rem;
}

.afspaces-search-overlay .afspaces-tag.afspaces-source-forum {
	background: #2d5d7f;
	color: #fff;
}

.afspaces-search-overlay .afspaces-tag.afspaces-source-wp {
	background: #4a7c59;
	color: #fff;
}

@media (max-width: 600px) {
	.afspaces-search-overlay {
		padding: 0;
	}

	.afspaces-search-overlay__dialog {
		max-height: 100vh;
		border-radius: 0;
		width: 100%;
	}
}

/* ===== Suche v2: Spinner-Fix, Filter-/Modal-Feinschliff ===== */
/* Bugfix: .afspaces-spinner setzt display:inline-block und ueberschrieb [hidden]. */
.afspaces-spinner[hidden] {
	display: none !important;
}

/* Modal-Formular: klarere Struktur */
.afspaces-search-overlay__dialog {
	padding: 1.25rem 1.5rem 1.75rem;
}

.afspaces-search-modal-form .afspaces-search-row {
	gap: 0.75rem 1rem;
	align-items: end;
}

.afspaces-search-modal-form .afspaces-field label,
#af-wrapper .afspaces-search-form .afspaces-field>label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #3a4a58;
}

.afspaces-search-modal-form .afspaces-field {
	flex: 1 1 160px;
}

.afspaces-search-modal-form .afspaces-field-grow {
	flex: 1 1 100%;
}

.afspaces-search-modal-form input[type="search"] {
	font-size: 1.05rem;
}

/* Semantik-Zeile: das Element selbst ist Flex (aus .afspaces-field), daher
   KEIN flex-Kurzform-Wert (das Formular ist kein Flex-Container). */
.afspaces-search-modal-form .afspaces-field-checkbox {
	width: 100%;
	flex-direction: row;
	align-items: center;
	gap: 0.4rem;
	margin: 0.85rem 0 0;
}

/* Checkbox und Beschriftung sauber ausrichten (Seite + Overlay). */
.afspaces-field-checkbox>label {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 400;
	margin: 0;
	cursor: pointer;
}

.afspaces-field-checkbox>label>input[type="checkbox"] {
	margin: 0;
	flex: 0 0 auto;
}

/* Filter-Aufklapper als dezente Karte */
.afspaces-search-filters {
	margin-top: 0.9rem;
	border: 1px solid #e1e8ed;
	border-radius: 10px;
	background: #f7f9fb;
	padding: 0.35rem 0.75rem;
}

.afspaces-search-filters>summary {
	list-style: none;
	cursor: pointer;
	font-weight: 600;
	color: #2d5d7f;
	padding: 0.45rem 0;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.afspaces-search-filters>summary::-webkit-details-marker {
	display: none;
}

.afspaces-search-filters>summary::before {
	content: "▸";
	transition: transform 0.15s ease;
	display: inline-block;
}

.afspaces-search-filters[open]>summary::before {
	transform: rotate(90deg);
}

/* Filterfelder als responsives Raster */
.afspaces-search-filter-row {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.75rem 1rem;
	padding: 0.35rem 0 0.75rem;
	align-items: end;
}

.afspaces-search-filter-row .afspaces-field {
	margin: 0;
	min-width: 0;
}

.afspaces-search-filter-row .afspaces-field input,
.afspaces-search-filter-row .afspaces-field select {
	width: 100%;
	box-sizing: border-box;
}

/* Kontext-Badge dezent vom Quellen-Badge unterscheiden */
.afspaces-tag.afspaces-tag-context {
	background: #eef2f5;
	color: #3a4a58;
	border: 1px solid #d9e0e6;
}

/* Ergebnis-Meta luftiger */
.afspaces-search-modal-results .afspaces-search-result-meta,
#af-wrapper .afspaces-search-result-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.9rem;
}
/* MVP 4: Raumgründung, Assistent und Verwaltung. */
.afspaces-create-wizard .afspaces-create-intro {
font-weight: 600;
}

.afspaces-wizard-step {
border: 1px solid var(--theme-palette-color-5, #e1e8ed);
border-radius: 10px;
padding: 1rem 1.25rem;
margin: 0 0 1rem;
}

.afspaces-wizard-step legend {
font-weight: 700;
padding: 0 0.5rem;
}

.afspaces-wizard-nav {
display: flex;
gap: 0.75rem;
margin: 0 0 1rem;
}

.afspaces-radio-option {
display: flex;
flex-direction: column;
gap: 0.15rem;
margin: 0 0 0.75rem;
}

.afspaces-radio-option .description,
.afspaces-danger-hint {
color: #666;
font-size: 0.9em;
}

.afspaces-form-error-summary {
border: 2px solid #b32d2e;
background: #fbeaea;
border-radius: 8px;
padding: 0.75rem 1rem;
margin: 0 0 1rem;
}

.afspaces-button-danger {
background-color: #b32d2e !important;
color: #fff !important;
}

.afspaces-button-secondary {
background-color: #7f98ac !important;
color: #fff !important;
}

.afspaces-space-management form {
margin: 0 0 1rem;
}

.afspaces-management-lifecycle {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
align-items: flex-start;
margin-top: 0.5rem;
}

.afspaces-delete-space {
border-top: 1px solid #e1e8ed;
padding-top: 0.75rem;
width: 100%;
}

.afspaces-approvals-list {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 1rem;
}

.afspaces-approval-item {
padding: 1rem 1.25rem;
}

.afspaces-approval-actions {
display: flex;
flex-wrap: wrap;
gap: 1rem;
align-items: flex-end;
margin-top: 0.5rem;
}

.afspaces-approval-actions textarea {
min-width: 260px;
}

/* MVP 4: Unternavigation des Bereichs "Meine Arbeitsgruppen". */
.afspaces-dashboard-subnav {
margin: 0 0 1rem;
}

.afspaces-dashboard-subnav ul {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
list-style: none;
margin: 0;
padding: 0;
}

/* MVP 4: Freigabeliste (Approvals) aufgeraeumt. */
.afspaces-approval-item h3 {
margin-top: 0;
}

.afspaces-approval-actions {
align-items: flex-start;
}

.afspaces-reject-form {
display: flex;
flex-direction: column;
gap: 0.35rem;
max-width: 420px;
}

.afspaces-reject-form label {
font-weight: 600;
}

.afspaces-reject-form textarea {
width: 100%;
min-height: 3.5rem;
max-height: 8rem;
box-sizing: border-box;
}

/* MVP 4: Ansicht/Bearbeiten-Umschalter + Dashboard-Aktionen. */
.afspaces-detail-toggle {
display: inline-flex;
gap: 0.25rem;
margin: 0 0 1rem;
padding: 0.25rem;
background: #eef2f5;
border-radius: 8px;
}

.afspaces-detail-toggle .afspaces-button {
margin: 0;
}

.afspaces-detail-toggle .afspaces-button.is-active {
pointer-events: none;
}

.afspaces-space-actions {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
align-items: center;
margin-top: 0.75rem;
}

.afspaces-forum-row .afspaces-space-actions {
justify-content: flex-end;
}

/* MVP 4: Raum-begrenzte Moderation. */
.afspaces-moderation-table {
width: 100%;
border-collapse: collapse;
margin: 0.5rem 0 1rem;
}

.afspaces-moderation-table th,
.afspaces-moderation-table td {
text-align: left;
padding: 0.5rem 0.6rem;
border-bottom: 1px solid #e1e8ed;
vertical-align: middle;
}

.afspaces-moderation-table thead th {
font-weight: 700;
border-bottom: 2px solid #cdd7df;
}

.afspaces-moderation-actions {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
}

.afspaces-moderation-actions form {
margin: 0;
}

/* MVP 4: Moderationsknoepfe direkt im Forum + Beitragsebene. */
.afspaces-forum-moderation {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
margin: 0.5rem 0 0.25rem;
padding-top: 0.5rem;
border-top: 1px dashed #d5dde3;
}

.afspaces-forum-moderation-label {
font-size: 0.85em;
color: #777;
font-weight: 600;
}

.afspaces-forum-moderation-form {
display: inline-flex;
align-items: center;
gap: 0.3rem;
margin: 0;
}

.afspaces-forum-moderation .afspaces-button {
font-size: 0.85em;
padding: 0.25rem 0.6rem;
}

.afspaces-moderation-posts {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 0.75rem;
}

.afspaces-moderation-post {
padding: 0.75rem 1rem;
}

.afspaces-moderation-post-meta {
margin: 0 0 0.4rem;
}

.afspaces-moderation-post-text {
margin: 0 0 0.6rem;
}

/* MVP 4: kompakte Moderationsaktionen im Beitragsmenue (.forum-post-menu). */
.forum-post-menu .afspaces-post-mod {
display: inline;
}

.afspaces-mod-form {
display: inline;
margin: 0;
}

.afspaces-mod-item {
background: none;
border: 0;
padding: 0;
margin: 0 0 0 14px;
cursor: pointer;
color: inherit;
font: inherit;
display: inline-flex;
align-items: center;
gap: 4px;
}

.afspaces-mod-item:hover,
.afspaces-mod-item:focus {
text-decoration: underline;
}

.afspaces-mod-move {
position: relative;
display: inline-block;
margin-left: 14px;
}

.afspaces-mod-move > summary {
list-style: none;
margin: 0;
cursor: pointer;
}

.afspaces-mod-move > summary::-webkit-details-marker {
display: none;
}

.afspaces-mod-move > summary.afspaces-mod-item {
margin-left: 0;
}

.afspaces-mod-move > .afspaces-mod-move-form {
position: absolute;
right: 0;
z-index: 30;
background: #fff;
border: 1px solid #d5dde3;
border-radius: 8px;
padding: 0.6rem;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
display: flex;
flex-direction: column;
gap: 0.4rem;
min-width: 220px;
}
.afspaces-mod-confirm {
	margin: 0 0 0.4rem;
	font-size: 0.9em;
	color: #555;
}
