/* MoPlug – Tombol Melayang */
.mpfc {
	--s: var(--mpfc-size, 52px);
	--step: calc(var(--s) + var(--mpfc-gap, 14px));
	position: fixed;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	gap: var(--mpfc-gap, 14px);
	pointer-events: none;
	transition: opacity .35s ease, translate .35s ease, visibility .35s;
}
.mpfc-left  { left: var(--mpfc-x, 16px); align-items: flex-start; }
.mpfc-right { right: var(--mpfc-x, 16px); align-items: flex-end; }
.mpfc-middle { top: calc(50% + var(--mpfc-y, 0px)); transform: translateY(-50%); }
.mpfc-bottom { bottom: calc(20px - var(--mpfc-y, 0px)); }

.mpfc.mpfc-wait { opacity: 0; visibility: hidden; }
.mpfc-left.mpfc-wait  { translate: -24px 0; }
.mpfc-right.mpfc-wait { translate: 24px 0; }
.mpfc.mpfc-show { opacity: 1; visibility: visible; translate: 0 0; }

.mpfc-btn {
	position: relative;
	display: flex;
	align-items: center;
	pointer-events: auto;
	text-decoration: none !important;
	border: 0 !important;
	box-shadow: none !important;
	outline-offset: 4px;
	-webkit-tap-highlight-color: transparent;
}
.mpfc-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--s);
	height: var(--s);
	flex: 0 0 var(--s);
	transition: transform .2s ease;
}
.mpfc-icon > svg,
.mpfc-icon > img,
.mpfc-icon > .mpfc-lottie {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
}
.mpfc-btn:hover .mpfc-icon,
.mpfc-btn:focus-visible .mpfc-icon { transform: scale(1.1); }

