/*
 * 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 .db100-cookie-float-btn to match the PHP class/id.
 */

.db100-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"] .db100-cookie-float-btn,
body.rtl .db100-cookie-float-btn {
	left: var(--float-btn-side, 16px);
	right: auto;
}

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

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

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

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

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

/* Site settings (Madadim, 3.11.2026): on phones the theme's round contact button (.mobile-contact-options)
   sits bottom-left at 20px, so the floats start above it. */
:root {
	--float-btn-side: 20px;
	--float-btn-offset-bottom: 20px;
}
@media (max-width: 950px) {
	:root {
		--float-btn-offset-bottom: 84px;
	}
}

/* Madadim, 3.11.2026 (Yehi): float colors from the site brand (green top bar),
   and the theme's contact menu (+ call / WhatsApp) opens above the floats. */
:root {
	--float-btn-bg: #00765a;
	--float-btn-color: #ffffff;
}
.mobile-contact-options {
	z-index: 100000 !important;
}
