/* Widget Button (TICKET-067) — varian Penunjuk, Bukti Sosial, Urgensi. */

.akn-bt {
	--akn-bt-ink: #1B3A5F;
	--akn-bt-accent: #1B3A5F;
	--akn-bt-star: #E5A92B;
	--akn-bt-dot: #2FA866;
	--akn-bt-justify: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	color: var(--akn-bt-ink);
}
.akn-bt *,
.akn-bt *::before,
.akn-bt *::after { box-sizing: border-box; }

.akn-bt .akn-bt__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: var(--akn-bt-justify); gap: 14px 16px; max-width: 100%; }
.akn-bt .akn-bt__anchor { position: relative; display: inline-flex; }
.akn-bt .akn-bt__hintwrap { position: relative; display: inline-flex; align-items: center; gap: 0; }
.akn-bt .akn-bt__hintwrap--top,
.akn-bt .akn-bt__hintwrap--bottom { flex-direction: column; }

/* ---------- Tombol ---------- */
.akn-bt .akn-bt__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 18px 32px;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: normal;
	text-align: center;
	border: 1.5px solid transparent;
	border-radius: 999px;
	transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.akn-bt .akn-bt__btn:hover { transform: translateY(-2px); }
.akn-bt .akn-bt__btn--primary { color: #fff; background: var(--akn-bt-accent); }
.akn-bt .akn-bt__btn--primary:hover { color: #fff; background: #12294A; }
.akn-bt .akn-bt__btn--secondary { color: var(--akn-bt-ink); background: transparent; border-color: var(--akn-bt-ink); }
.akn-bt .akn-bt__btn--secondary:hover { color: #fff; background: var(--akn-bt-ink); }
.akn-bt .akn-bt__icon { display: inline-flex; font-size: 1.15em; line-height: 1; }
.akn-bt .akn-bt__icon svg,
.akn-bt .akn-bt__icon i { width: 1em; height: 1em; font-size: inherit; color: inherit; fill: currentColor; }
/* Ikon dalam lingkaran */
.akn-bt .icon-circle .akn-bt__icon {
	align-items: center; justify-content: center; flex: 0 0 auto;
	width: 2.1em; height: 2.1em; font-size: 17px; border-radius: 50%;
	background: var(--akn-bt-ic-bg, #F2A900); color: var(--akn-bt-ic-fg, #1B1B1B);
}
.akn-bt .icon-circle .akn-bt__icon svg,
.akn-bt .icon-circle .akn-bt__icon i { width: .95em; height: .95em; font-size: inherit; }
.akn-bt .icon-circle.has-icon-after { padding: 8px 8px 8px 30px; }
.akn-bt .icon-circle.has-icon-before { padding: 8px 30px 8px 8px; }

/* Gerak ikon: yang bergerak glyph di dalam, lingkaran tetap */
.akn-bt .akn-bt__icon > svg, .akn-bt .akn-bt__icon > i { transition: transform .25s ease; }
.akn-bt .icon-anim-hover:hover .akn-bt__icon > svg,
.akn-bt .icon-anim-hover:hover .akn-bt__icon > i { transform: translate(3px, -3px); }
.akn-bt .icon-anim-nudge .akn-bt__icon > svg, .akn-bt .icon-anim-nudge .akn-bt__icon > i { animation: akn-bt-ic-nudge 1.2s ease-in-out infinite; }
.akn-bt .icon-anim-bounce .akn-bt__icon > svg, .akn-bt .icon-anim-bounce .akn-bt__icon > i { animation: akn-bt-ic-bounce 1.1s ease-in-out infinite; }
.akn-bt .icon-anim-wiggle .akn-bt__icon > svg, .akn-bt .icon-anim-wiggle .akn-bt__icon > i { animation: akn-bt-ic-wiggle 1.4s ease-in-out infinite; }
.akn-bt .icon-anim-spin .akn-bt__icon > svg, .akn-bt .icon-anim-spin .akn-bt__icon > i { animation: akn-bt-ic-spin 2.4s linear infinite; }
@keyframes akn-bt-ic-nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3px, -3px); } }
@keyframes akn-bt-ic-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes akn-bt-ic-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }
@keyframes akn-bt-ic-spin { to { transform: rotate(360deg); } }


