#cmn-widget {
	display: none; /* hidden by default; shown only on mobile via the media query below */
	position: fixed;
	z-index: 999999;
	flex-direction: column;
	gap: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	transition: opacity 0.3s ease, transform 0.3s ease;
	opacity: 1;
}

#cmn-widget.cmn-hidden {
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
}

@media (max-width: 768px) {
	#cmn-widget {
		display: flex;
	}
}

#cmn-widget.cmn-position-bottom-right {
	right: 20px;
	bottom: 20px;
	align-items: flex-end;
}

#cmn-widget.cmn-position-bottom-left {
	left: 20px;
	bottom: 20px;
	align-items: flex-start;
}

#cmn-widget.cmn-position-bottom-bar {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	align-items: center;
}

#cmn-availability {
	background: #fff;
	color: #333;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 12px;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	white-space: nowrap;
}

.cmn-buttons-row {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 8px;
}

#cmn-widget.cmn-position-bottom-bar .cmn-buttons-row {
	width: 100%;
	flex-direction: column;
	gap: 2px;
}

#cmn-widget.cmn-position-bottom-bar .cmn-buttons-row .cmn-btn {
	flex: none;
	width: 100%;
}

.cmn-btn {
	position: relative;
	background: var(--cmn-color, #e63946);
	color: var(--cmn-icon-color, #ffffff);
	text-decoration: none;
	padding: 14px 22px;
	border-radius: 999px;
	font-size: var(--cmn-font-size, 15px);
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55em;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	font-family: inherit;
}

#cmn-widget.cmn-position-bottom-bar .cmn-btn {
	border-radius: 0;
	box-sizing: border-box;
}

#cmn-widget.cmn-position-bottom-bar > .cmn-btn {
	width: 100%;
	justify-content: center;
}

/* SMS button uses its own solid color, set independently from the call button */
.cmn-btn-sms {
	background: var(--cmn-sms-color, #457b9d);
	color: var(--cmn-icon-color, #ffffff);
}

.cmn-btn-sms .cmn-icon {
	color: var(--cmn-icon-color, #ffffff);
}

.cmn-btn .cmn-icon {
	display: inline-flex;
	width: 1.3em;
	height: 1.3em;
	flex-shrink: 0;
	color: var(--cmn-icon-color, #ffffff);
}

.cmn-btn .cmn-icon svg {
	width: 100%;
	height: 100%;
}

/* Inline button, placed via the [smb_call_button] shortcode: static, not fixed, visible on all screen sizes */
.cmn-inline-btn {
	position: static;
	display: inline-flex;
	vertical-align: middle;
}

/* Pulse glow: an expanding, fading ring behind the button */
.cmn-btn.cmn-pulse::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--cmn-color, #e63946);
	z-index: -1;
	pointer-events: none;
	animation: cmn-pulse-ring 2.2s ease-out infinite;
}

#cmn-widget.cmn-position-bottom-bar .cmn-btn.cmn-pulse::after {
	border-radius: 0;
}

@keyframes cmn-pulse-ring {
	0% {
		transform: scale(1);
		opacity: 0.55;
	}
	70% {
		transform: scale(1.55);
		opacity: 0;
	}
	100% {
		transform: scale(1.55);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cmn-btn.cmn-pulse::after {
		animation: none;
	}
}
