/*
 * Tawk.to Huisstijl, eigen launcher knop.
 * Kleuren, afronding en positie komen uit CSS variabelen die de plugin op :root zet.
 */

.tvbtawk-launcher {
	position: fixed;
	z-index: var(--tvbtawk-z, 2147483000);
	bottom: calc(var(--tvbtawk-y, 20px) + env(safe-area-inset-bottom, 0px));
	display: inline-flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	height: 52px;
	margin: 0;
	padding: 0 20px 0 16px;
	background: var(--tvbtawk-primary, #1a4821) !important;
	color: var(--tvbtawk-on-primary, #fff) !important;
	border: 0 !important;
	border-radius: var(--tvbtawk-radius, 3px) !important;
	box-shadow: 0 0 0 2px var(--tvbtawk-on-primary, #fff), 0 8px 22px rgba(0, 0, 0, 0.3);
	font-family: var(--tvbtawk-font, inherit), system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
	font-size: 16px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	letter-spacing: 0.02em;
	text-transform: var(--tvbtawk-transform, uppercase) !important;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tvbtawk-launcher[hidden] {
	display: none !important;
}

.tvbtawk-launcher--right {
	right: calc(var(--tvbtawk-x, 20px) + env(safe-area-inset-right, 0px));
}

.tvbtawk-launcher--left {
	left: calc(var(--tvbtawk-x, 20px) + env(safe-area-inset-left, 0px));
}

.tvbtawk-launcher:hover {
	background: var(--tvbtawk-primary-dark, #143a1a) !important;
	transform: translateY(-1px);
}

.tvbtawk-launcher:active {
	transform: translateY(0);
}

.tvbtawk-launcher:focus {
	outline: none;
}

.tvbtawk-launcher:focus-visible {
	box-shadow:
		0 0 0 2px var(--tvbtawk-primary, #1a4821),
		0 0 0 5px var(--tvbtawk-on-primary, #fff),
		0 8px 22px rgba(0, 0, 0, 0.3);
}

.tvbtawk-launcher__icon {
	display: inline-flex;
	flex: none;
}

.tvbtawk-launcher__icon svg {
	display: block;
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.tvbtawk-launcher__label {
	display: inline-block;
}

/* Online status, rechtsboven op de knop */
.tvbtawk-launcher__dot {
	position: absolute;
	top: -5px;
	right: -5px;
	box-sizing: border-box;
	width: 13px;
	height: 13px;
	background: #4ade80;
	border: 2px solid #fff;
	border-radius: 50%;
}

.tvbtawk-launcher[data-status="away"] .tvbtawk-launcher__dot {
	background: #f59e0b;
}

.tvbtawk-launcher[data-status="offline"] .tvbtawk-launcher__dot {
	background: #9ca3af;
}

/* Teller voor ongelezen berichten vervangt de statusstip */
.tvbtawk-launcher__badge {
	position: absolute;
	top: -10px;
	right: -10px;
	box-sizing: border-box;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	background: #d92d20;
	color: #fff;
	border: 2px solid #fff;
	border-radius: 11px;
	font-size: 12px;
	font-weight: 800;
	line-height: 18px;
	text-align: center;
	letter-spacing: 0;
}

.tvbtawk-launcher__badge[hidden] {
	display: none;
}

.tvbtawk-launcher[data-unread="1"] .tvbtawk-launcher__dot {
	display: none;
}

/* Kleine schermen: alleen het icoon, tenzij de tekst expliciet aan staat */
@media (max-width: 600px) {
	.tvbtawk-launcher:not([data-label-mobile="1"]):not(.tvbtawk-launcher--preview) {
		width: 54px;
		height: 54px;
		padding: 0;
		justify-content: center;
	}

	.tvbtawk-launcher:not([data-label-mobile="1"]):not(.tvbtawk-launcher--preview) .tvbtawk-launcher__label {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

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

	.tvbtawk-launcher:hover {
		transform: none;
	}
}

@media print {
	.tvbtawk-launcher {
		display: none !important;
	}
}
