/* Keywords Links - inschuifpaneel met advertentie.
   Desktop: van rechts. Mobiel: bottom-sheet van onderen omhoog. */

/* Klikbaar trefwoord: content/advertentie-kaartje-icoon in de linkkleur (currentColor). */
.kwl-link::after {
	content: "";
	display: inline-block;
	width: 0.85em;
	height: 0.85em;
	margin-left: 0.28em;
	vertical-align: -0.12em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='5'%20width='18'%20height='14'%20rx='2'/%3E%3Crect%20x='6'%20y='8.5'%20width='5'%20height='7'%20rx='1'/%3E%3Cline%20x1='14'%20y1='9'%20x2='18'%20y2='9'/%3E%3Cline%20x1='14'%20y1='12'%20x2='18'%20y2='12'/%3E%3Cline%20x1='14'%20y1='15'%20x2='17'%20y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='5'%20width='18'%20height='14'%20rx='2'/%3E%3Crect%20x='6'%20y='8.5'%20width='5'%20height='7'%20rx='1'/%3E%3Cline%20x1='14'%20y1='9'%20x2='18'%20y2='9'/%3E%3Cline%20x1='14'%20y1='12'%20x2='18'%20y2='12'/%3E%3Cline%20x1='14'%20y1='15'%20x2='17'%20y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
}

.kwl-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
	z-index: 2147483646;
}

.kwl-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.kwl-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: 380px;
	max-width: 92vw;
	background: #ffffff;
	box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	z-index: 2147483647;
	display: flex;
	flex-direction: column;
	font-family: inherit;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.kwl-panel.is-open {
	transform: translateX(0);
}

.kwl-panel.is-dragging {
	transition: none;
}

.kwl-panel__handle {
	display: none;
	flex: 0 0 auto;
	width: 44px;
	height: 5px;
	margin: 10px auto 4px;
	border-radius: 999px;
	background: #cbd5e1;
}

.kwl-panel__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #0f172a;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	z-index: 3;
}

.kwl-panel__close:hover {
	background: #ffffff;
}

.kwl-panel__body {
	padding: 44px 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1;
}

.kwl-panel__label {
	display: inline-block;
	align-self: flex-start;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #64748b;
	background: #f1f5f9;
	padding: 3px 8px;
	border-radius: 4px;
}

.kwl-panel__ad {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	flex: 1;
	min-height: 120px;
}

.kwl-panel__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.kwl-panel__ad.is-loaded .kwl-panel__loading {
	display: none;
}

.kwl-spinner {
	width: 26px;
	height: 26px;
	border: 3px solid #e2e8f0;
	border-top-color: #94a3b8;
	border-radius: 50%;
	animation: kwl-spin 0.8s linear infinite;
}

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

/* --- Mobiel: bottom-sheet --- */
@media (max-width: 600px) {
	.kwl-panel {
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		width: 100%;
		max-width: 100%;
		height: auto;
		max-height: 88vh;
		border-radius: 18px 18px 0 0;
		box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
		transform: translateY(100%);
	}

	.kwl-panel.is-open {
		transform: translateY(0);
	}

	.kwl-panel__handle {
		display: block;
	}

	.kwl-panel__body {
		padding: 8px 16px 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kwl-overlay,
	.kwl-panel {
		transition: none;
	}
}
