/* CB Profilansicht – Profilseite im MUSIKERLUX-Stil (C) 2026 Designsektor, GNU/GPL version 2 */

.mlxProfile {
	--mlxp-brand: var(--mlx-accent, #4e2a56);
	--mlxp-brand-soft: #f1e9f3;
	--mlxp-dark: var(--mlx-primary, #2f5353);
	--mlxp-text: var(--mlx-text, #2c2e36);
	--mlxp-muted: var(--mlx-muted, #626875);
	--mlxp-line: #e2e6e9;
	--mlxp-fill: #f3f5f6;
	--mlxp-radius: 14px;

	color: var(--mlxp-text);
}

/* ---------- Kopfbereich ---------- */

.mlxProfile__hero {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 1.25rem 1.75rem;
	margin: 0 0 1.5rem;
	padding: 1.75rem;
	border-radius: var(--mlxp-radius);
	overflow: hidden;
	background: var(--mlxp-dark);
	color: #fff;
}

/* dezente Fläche in Markenfarbe rechts oben */
.mlxProfile__hero::before {
	position: absolute;
	top: -40%;
	right: -10%;
	width: 45%;
	height: 180%;
	background: var(--mlxp-brand);
	opacity: .55;
	transform: rotate(18deg);
	content: "";
	pointer-events: none;
}

.mlxProfile__hero > * {
	position: relative;
}

.mlxProfile__avatar img {
	display: block;
	width: 148px;
	height: 148px;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
	border-radius: 50% !important;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), 0 10px 30px rgba(0, 0, 0, .25);
}

.mlxProfile__badges {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	margin: 0 0 .5rem;
	padding: 0;
	list-style: none;
}

.mlxProfile__badge {
	padding: .25rem .7rem;
	border-radius: 999px;
	background: #fff;
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--mlxp-brand);
}

.mlxProfile .mlxProfile__name {
	margin: 0 !important;
	font-size: clamp(1.6rem, 3vw, 2.3rem) !important;
	font-weight: 800 !important;
	line-height: 1.15 !important;
	color: #fff !important;
	overflow-wrap: anywhere;
}

.mlxProfile__type {
	margin: .25rem 0 0;
	font-size: 1.05rem;
	opacity: .9;
}

.mlxProfile__metas {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem 1.1rem;
	margin: .85rem 0 0;
	padding: 0;
	list-style: none;
	font-size: .9375rem;
}

.mlxProfile__meta {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	opacity: .95;
}

.mlxProfile__meta svg {
	width: 1.05em;
	height: 1.05em;
	fill: currentColor;
}

.mlxProfile__meta--distance {
	padding: .1rem .55rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, .15);
	font-weight: 700;
}

.mlxProfile__actions {
	display: flex;
	flex-direction: column;
	gap: .6rem;
	min-width: 13rem;
}

.mlxProfile__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .7rem 1.2rem;
	border-radius: 999px;
	background: #fff;
	font-weight: 800;
	text-align: center;
	text-decoration: none !important;
	color: var(--mlxp-brand) !important;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	transition: transform .15s ease, box-shadow .15s ease;
}

.mlxProfile__btn:hover,
.mlxProfile__btn:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}

.mlxProfile__btn:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

.mlxProfile__btn--ghost {
	background: transparent;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8);
	color: #fff !important;
}

/* ---------- Anordnung ---------- */

.mlxProfile--ready .cbProfile > :not(.mlxProfile__layout) {
	display: none !important;
}

.mlxProfile__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
	align-items: start;
	gap: 1.5rem;
}

.mlxProfile__layout--single {
	grid-template-columns: minmax(0, 1fr);
}

.mlxProfile__main,
.mlxProfile__side {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	min-width: 0;
}

.mlxProfile__side {
	position: sticky;
	top: 1.5rem;
}

/* Steckbrief: die beiden Feld-Reiter nebeneinander, wenn Platz ist */
.mlxProfile__main {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mlxProfile__main > :not(.mlxProfile__card--facts) {
	grid-column: 1 / -1;
}

/* ---------- Karten ---------- */

.mlxProfile .cb_tab_container {
	margin: 0 !important;
	border: 1px solid var(--mlxp-line);
	border-radius: var(--mlxp-radius);
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
	overflow: visible;
}

.mlxProfile .cb_tab_container > .card-header {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: 1.1rem 1.25rem .35rem;
	border: 0;
	background: none;
	font-size: .8125rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mlxp-brand);
}

.mlxProfile .cb_tab_container > .card-header::before {
	width: .3rem;
	height: 1rem;
	border-radius: 2px;
	background: var(--mlxp-brand);
	content: "";
}

.mlxProfile .cb_tab_container > .card-header .badge {
	border: 0 !important;
	background: var(--mlxp-brand-soft) !important;
	color: var(--mlxp-brand) !important;
}

.mlxProfile .cb_tab_container > .cb_tab_content {
	padding: .75rem 1.25rem 1.25rem;
}

/* Steckbrief-Zeilen: Bezeichnung klein über dem Wert, feine Trennlinien */
.mlxProfile__card--facts .cb_form_line {
	display: block;
	margin: 0 !important;
	padding: .6rem 0;
	border-top: 1px solid var(--mlxp-line);
}

