/*
 * Cookie settings float button (portable)
 * wp-float-buttons-a11y-cookies 1.2.0
 *
 * Default: stacks ABOVE the a11y float (offset + size + 8px).
 * Cookies-only: change bottom to var(--float-btn-offset-bottom, 20px)
 *               and mobile bottom to the same (no +48px+8px).
 *
 * Rename .ppi2000-cookie-float-btn to match the PHP class/id.
 */

.ppi2000-cookie-float-btn {
	position: fixed;

	/* LTR: bottom-right. RTL: bottom-left (see rule below). Same side as the a11y float. */
	right: var(--float-btn-side, 16px);
	left: auto;

	/* Both modules: sit above a11y. Cookies-only: use offset only — see comment above. */
	bottom: calc(
		var(--float-btn-offset-bottom, 20px) +
		var(--float-btn-size, 44px) +
		8px
	);

	z-index: 99998;

	width: var(--float-btn-size, 44px);
	height: var(--float-btn-size, 44px);
	padding: 0;

	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;

	background-color: var(--float-btn-bg, #1e293b);
	color: var(--float-btn-color, #ffffff);

	transition: transform 0.15s ease;
}

/* WordPress marks RTL pages with dir="rtl" / body.rtl only; LTR pages have no marker. */
html[dir="rtl"] .ppi2000-cookie-float-btn,
body.rtl .ppi2000-cookie-float-btn {
	left: var(--float-btn-side, 16px);
	right: auto;
}

.ppi2000-cookie-float-btn:hover,
.ppi2000-cookie-float-btn:focus {
	transform: scale(1.05);
}

.ppi2000-cookie-float-btn svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	pointer-events: none;
}

@media (max-width: 950px) {
	.ppi2000-cookie-float-btn {
		width: 48px;
		height: 48px;

		bottom: calc(
			var(--float-btn-offset-bottom, 20px) +
			48px +
			8px
		);
	}

	.ppi2000-cookie-float-btn svg {
		width: 20px;
		height: 20px;
	}
}

