/*
 * WhatsApp Badge by MA - Frontend badge styles.
 * All colors and sizing are driven by CSS custom properties
 * injected inline by WBMA_Frontend::render_badge().
 */

.wbma-badge {
	position: fixed !important;
	right: 0;
	transform: translateY(-50%);
	z-index: var(--wbma-z, 9999);

	display: inline-flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 9px;

	background-color: var(--wbma-bg, #25D366);
	color: var(--wbma-color, #ffffff);
	text-decoration: none !important;
	opacity: 1 !important;
	visibility: visible !important;

	box-sizing: border-box;
	width: var(--wbma-width, 42px);
	min-height: 142px;
	padding: 12px 7px 10px;
	border-radius: var(--wbma-radius, 10px) 0 0 var(--wbma-radius, 10px);

	transition: right 0.2s ease, left 0.2s ease, top 0.2s ease, transform 0.2s ease, box-shadow 0.15s ease;

	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
	box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.18);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.wbma-badge:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.wbma-badge--left {
	right: auto;
	left: 0;
	border-radius: 0 var(--wbma-radius, 10px) var(--wbma-radius, 10px) 0;
	box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.18);
}

.wbma-badge--free {
	border-radius: var(--wbma-radius, 10px);
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
}

.wbma-badge--dragging {
	transform: none;
	transition: box-shadow 0.15s ease;
	box-shadow: -4px 4px 16px rgba(0, 0, 0, 0.28);
	will-change: transform, top, right, left;
	cursor: grabbing;
}

.wbma-badge__icon {
	width: 27px;
	height: 27px;
	flex-shrink: 0;
	display: block;
}

.wbma-badge__label {
	display: inline-block;
	white-space: nowrap;
	color: var(--wbma-color, #ffffff);
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	letter-spacing: 0;
}

.wbma-badge--no-label {
	width: var(--wbma-width, 42px);
	height: var(--wbma-width, 42px);
	min-height: 0;
	padding: 0;
}

.wbma-badge--no-label .wbma-badge__label {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.wbma-badge,
	.wbma-badge--dragging {
		transition: none;
	}
}

@media (forced-colors: active) {
	.wbma-badge {
		border: 2px solid ButtonText;
		forced-color-adjust: none;
	}
}