.mlxProfile__card--facts .cb_form_line:first-child {
	border-top: 0;
}

.mlxProfile__card--facts .cb_form_line > .col-form-label {
	display: block;
	width: auto;
	max-width: none;
	margin: 0 0 .1rem;
	padding: 0 !important;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--mlxp-muted);
}

.mlxProfile__card--facts .cb_form_line > .cb_field {
	width: auto;
	max-width: none;
	padding: 0;
	font-size: 1rem;
	font-weight: 500;
}

.mlxProfile__chips {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	margin: .2rem 0 0;
	padding: 0;
	list-style: none;
}

.mlxProfile__chips li {
	padding: .2rem .65rem;
	border-radius: 999px;
	background: var(--mlxp-brand-soft);
	font-size: .875rem;
	font-weight: 600;
	color: var(--mlxp-brand);
}

/* Nachricht */
.mlxProfile__card--message {
	border-top: 4px solid var(--mlxp-brand);
}

.mlxProfile__card--message textarea {
	min-height: 9rem;
	border-radius: 10px;
	background: var(--mlxp-fill);
	border-color: transparent;
}

.mlxProfile__card--message textarea:focus {
	border-color: var(--mlxp-brand);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(78, 42, 86, .15);
}

.mlxProfile__card--message .pmButtonSubmit {
	width: 100%;
	margin-top: .5rem;
	padding: .65rem 1rem;
	border: 0;
	border-radius: 999px;
	background: var(--mlxp-brand) !important;
	font-weight: 800;
	color: #fff !important;
}

.mlxProfile__card--side .cbConnectionPaths {
	margin: 0;
	border: 0;
	border-radius: 10px;
	background: var(--mlxp-fill);
	color: var(--mlxp-text);
}

.mlxProfile__card--side .cbConnectionPaths img {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.mlxProfile__card--side .cbConnPathActions {
	flex: 0 0 100%;
	max-width: 100%;
	margin-top: .5rem;
	text-align: left !important;
}

.mlxProfile__card--side .cbConnPathAccept {
	border-radius: 999px;
}

/* Aktuelles: ruhiger, kompakter */
.mlxProfile__card--activity .streamItem {
	border: 0;
	border-top: 1px solid var(--mlxp-line);
	border-radius: 0;
	box-shadow: none;
}

.mlxProfile__card--activity .streamItem:first-child {
	border-top: 0;
}

.mlxProfile__more {
	display: block;
	width: 100%;
	margin-top: .75rem;
	padding: .6rem 1rem;
	border: 0;
	border-radius: 999px;
	background: var(--mlxp-fill);
	font-weight: 700;
	color: var(--mlxp-brand);
	cursor: pointer;
}

.mlxProfile__more:hover,
.mlxProfile__more:focus-visible {
	background: var(--mlxp-brand-soft);
}

/* ---------- Kleinere Bildschirme ---------- */

@media (max-width: 991.98px) {
	.mlxProfile__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.mlxProfile__side {
		position: static;
	}

	.mlxProfile__hero {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.mlxProfile__actions {
		grid-column: 1 / -1;
		flex-direction: row;
		flex-wrap: wrap;
	}
}

@media (max-width: 575.98px) {
	.mlxProfile__hero {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		padding: 1.5rem 1rem;
		text-align: center;
	}

	.mlxProfile__badges,
	.mlxProfile__metas {
		justify-content: center;
	}

	.mlxProfile__avatar img {
		width: 120px;
		height: 120px;
	}

	.mlxProfile__actions {
		width: 100%;
		min-width: 0;
		flex-direction: column;
	}

	.mlxProfile__main {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mlxProfile__btn {
		transition: none;
	}

	.mlxProfile__btn:hover {
		transform: none;
	}
}

/* Knöpfe und Links in den Markenfarben – unabhängig von der Primärfarbe des Templates (auf live Bootstrap-Blau) */
:is(.mlxProfile, .mlx-adsTab) {
	--bs-link-color: #2f5353;
	--bs-link-color-rgb: 47, 83, 83;
	--bs-link-hover-color: #4e2a56;
	--bs-link-hover-color-rgb: 78, 42, 86;
}

:is(.mlxProfile, .mlx-adsTab) .btn-primary {
	--bs-btn-color: #fff;
	--bs-btn-bg: #2f5353;
	--bs-btn-border-color: #2f5353;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #4e2a56;
	--bs-btn-hover-border-color: #4e2a56;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #4e2a56;
	--bs-btn-active-border-color: #4e2a56;
	--bs-btn-focus-shadow-rgb: 78, 42, 86;
}

:is(.mlxProfile, .mlx-adsTab) .btn-outline-primary {
	--bs-btn-color: #2f5353;
	--bs-btn-border-color: #2f5353;
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #2f5353;
	--bs-btn-hover-border-color: #2f5353;
	--bs-btn-active-color: #fff;
	--bs-btn-active-bg: #2f5353;
	--bs-btn-active-border-color: #2f5353;
	--bs-btn-focus-shadow-rgb: 47, 83, 83;
}
