/* Widget Template Stack (TICKET-060) — varian fan, trio, duo, single + flying badge. */

.akn-tsk {
	--akn-tsk-w: 260px;
	--akn-tsk-step: 62;
	--akn-tsk-angle: 5;
	--akn-tsk-drop: 24;
	--akn-tsk-accent: #2D5A4D;
	--akn-tsk-ink: #1A1F1D;
	--akn-tsk-muted: #6B7570;
	position: relative;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow-x: clip;
}
.akn-tsk *,
.akn-tsk *::before,
.akn-tsk *::after { box-sizing: border-box; }
.akn-tsk--empty { padding: 32px; text-align: center; color: #6B7570; border: 1px dashed #D8DEDB; }

.akn-tsk .akn-tsk__stage { position: relative; width: 100%; }
.akn-tsk .akn-tsk__stage > .akn-tsk__row { flex: 0 0 100%; width: 100%; }
.akn-tsk .akn-tsk__backdrop {
	position: absolute;
	bottom: 0;
	left: 50%;
	z-index: 0;
	width: calc(var(--akn-tsk-w) * 1.45);
	height: 88%;
	background: #E3DAEE;
	border-radius: 999px 999px 28px 28px;
	transform: translateX(-50%);
}
.akn-tsk .akn-tsk__row {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 24px 0 0;
}
.akn-tsk .akn-tsk__phone {
	position: relative;
	flex: 0 0 auto;
	width: var(--akn-tsk-w);
	padding: 9px;
	background: #1B1B1F;
	border-radius: 36px;
	box-shadow: 0 24px 50px rgba(26, 31, 29, .3);
	/* Menumpuk: setiap ponsel mundur sebesar (1 - step) dari lebarnya. */
	margin-inline: calc(var(--akn-tsk-w) * (var(--akn-tsk-step) / 100 - 1) / 2);
	transform-origin: 50% 100%;
	transform: translateY(calc(var(--a) * var(--akn-tsk-drop) * 1px)) rotate(calc(var(--d) * var(--akn-tsk-angle) * 1deg));
}
.akn-tsk .akn-tsk__screen {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 390 / 844;
	background: #EEF1EF;
	border-radius: 29px;
}
.akn-tsk .akn-tsk__screen img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: top center;
}
.akn-tsk .akn-tsk__ph {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	font-weight: 700;
	color: #6B7570;
}
.akn-tsk .akn-tsk__notch {
	position: absolute;
	top: 8px;
	left: 50%;
	z-index: 2;
	width: 30%;
	height: 18px;
	background: #1B1B1F;
	border-radius: 999px;
	transform: translateX(-50%);
}

/* ---------- Varian: trio (tengah menonjol) ---------- */
.akn-tsk.akn-tsk--trio { --akn-tsk-step: 82; --akn-tsk-angle: 7; --akn-tsk-drop: 46; }
.akn-tsk.akn-tsk--trio .akn-tsk__phone[data-rank="0"] { scale: 1.06; }
.akn-tsk.akn-tsk--trio .akn-tsk__row { padding-top: 56px; }

/* ---------- Varian: duo (dua ponsel bertumpuk) ---------- */
.akn-tsk.akn-tsk--duo { --akn-tsk-step: 70; }
.akn-tsk.akn-tsk--duo .akn-tsk__row { justify-content: center; padding-top: 12px; }
.akn-tsk.akn-tsk--duo .akn-tsk__phone { margin-inline: 0; transform-origin: 50% 50%; }
.akn-tsk.akn-tsk--duo .akn-tsk__phone:nth-child(1) { transform: rotate(-3deg); }
.akn-tsk.akn-tsk--duo .akn-tsk__phone:nth-child(2) {
	z-index: 12 !important;
	margin-top: calc(var(--akn-tsk-w) * .5);
	margin-left: calc(var(--akn-tsk-w) * (var(--akn-tsk-step) / 100 - 1));
	transform: rotate(4deg);
	scale: .84;
}

