/**
 * Oya Custom — modul tombol mengambang, gaya front-end.
 *
 * Tampilan mengikuti tombol WhatsApp dan kembali ke atas situs sebelumnya:
 * WhatsApp biru di kanan bawah, tombol kembali ke atas abu-abu di bawahnya.
 */

.oya-float-actions {
	position: fixed;
	right: calc(9px + env(safe-area-inset-right, 0px));
	bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	transition: bottom 0.5s ease;
}

.oya-float-actions.is-scrolled {
	bottom: calc(17px + env(safe-area-inset-bottom, 0px));
}

.oya-float-wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: 50px;
	height: 50px;
	padding: 0;
	border-radius: 50%;
	background: #0077e1;
	color: #ffffff;
	text-decoration: none;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.oya-float-wa:hover,
.oya-float-wa:focus-visible {
	background: #0063bd;
	color: #ffffff;
	text-decoration: none;
}

.oya-float-wa:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.oya-float-wa:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 3px;
}

.oya-float-wa svg {
	display: block;
	width: 26px;
	height: 26px;
	fill: currentColor;
}

.oya-float-wa--label {
	width: auto;
	min-width: 50px;
	padding: 0 18px 0 14px;
	border-radius: 25px;
}

.oya-float-wa__label {
	font-family: var(--wp--preset--font-family--plus-jakarta-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.oya-back-top {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 30px;
	height: 30px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(62, 62, 62, 0.55);
	color: #ffffff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.oya-back-top[hidden] {
	display: none !important;
}

.oya-back-top:hover,
.oya-back-top:focus-visible {
	background: rgba(62, 62, 62, 0.82);
}

.oya-back-top:hover {
	transform: translateY(-2px);
}

.oya-back-top:focus-visible {
	outline: 3px solid #ffffff;
	outline-offset: 3px;
}

.oya-back-top svg {
	display: block;
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Ikon dan label WhatsApp tetap putih di atas latar biru saat mode gelap,
   karena aturan tautan mode gelap tidak boleh mewarisi warna tautan. */
html[data-theme="dark"] .oya-float-wa,
html[data-theme="dark"] .oya-float-wa:hover,
html[data-theme="dark"] .oya-float-wa:focus-visible {
	color: #ffffff;
}

/* Di latar gelap, tombol abu-abu dibuat sedikit lebih terang agar tetap terlihat. */
html[data-theme="dark"] .oya-back-top {
	background: rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .oya-back-top:hover,
html[data-theme="dark"] .oya-back-top:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}

@media (max-width: 900px) {
	.oya-float-actions--no-mobile {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.oya-float-actions,
	.oya-float-wa,
	.oya-back-top {
		transition-duration: 0.01ms !important;
	}
}
