/* Cinderella WhatsApp 1.0.1 – floating chat button, Terrace style
   Hebrew: left side · English: right side. Lifts above the soundtrack TV (--cmp-wa-above, set by whatsapp.js). */

.cmp-wa {
	--wa-green: #25d366;
	--wa-ink: #22211d;
	--wa-paper: #e6e1d3;
	--wa-sodium: #f0a030;
	position: fixed;
	z-index: 99980;
	bottom: max(calc(24px + env(safe-area-inset-bottom)), calc(var(--cmp-wa-above, 0px) + 16px));
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 56px;
	box-sizing: border-box;
	background: var(--wa-ink);
	color: var(--wa-paper);
	font: 800 16px/1 "Heebo", system-ui, sans-serif;
	letter-spacing: .01em;
	text-decoration: none;
	box-shadow: 0 0 0 3px var(--wa-paper), 6px 6px 0 3px var(--wa-sodium);
	transform: rotate(-1.5deg);
	transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s cubic-bezier(.2, .8, .2, 1), bottom .25s cubic-bezier(.2, .8, .2, 1);
	-webkit-tap-highlight-color: transparent;
}
.cmp-wa--left { left: 24px; right: auto; direction: rtl; padding: 0 8px 0 20px; }
.cmp-wa--right { right: 24px; left: auto; direction: ltr; padding: 0 20px 0 8px; transform: rotate(1.5deg); }

.cmp-wa__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--wa-green);
	color: #fff;
}
.cmp-wa__icon svg { display: block; width: 26px; height: 26px; }
.cmp-wa__label { white-space: nowrap; }

@media (hover: hover) and (pointer: fine) {
	.cmp-wa:hover { transform: rotate(0deg) translateY(-2px); box-shadow: 0 0 0 3px var(--wa-paper), 8px 8px 0 3px var(--wa-sodium); color: #fff; }
}
.cmp-wa:active { transform: rotate(0deg) translate(3px, 3px); box-shadow: 0 0 0 3px var(--wa-paper), 2px 2px 0 3px var(--wa-sodium); }
.cmp-wa:focus-visible { outline: 3px solid var(--wa-sodium); outline-offset: 6px; }

/* mobile: icon only */
@media (max-width: 600px) {
	.cmp-wa {
		bottom: max(calc(18px + env(safe-area-inset-bottom)), calc(var(--cmp-wa-above, 0px) + 14px));
		width: 58px;
		height: 58px;
		padding: 0;
		justify-content: center;
		background: var(--wa-green);
		box-shadow: 0 0 0 3px var(--wa-ink), 4px 4px 0 3px var(--wa-sodium);
	}
	.cmp-wa--left { left: 18px; padding: 0; }
	.cmp-wa--right { right: 18px; padding: 0; }
	.cmp-wa__icon { width: 100%; height: 100%; background: transparent; }
	.cmp-wa__icon svg { width: 30px; height: 30px; }
	.cmp-wa__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* out of the way of the lightbox and print */
body:has(.lightbox:not([hidden])) .cmp-wa { display: none; }
@media print { .cmp-wa { display: none; } }
@media (prefers-reduced-motion: reduce) { .cmp-wa { transition: none; } }