/* ---------- Varian: single ---------- */
.akn-tsk.akn-tsk--single .akn-tsk__phone { margin-inline: 0; transform-origin: 50% 50%; transform: rotate(-3deg); }

/* ---------- Varian: hud (bingkai gelap, tiga ponsel, label sudut) ---------- */
.akn-tsk.akn-tsk--hud { --akn-tsk-step: 106; --akn-tsk-angle: 7; --akn-tsk-drop: 18; }
.akn-tsk.akn-tsk--hud .akn-tsk__row { padding: 76px 24px; }
.akn-tsk.akn-tsk--hud .akn-tsk__phone { transform-origin: 50% 50%; }
.akn-tsk .akn-tsk__frame {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-color: #101113;
	background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px);
	background-size: 22px 22px;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 36px;
}
.akn-tsk .akn-tsk__hud {
	position: absolute;
	font: 500 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #E8E8E8;
}
.akn-tsk .akn-tsk__hud--tl { top: 34px; left: 48px; }
.akn-tsk .akn-tsk__hud--tr { top: 34px; right: 48px; text-align: right; }
.akn-tsk .akn-tsk__hud--bl { bottom: 30px; left: 48px; }
.akn-tsk .akn-tsk__hud--br { bottom: 30px; right: 48px; text-align: right; }

/* ---------- Flying badge ---------- */
.akn-tsk .akn-tsk__badge { position: absolute; z-index: 30; scale: 1; }
.akn-tsk .akn-tsk__badge-body { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; line-height: 1.35; color: var(--akn-tsk-ink); }
.akn-tsk .akn-tsk__badge-body.is-card {
	padding: 12px 20px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 14px 30px rgba(26, 31, 29, .16);
}
.akn-tsk .akn-tsk__badge-body.is-card > .akn-tsk__b-muted:first-child { display: block; }
.akn-tsk .akn-tsk__b-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.akn-tsk .akn-tsk__b-strong { display: block; font-weight: 600; color: var(--akn-tsk-ink); }
.akn-tsk .akn-tsk__b-muted { color: var(--akn-tsk-muted); }
.akn-tsk .akn-tsk__b-small { font-size: .88em; }
.akn-tsk .akn-tsk__badge-body.is-card:not(:has(.akn-tsk__b-col)) { flex-direction: column; align-items: flex-start; gap: 2px; }
.akn-tsk .akn-tsk__b-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	color: var(--akn-tsk-accent);
	background: color-mix(in srgb, var(--akn-tsk-accent) 14%, #fff);
	border-radius: 50%;
}
.akn-tsk .akn-tsk__b-eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--akn-tsk-accent);
}
.akn-tsk .akn-tsk__dot {
	position: relative;
	display: inline-block;
	width: 8px;
	height: 8px;
	background: #2FA866;
	border-radius: 50%;
}
.akn-tsk .akn-tsk__dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: inherit;
	animation: akn-tsk-pulse 1.8s ease-out infinite;
}
.akn-tsk .akn-tsk__b-col--pulse { gap: 6px; max-width: 340px; }
.akn-tsk .akn-tsk__b-body { display: block; font-size: 15px; line-height: 1.5; color: var(--akn-tsk-ink); }
.akn-tsk .akn-tsk__typed {
	position: relative;
	display: block;
	max-width: 340px;
	color: var(--akn-tsk-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	word-break: break-all;
}
.akn-tsk .akn-tsk__typed--static { text-decoration: underline; }
.akn-tsk .akn-tsk__ghost { display: block; visibility: hidden; }
.akn-tsk .akn-tsk__live { position: absolute; inset: 0; display: block; }
.akn-tsk .akn-tsk__typed.is-typing .akn-tsk__live::after {
	content: "";
	display: inline-block;
	width: 2px;
	height: 1em;
	margin-left: 2px;
	vertical-align: -2px;
	background: var(--akn-tsk-accent);
	animation: akn-tsk-caret .7s steps(1) infinite;
}
.akn-tsk .akn-tsk__b-num { font-size: 40px; line-height: 1; font-weight: 500; color: var(--akn-tsk-ink); font-variant-numeric: tabular-nums; }

/* Cincin teks berputar */
.akn-tsk .akn-tsk__ring {
	position: relative;
	display: block;
	width: 120px;
	height: 120px;
	color: #fff;
	background: var(--akn-tsk-accent);
	border-radius: 50%;
	box-shadow: 0 14px 30px rgba(26, 31, 29, .22);
}
.akn-tsk .akn-tsk__ring-text { position: absolute; inset: 0; width: 100%; height: 100%; animation: akn-tsk-spin 18s linear infinite; }
.akn-tsk .akn-tsk__ring-text text { font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; fill: currentColor; }
.akn-tsk .akn-tsk__ring-ico { position: absolute; top: 50%; left: 50%; width: 30%; height: 30%; color: #E6C58A; transform: translate(-50%, -50%); }

/* Gerak melayang */
.akn-tsk .akn-tsk__anim--float { animation: akn-tsk-float 3.6s ease-in-out infinite alternate; }
.akn-tsk .akn-tsk__anim--drift { animation: akn-tsk-drift 4.4s ease-in-out infinite alternate; }
.akn-tsk .akn-tsk__anim--sway { animation: akn-tsk-sway 3.2s ease-in-out infinite alternate; }

@keyframes akn-tsk-float { from { transform: translateY(0); } to { transform: translateY(-12px); } }
@keyframes akn-tsk-drift { from { transform: translate(0, 0); } to { transform: translate(10px, -12px); } }
@keyframes akn-tsk-sway { from { transform: rotate(-2deg) translateY(0); } to { transform: rotate(2deg) translateY(-6px); } }
@keyframes akn-tsk-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3); opacity: 0; } }
@keyframes akn-tsk-caret { 50% { opacity: 0; } }
@keyframes akn-tsk-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.akn-tsk .akn-tsk__badge-body,
	.akn-tsk .akn-tsk__ring-text,
	.akn-tsk .akn-tsk__dot::after { animation: none; }
}

