/* BM Floating Contact Button */
.bmfc {
	--bmfc-c1: #eb5b2c;
	--bmfc-c2: #da2917;
	--bmfc-x: 20px;
	--bmfc-y: 20px;
	--bmfc-size: 60px;
	--bmfc-item: 50px;
	position: fixed;
	bottom: calc(var(--bmfc-y) + env(safe-area-inset-bottom, 0px));
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: inherit;
	-webkit-tap-highlight-color: transparent;
}
.bmfc--right { right: var(--bmfc-x); align-items: flex-end; }
.bmfc--left  { left: var(--bmfc-x);  align-items: flex-start; }

.bmfc *, .bmfc *::before, .bmfc *::after { box-sizing: border-box; }
.bmfc svg { width: 100%; height: 100%; display: block; }

/* ---------- Main toggle ---------- */
.bmfc__toggle {
	position: relative;
	width: var(--bmfc-size);
	height: var(--bmfc-size);
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(135deg, var(--bmfc-c1) 0%, var(--bmfc-c2) 100%);
	box-shadow: 0 8px 22px rgba(218, 41, 23, .38), 0 2px 6px rgba(0, 0, 0, .15);
	transition: transform .25s ease, box-shadow .25s ease;
	outline: none;
}
.bmfc__toggle:hover { transform: scale(1.06); box-shadow: 0 10px 28px rgba(218, 41, 23, .45), 0 3px 8px rgba(0, 0, 0, .18); }
.bmfc__toggle:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--bmfc-c2); }

.bmfc__toggle-icon {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 28px;
	height: 28px;
	transition: transform .3s ease, opacity .2s ease;
}
.bmfc__toggle-icon--close { width: 22px; height: 22px; opacity: 0; transform: rotate(-90deg) scale(.6); }
.bmfc[data-open="true"] .bmfc__toggle-icon--open  { opacity: 0; transform: rotate(90deg) scale(.6); }
.bmfc[data-open="true"] .bmfc__toggle-icon--close { opacity: 1; transform: rotate(0) scale(1); }

/* Pulse ring (only while closed) */
.bmfc--pulse .bmfc__toggle::before,
.bmfc--pulse .bmfc__toggle::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--bmfc-c1);
	z-index: -1;
	animation: bmfc-pulse 2.2s ease-out infinite;
}
.bmfc--pulse .bmfc__toggle::after { animation-delay: 1.1s; }
.bmfc[data-open="true"] .bmfc__toggle::before,
.bmfc[data-open="true"] .bmfc__toggle::after { animation: none; opacity: 0; }

@keyframes bmfc-pulse {
	0%   { transform: scale(1);   opacity: .55; }
	100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Menu ---------- */
.bmfc__menu {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: inherit;
	pointer-events: none;
}
.bmfc--right .bmfc__menu { padding-right: calc((var(--bmfc-size) - var(--bmfc-item)) / 2) !important; }
.bmfc--left  .bmfc__menu { padding-left:  calc((var(--bmfc-size) - var(--bmfc-item)) / 2) !important; }

.bmfc__item {
	margin: 0 !important;
	padding: 0 !important;
	opacity: 0;
	transform: translateY(16px) scale(.6);
	transition: opacity .22s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
	transition-delay: calc((2 - var(--bmfc-i)) * 30ms);
}
.bmfc__item::before, .bmfc__item::marker { content: none !important; }

.bmfc[data-open="true"] .bmfc__menu { pointer-events: auto; }
.bmfc[data-open="true"] .bmfc__item {
	opacity: 1;
	transform: translateY(0) scale(1);
	transition-delay: calc((2 - var(--bmfc-i)) * 60ms);
}

.bmfc__link {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none !important;
	color: inherit;
}
.bmfc--left .bmfc__link { flex-direction: row-reverse; }

.bmfc__icon {
	flex: 0 0 auto;
	width: var(--bmfc-item);
	height: var(--bmfc-item);
	padding: 12px;
	border-radius: 50%;
	color: #fff;
	background: linear-gradient(135deg, var(--bmfc-c1) 0%, var(--bmfc-c2) 100%);
	box-shadow: 0 6px 16px rgba(218, 41, 23, .3), 0 2px 4px rgba(0, 0, 0, .12);
	transition: transform .2s ease, filter .2s ease;
}
.bmfc__link--fb .bmfc__icon   { padding: 11px; }
.bmfc__link--line .bmfc__icon { padding: 10px; }
.bmfc__link--map .bmfc__icon   { padding: 11px; }

.bmfc__label {
	white-space: nowrap;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: #2b2b2b;
	background: #fff;
	padding: 9px 14px;
	border-radius: 999px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
	border: 1px solid rgba(235, 91, 44, .18);
	transition: color .2s ease;
}

.bmfc__link:hover .bmfc__icon,
.bmfc__link:focus-visible .bmfc__icon { transform: scale(1.08); filter: brightness(1.06); }
.bmfc__link:hover .bmfc__label,
.bmfc__link:focus-visible .bmfc__label { color: var(--bmfc-c2); }
.bmfc__link:focus-visible { outline: none; }
.bmfc__link:focus-visible .bmfc__icon { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--bmfc-c2); }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.bmfc { --bmfc-size: 56px; --bmfc-item: 46px; }
	.bmfc__label { font-size: 13px; padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.bmfc *, .bmfc *::before, .bmfc *::after { animation: none !important; transition: none !important; }
}