/* Circle style */
.mpfc-style-circle .mpfc-icon {
	background: var(--mpfc-bg, #fff);
	border-radius: 50%;
	padding: calc(var(--s) * .2);
	box-sizing: border-box;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

/* Tooltip */
.mpfc-tip {
	position: absolute;
	top: 50%;
	white-space: nowrap;
	font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--mpfc-tip-color, #fff);
	background: var(--mpfc-tip-bg, #1f2937);
	padding: 7px 11px;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.mpfc-left .mpfc-tip  { left: calc(100% + 10px); transform: translate(-6px, -50%); }
.mpfc-right .mpfc-tip { right: calc(100% + 10px); transform: translate(6px, -50%); }
.mpfc-tip-hover .mpfc-tip { opacity: 0; }
.mpfc-tip-hover .mpfc-btn:hover .mpfc-tip,
.mpfc-tip-hover .mpfc-btn:focus-visible .mpfc-tip { opacity: 1; transform: translate(0, -50%); }
.mpfc-tip-always .mpfc-tip { opacity: 1; transform: translate(0, -50%); }

/* Animations (staggered per button) */
.mpfc-anim-float  .mpfc-icon { animation: mpfc-float 3s ease-in-out infinite; animation-delay: calc(var(--mpfc-n, 0) * -.6s); }
.mpfc-anim-pulse  .mpfc-icon { animation: mpfc-pulse 2s ease-in-out infinite; animation-delay: calc(var(--mpfc-n, 0) * .3s); }
.mpfc-anim-bounce .mpfc-icon { animation: mpfc-bounce 2.4s ease infinite; animation-delay: calc(var(--mpfc-n, 0) * .25s); }
.mpfc-anim-shake  .mpfc-icon { animation: mpfc-shake 3.5s ease-in-out infinite; animation-delay: calc(var(--mpfc-n, 0) * .4s); }
.mpfc-btn:hover .mpfc-icon { animation-play-state: paused; }

@keyframes mpfc-float  { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes mpfc-pulse  { 0%, 100% { scale: 1; } 50% { scale: 1.09; } }
@keyframes mpfc-bounce { 0%, 20%, 50%, 80%, 100% { translate: 0 0; } 40% { translate: 0 -10px; } 60% { translate: 0 -5px; } }
@keyframes mpfc-shake  { 0%, 70%, 100% { rotate: 0deg; } 74% { rotate: -12deg; } 78% { rotate: 10deg; } 82% { rotate: -8deg; } 86% { rotate: 6deg; } 90% { rotate: 0deg; } }

@media (prefers-reduced-motion: reduce) {
	.mpfc .mpfc-icon { animation: none !important; }
}

/* Devices */
@media (max-width: 767px) {
	.mpfc { --s: var(--mpfc-size-m, 44px); }
	.mpfc-dev-desktop { display: none !important; }
	.mpfc-tip-hover .mpfc-tip { display: none; }
}
@media (min-width: 768px) {
	.mpfc-dev-mobile { display: none !important; }
}

/* Promo popup */
.mpfc-pop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, .7);
	opacity: 0;
	transition: opacity .25s ease;
}
.mpfc-pop[hidden] { display: none; }
.mpfc-pop.is-open { opacity: 1; }
.mpfc-pop-inner {
	position: relative;
	max-width: min(92vw, 720px);
	transform: scale(.94);
	transition: transform .25s ease;
}
.mpfc-pop.is-open .mpfc-pop-inner { transform: scale(1); }
.mpfc-pop-inner img {
	display: block;
	max-width: 100%;
	max-height: 85vh;
	width: auto;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.mpfc-pop-close {
	position: absolute;
	top: -16px;
	right: -16px;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #111;
	font: 400 26px/38px Arial, sans-serif;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.mpfc-pop-close:hover { background: #f43f5e; color: #fff; }
html.mpfc-locked { overflow: hidden; }

/* ================= Speed dial ================= */
.mpfc-dial { display: block; width: var(--s); height: var(--s); }
.mpfc-items { position: absolute; inset: 0; pointer-events: none; }
.mpfc-dial .mpfc-items .mpfc-btn {
	position: absolute;
	left: 0;
	top: 0;
	opacity: 0;
	visibility: hidden;
	transform: translate(0, 0) scale(.3);
	transition: transform .32s cubic-bezier(.34, 1.4, .64, 1), opacity .2s ease, visibility .32s;
	transition-delay: calc(var(--mpfc-n, 0) * 25ms);
}
.mpfc-dial.is-open .mpfc-items { pointer-events: auto; }
.mpfc-dial.is-open .mpfc-items .mpfc-btn {
	opacity: 1;
	visibility: visible;
	transform: translate(calc(var(--dx, 0) * var(--step)), calc(var(--dy, 0) * var(--step))) scale(1);
	transition-delay: calc(var(--mpfc-n, 0) * 45ms);
}
.mpfc-main {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--s);
	height: var(--s);
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
	pointer-events: auto;
	-webkit-tap-highlight-color: transparent;
	z-index: 2;
}
.mpfc-main:focus-visible { outline: 2px solid #5B4BD6; outline-offset: 4px; border-radius: 50%; }
.mpfc-main .mpfc-icon { transition: transform .25s ease, opacity .2s ease; }
.mpfc-main-x {
	position: absolute;
	inset: 12%;
	border-radius: 50%;
	background: #1C1A2E;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: scale(0) rotate(-90deg);
	opacity: 0;
	transition: transform .28s cubic-bezier(.34, 1.4, .64, 1), opacity .2s ease;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
.mpfc-main-x svg { width: 46%; height: 46%; }
.mpfc-dial.is-open .mpfc-main .mpfc-icon { transform: scale(.2); opacity: 0; animation: none; }
.mpfc-dial.is-open .mpfc-main-x { transform: scale(1) rotate(0); opacity: 1; }
.mpfc-style-circle .mpfc-main .mpfc-icon { background: var(--mpfc-bg, #fff); border-radius: 50%; padding: calc(var(--s) * .2); box-sizing: border-box; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }

/* Labels while open: up / down / side always visible */
.mpfc-dial-up.is-open .mpfc-tip,
.mpfc-dial-down.is-open .mpfc-tip { opacity: 1; transform: translate(0, -50%); display: block; }
.mpfc-dial-side .mpfc-tip { top: auto; bottom: calc(100% + 6px); left: 50% !important; right: auto !important; transform: translate(-50%, 4px) !important; font-size: 11px; padding: 4px 8px; opacity: 0; }
.mpfc-dial-arc .mpfc-tip { opacity: 0; }
.mpfc-dial-arc .mpfc-btn:hover .mpfc-tip,
.mpfc-dial-arc .mpfc-btn:focus-visible .mpfc-tip { opacity: 1; transform: translate(0, -50%); }
.mpfc-dial-side .mpfc-btn:hover .mpfc-tip,
.mpfc-dial-side .mpfc-btn:focus-visible .mpfc-tip { opacity: 1; transform: translate(-50%, 0) !important; }
@media (max-width: 767px) {
	.mpfc-dial-up.is-open .mpfc-tip,
	.mpfc-dial-down.is-open .mpfc-tip { display: block; }
}

/* Card style: a small panel */
.mpfc-dial-card .mpfc-items {
	inset: auto;
	width: max-content;
	min-width: 220px;
	max-width: min(300px, calc(100vw - 32px));
	background: #fff;
	border-radius: 18px;
	padding: 10px;
	box-shadow: 0 18px 50px rgba(28, 26, 46, .22);
	display: flex;
	flex-direction: column;
	gap: 2px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, transform .25s ease, visibility .25s;
}
.mpfc-dial-card.mpfc-bottom .mpfc-items { bottom: calc(100% + 12px); transform: translateY(8px); }
.mpfc-dial-card.mpfc-middle .mpfc-items { top: 50%; transform: translate(var(--mpfc-card-shift, 8px), -50%); }
.mpfc-dial-card.mpfc-left .mpfc-items { left: 0; }
.mpfc-dial-card.mpfc-right .mpfc-items { right: 0; }
.mpfc-dial-card.mpfc-middle.mpfc-left .mpfc-items { left: calc(100% + 12px); --mpfc-card-shift: -8px; }
.mpfc-dial-card.mpfc-middle.mpfc-right .mpfc-items { right: calc(100% + 12px); left: auto; }
.mpfc-dial-card.is-open .mpfc-items { opacity: 1; visibility: visible; }
.mpfc-dial-card.mpfc-bottom.is-open .mpfc-items { transform: translateY(0); }
.mpfc-dial-card.mpfc-middle.is-open .mpfc-items { transform: translate(0, -50%); }
.mpfc-card-title { margin: 4px 10px 6px; font: 700 14px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1C1A2E; }
.mpfc-dial-card .mpfc-items .mpfc-btn {
	position: static;
	opacity: 1;
	visibility: inherit;
	transform: none;
	transition: background .15s;
	gap: 12px;
	padding: 6px 10px;
	border-radius: 12px;
	--s: 40px;
}
.mpfc-dial-card .mpfc-items .mpfc-btn:hover { background: #F3F1FA; }
.mpfc-dial-card .mpfc-items .mpfc-icon { animation: none !important; }
.mpfc-dial-card .mpfc-items .mpfc-tip {
	position: static;
	opacity: 1 !important;
	transform: none !important;
	display: block !important;
	background: none;
	color: #1C1A2E;
	box-shadow: none;
	padding: 0;
	font-size: 14px;
	white-space: normal;
}

/* Bubble */
.mpfc-bubble {
	position: absolute;
	top: 50%;
	display: flex;
	align-items: center;
	gap: 2px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(28, 26, 46, .2);
	padding: 4px 4px 4px 2px;
	white-space: nowrap;
	pointer-events: auto;
	animation: mpfc-bubble-in .35s cubic-bezier(.34, 1.4, .64, 1);
	z-index: 1;
}
.mpfc-bubble[hidden] { display: none; }
.mpfc-left .mpfc-bubble { left: calc(100% + 12px); transform: translateY(-50%); }
.mpfc-right .mpfc-bubble { right: calc(100% + 12px); transform: translateY(-50%); }
.mpfc-bubble::before { content: ""; position: absolute; top: 50%; width: 10px; height: 10px; background: #fff; transform: translateY(-50%) rotate(45deg); }
.mpfc-left .mpfc-bubble::before { left: -4px; }
.mpfc-right .mpfc-bubble::before { right: -4px; }
.mpfc-bubble button { border: 0; background: none; cursor: pointer; font: 600 13.5px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1C1A2E; padding: 8px 10px; border-radius: 10px; position: relative; }
.mpfc-bubble .mpfc-bubble-x { width: 28px; height: 28px; padding: 0; font-size: 18px; line-height: 28px; color: #6B6880; }
.mpfc-bubble button:hover { background: #F3F1FA; }
.mpfc-dial.is-open .mpfc-bubble { display: none; }
@keyframes mpfc-bubble-in { from { opacity: 0; scale: .8; } to { opacity: 1; scale: 1; } }
@media (max-width: 767px) {
	.mpfc-bubble button { font-size: 12.5px; padding: 6px 8px; }
}
@media (prefers-reduced-motion: reduce) {
	.mpfc-dial .mpfc-items .mpfc-btn, .mpfc-main-x, .mpfc-bubble { transition: none; animation: none; }
}
