/*
 * Mobile Social-Leiste – Layout.
 *
 * Farben, Icon-Größe, Abstände und die Breakpoint-Sichtbarkeit kommen als
 * Inline-CSS aus den Einstellungen (siehe MSL_Frontend::dynamic_css()).
 * Die Leiste ist hier standardmäßig ausgeblendet (display:none) und wird per
 * Media-Query am Breakpoint auf "flex" geschaltet – so erscheint sie NUR auf
 * dem Smartphone.
 *
 * Zwei Layouts:
 *   .msl-bar--full     = randlose Kacheln über die volle Breite.
 *   .msl-bar--floating = schwebende, runde Icons mit Abstand vom Rand.
 */

.msl-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	display: none; /* wird per Inline-CSS am Breakpoint auf flex gesetzt */
	align-items: stretch;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

.msl-bar,
.msl-bar * {
	box-sizing: border-box;
}

.msl-bar .msl-item {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: var(--msl-fg, #ffffff);
	background: var(--msl-bg, #1e3a5f);
	-webkit-tap-highlight-color: transparent;
	transition: filter 0.15s ease, transform 0.06s ease;
}

.msl-bar .msl-item:link,
.msl-bar .msl-item:visited {
	text-decoration: none;
}

.msl-bar .msl-item:hover {
	filter: brightness(1.08);
}

.msl-bar .msl-item:active {
	transform: translateY(1px);
	filter: brightness(0.92);
}

.msl-bar .msl-item:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.85);
	outline-offset: -3px;
}

.msl-bar .msl-item svg {
	width: var(--msl-icon-size, 22px);
	height: var(--msl-icon-size, 22px);
	display: block;
	flex: none;
}

/* Nur für Screenreader – Text unsichtbar, aber vorlesbar. */
.msl-bar .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ── Layout: randlose Kacheln ─────────────────────────────────────────────── */
.msl-bar--full {
	background: var(--msl-bar-bg, #1e3a5f);
	gap: var(--msl-gap, 1px);
	padding: 0 0 env(safe-area-inset-bottom, 0px) 0;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.18);
}

.msl-bar--full .msl-item {
	flex: 1 1 0;
	min-width: 0;
	min-height: 54px;
	padding: 8px 4px;
}

/* ── Layout: schwebende, runde Icons ──────────────────────────────────────── */
.msl-bar--floating {
	justify-content: center;
	gap: max(var(--msl-gap, 1px), 8px);
	padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)) 12px;
	background: transparent;
	pointer-events: none; /* nur die Icons klickbar, nicht die leere Leiste */
}

.msl-bar--floating .msl-item {
	pointer-events: auto;
	width: 46px;
	height: 46px;
	flex: 0 0 auto;
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

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