@media (max-width: 767px) {
	.akn-tsk.akn-tsk--hud { --akn-tsk-step: 66; }
	.akn-tsk.akn-tsk--hud .akn-tsk__row { padding: 56px 8px; }
	.akn-tsk .akn-tsk__frame { border-radius: 24px; }
	.akn-tsk .akn-tsk__hud { font-size: 9px; }
	.akn-tsk .akn-tsk__hud--tl, .akn-tsk .akn-tsk__hud--bl { left: 16px; }
	.akn-tsk .akn-tsk__hud--tr, .akn-tsk .akn-tsk__hud--br { right: 16px; }
	.akn-tsk .akn-tsk__hud--tl, .akn-tsk .akn-tsk__hud--tr { top: 18px; }
	.akn-tsk .akn-tsk__hud--bl, .akn-tsk .akn-tsk__hud--br { bottom: 16px; }
	.akn-tsk--trim .akn-tsk__phone[data-rank="2"],
	.akn-tsk--trim .akn-tsk__phone[data-rank="3"],
	.akn-tsk--trim .akn-tsk__phone[data-rank="4"] { display: none; }
	.akn-tsk .akn-tsk__badge { scale: .82; transform-origin: left top; max-width: 80%; }
	.akn-tsk .akn-tsk__badge-body { max-width: 100%; }
	.akn-tsk .akn-tsk__badge-body.has-w { max-width: 100%; }
	.akn-tsk .akn-tsk__typed { max-width: 100%; }
	.akn-tsk .akn-tsk__b-col--pulse { max-width: 100%; }
	.akn-tsk .akn-tsk__badge--hide-m { display: none; }
}

/* Lebar badge diatur manual: isi mengisi lebar kartu. */
.akn-tsk .akn-tsk__badge-body.has-w { max-width: 90vw; }
.akn-tsk .akn-tsk__badge-body.has-w .akn-tsk__b-col { flex: 1 1 auto; max-width: none; }
.akn-tsk .akn-tsk__badge-body.has-w .akn-tsk__typed { max-width: 100%; }
