/*
 * Mobile Kontaktleiste (Audit-Maßnahme A1)
 * Präfix tsb- gegen Konflikte mit Bootstrap/Theme.
 * Breakpoint 767.98px = Bootstrap "md" (Navbar klappt darunter zum Hamburger zusammen).
 */

.tsb-contactbar {
	display: none;
}

@media screen and (max-width: 767.98px) {
	.tsb-contactbar {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1030; /* Bootstrap-Ebene für fixe Leisten; Dropdowns/Modals liegen darüber */
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
		background: #fff;
		box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
		font-family: "Open Sans", Arial, sans-serif;
		transition: transform 0.2s ease;
	}

	/* ausgeblendet, während ein Formularfeld fokussiert ist (Tastatur offen) */
	.tsb-contactbar--hidden {
		transform: translateY(110%);
	}

	.tsb-contactbar__btn {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		min-height: 52px;
		padding: 4px;
		border: 2px solid #172983;
		border-radius: 10px;
		background: #fff;
		color: #172983;
		font-size: 14px;
		font-weight: 600;
		line-height: 1.1;
		text-decoration: none;
		-webkit-tap-highlight-color: transparent;
	}

	.tsb-contactbar__btn:hover,
	.tsb-contactbar__btn:focus-visible {
		background: #eef1fa;
		color: #172983;
		text-decoration: none;
	}

	.tsb-contactbar__btn:focus-visible {
		outline: 3px solid #b3c1e2;
		outline-offset: 2px;
	}

	.tsb-contactbar__btn--primary,
	.tsb-contactbar__btn--primary:hover,
	.tsb-contactbar__btn--primary:focus-visible {
		background: #172983;
		color: #fff;
	}

	.tsb-contactbar__icon {
		width: 22px;
		height: 22px;
		flex: none;
	}

	/* Platz schaffen, damit die Leiste den Footer nicht verdeckt */
	body.tsb-has-contactbar,
	body:has(.tsb-contactbar) {
		padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
	}
}

@media print {
	.tsb-contactbar {
		display: none !important;
	}
}