/* Denyut cahaya */
.akn-bt .akn-bt__btn.is-pulse { animation: akn-bt-pulse 2.2s ease-out infinite; }
@keyframes akn-bt-pulse {
	0% { box-shadow: 0 0 0 0 rgba(27, 58, 95, .45); }
	70% { box-shadow: 0 0 0 16px rgba(27, 58, 95, 0); }
	100% { box-shadow: 0 0 0 0 rgba(27, 58, 95, 0); }
}

/* ============ Varian Penunjuk ============ */
.akn-bt .akn-bt__hint { display: inline-flex; align-items: center; gap: 6px; color: var(--akn-bt-ink); pointer-events: none; }
.akn-bt .akn-bt__hint-text {
	font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive;
	font-size: 24px;
	line-height: 1.1;
	white-space: nowrap;
	transform: rotate(-3deg);
}
.akn-bt .akn-bt__arrow { display: block; flex: 0 0 auto; width: 64px; height: auto; --dx: 0px; --dy: 0px; overflow: visible; }

/* Catatan melayang (absolute) di luar tombol, tidak menambah lebar baris sehingga tombol tetap di tengah. */
.akn-bt .akn-bt__hint { position: absolute; z-index: 1; width: max-content; translate: var(--akn-bt-hx, 0px) var(--akn-bt-hy, 0px); }
.akn-bt .hint-right .akn-bt__hint { left: 100%; top: 50%; transform: translateY(-50%); }
.akn-bt .hint-left .akn-bt__hint { right: 100%; top: 50%; transform: translateY(-50%); }
.akn-bt .hint-top .akn-bt__hint { bottom: 100%; left: 50%; transform: translateX(-50%); }
.akn-bt .hint-bottom .akn-bt__hint { top: 100%; left: 50%; transform: translateX(-50%); }

/* Kanan: panah di kiri teks, menunjuk ke tombol di kiri. */
.akn-bt .hint-right .akn-bt__hint { flex-direction: row; }
.akn-bt .hint-right .akn-bt__arrow { --dx: -8px; margin-left: -14px; position: relative; top: -3px; }
/* Kiri: teks lalu panah, panah dicerminkan menunjuk ke kanan. */
.akn-bt .hint-left .akn-bt__hint { flex-direction: row-reverse; }
.akn-bt .hint-left .akn-bt__arrow { transform: scaleX(-1); --dx: 8px; margin-right: -14px; position: relative; top: -3px; }
/* Atas: teks di atas, panah menunjuk ke bawah. */
.akn-bt .hint-top .akn-bt__hint { flex-direction: column-reverse; }
.akn-bt .hint-top .akn-bt__arrow { transform: rotate(-70deg); --dy: 8px; width: 56px; margin: 0 0 -12px; }
/* Bawah: panah di atas teks, menunjuk ke atas. */
.akn-bt .hint-bottom .akn-bt__hint { flex-direction: column; }
.akn-bt .hint-bottom .akn-bt__arrow { transform: rotate(110deg); --dy: -8px; width: 56px; margin: -12px 0 0; }

.akn-bt.hint-anim-bob .akn-bt__arrow { animation: akn-bt-bob 1.4s ease-in-out infinite; }
@keyframes akn-bt-bob { 0%, 100% { translate: 0 0; } 50% { translate: var(--dx) var(--dy); } }

.akn-bt.hint-anim-draw .akn-bt__arrow-path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: akn-bt-draw 2.8s ease-in-out infinite; }
.akn-bt.hint-anim-draw .akn-bt__arrow-head { opacity: 0; animation: akn-bt-head 2.8s ease-in-out infinite; }
@keyframes akn-bt-draw { 0% { stroke-dashoffset: 100; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes akn-bt-head { 0%, 40% { opacity: 0; } 50%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* ============ Varian Bukti Sosial ============ */
.akn-bt .akn-bt__proof { display: flex; flex-direction: column; align-items: var(--akn-bt-justify); gap: 10px; }
.akn-bt .akn-bt__proof-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: var(--akn-bt-justify); gap: 10px 14px; }
.akn-bt .akn-bt__avatars { display: inline-flex; }
.akn-bt .akn-bt__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-left: -10px;
	overflow: hidden;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	border: 2px solid #fff;
	border-radius: 50%;
}
.akn-bt .akn-bt__avatar:first-child { margin-left: 0; }
.akn-bt .akn-bt__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.akn-bt .akn-bt__proof-meta { display: inline-flex; flex-direction: column; gap: 2px; }
.akn-bt .akn-bt__stars { display: inline-flex; gap: 2px; color: var(--akn-bt-star); }
.akn-bt .akn-bt__stars .is-off { opacity: .25; }
.akn-bt .akn-bt__proof-text { font-size: 14px; line-height: 1.3; opacity: .8; }
.akn-bt .akn-bt__assure { font-size: 14px; letter-spacing: .01em; opacity: .7; }

/* ============ Varian Urgensi ============ */
.akn-bt .akn-bt__badge {
	position: absolute;
	top: -14px;
	right: -8px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.2;
	color: #fff;
	white-space: nowrap;
	background: #D6452F;
	border-radius: 999px;
	box-shadow: 0 6px 14px rgba(214, 69, 47, .35);
	transform: rotate(6deg);
	pointer-events: none;
}
.akn-bt .akn-bt__urgent { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; font-size: 15px; font-weight: 500; }
.akn-bt .akn-bt__dot { position: relative; display: inline-block; width: 9px; height: 9px; background: var(--akn-bt-dot); border-radius: 50%; }
.akn-bt .akn-bt__dot::after { content: ""; position: absolute; inset: 0; background: inherit; border-radius: 50%; animation: akn-bt-dot 1.8s ease-out infinite; }
@keyframes akn-bt-dot { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
.akn-bt .akn-bt__count { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.akn-bt .akn-bt__count b { min-width: 34px; padding: 4px 6px; font-size: 14px; font-weight: 700; text-align: center; color: #fff; background: var(--akn-bt-ink); border-radius: 8px; }
.akn-bt .akn-bt__count i { font-style: normal; opacity: .5; }
.akn-bt .akn-bt__urgent.is-expired .akn-bt__count { display: none; }

/* ============ Responsif ============ */
@media (max-width: 600px) {
	.akn-bt .akn-bt__row { flex-direction: column; align-items: center; }
	.akn-bt .akn-bt__btn { width: 100%; padding: 16px 24px; }
	.akn-bt .akn-bt__anchor,
	.akn-bt .akn-bt__hintwrap { width: 100%; }
	.akn-bt .akn-bt__anchor .akn-bt__btn { width: 100%; }
	/* Catatan di kanan atau kiri pindah ke bawah tombol, panah menunjuk ke atas. */
	.akn-bt .hint-right .akn-bt__hintwrap,
	.akn-bt .hint-left .akn-bt__hintwrap { flex-direction: column; }
	.akn-bt .hint-right .akn-bt__hint,
	.akn-bt .hint-left .akn-bt__hint { position: static; transform: none; width: auto; flex-direction: column; }
	.akn-bt .hint-right .akn-bt__arrow,
	.akn-bt .hint-left .akn-bt__arrow { transform: rotate(110deg); --dx: 0px; --dy: -8px; width: 52px; margin: -12px 0 0; top: 0; }
	.akn-bt .akn-bt__hint-text { font-size: 21px; white-space: normal; text-align: center; }
	.akn-bt .akn-bt__badge { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
	.akn-bt .akn-bt__btn.is-pulse,
	.akn-bt .akn-bt__arrow,
	.akn-bt .akn-bt__arrow-path,
	.akn-bt .akn-bt__arrow-head,
	.akn-bt .akn-bt__dot::after,
	.akn-bt .akn-bt__icon > svg,
	.akn-bt .akn-bt__icon > i { animation: none; }
	.akn-bt.hint-anim-draw .akn-bt__arrow-path { stroke-dashoffset: 0; }
	.akn-bt.hint-anim-draw .akn-bt__arrow-head { opacity: 1; }
}
