/* Widget Feature Tabs (TICKET-063) — varian akordeon dan kartu + panel visual. */

.akn-ft {
	--akn-ft-list-w: 46%;
	--akn-ft-ink: #1A1F1D;
	--akn-ft-muted: #6B7570;
	--akn-ft-line: #E3E7E5;
	--akn-ft-accent: #2D5A4D;
	--akn-ft-corner: #8CC63F;
	display: grid;
	grid-template-columns: var(--akn-ft-list-w) minmax(0, 1fr);
	column-gap: 56px;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
	max-width: 100%;
	color: var(--akn-ft-ink);
}
.akn-ft *,
.akn-ft *::before,
.akn-ft *::after { box-sizing: border-box; }

.akn-ft-panel-left .akn-ft { grid-template-columns: minmax(0, 1fr) var(--akn-ft-list-w); }
.akn-ft-panel-left .akn-ft .akn-ft__list { order: 2; }
.akn-ft-panel-left .akn-ft .akn-ft__panel { order: 1; }

.akn-ft .akn-ft__list { display: flex; flex-direction: column; min-width: 0; }
.akn-ft .akn-ft__item { position: relative; min-width: 0; }

/* Bar progres putar otomatis: penuh selama jeda, mulai ulang tiap item aktif. */
.akn-ft .akn-ft__progress {
	position: absolute;
	right: 0;
	bottom: -1px;
	left: 0;
	z-index: 1;
	height: 2px;
	background: var(--akn-ft-accent);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left center;
	pointer-events: none;
}
.akn-ft--card .akn-ft__progress { right: 24px; bottom: 10px; left: 24px; }
.akn-ft .akn-ft__item.is-active .akn-ft__progress { animation: akn-ft-prog var(--akn-ft-int, 5s) linear forwards; }
.akn-ft:hover .akn-ft__item.is-active .akn-ft__progress { animation-play-state: paused; }
@keyframes akn-ft-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.akn-ft .akn-ft__head {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	align-items: center;
	gap: 18px;
	width: 100%;
	margin: 0;
	padding: 0;
	font: inherit;
	text-align: left;
	color: inherit;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	white-space: normal;
}
.akn-ft .akn-ft__head:hover,
.akn-ft .akn-ft__head:focus { background: transparent; color: inherit; outline: none; box-shadow: none; }
.akn-ft .akn-ft__head:focus-visible { outline: 2px solid var(--akn-ft-accent); outline-offset: 4px; }
.akn-ft .akn-ft__title { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; font-size: 20px; line-height: 1.3; font-weight: 500; color: var(--akn-ft-ink); }

/* Deskripsi: buka-tutup halus lewat grid-template-rows. */
.akn-ft .akn-ft__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.akn-ft .akn-ft__body > div { overflow: hidden; }
.akn-ft .akn-ft__item.is-active .akn-ft__body { grid-template-rows: 1fr; }
.akn-ft .akn-ft__desc { margin: 0; font-size: 16px; line-height: 1.6; color: var(--akn-ft-muted); }

/* ============ Akordeon ============ */
.akn-ft--accordion .akn-ft__item { padding: 20px 0; border-bottom: 1px solid var(--akn-ft-line); }
.akn-ft--accordion .akn-ft__item:first-child { border-top: 1px solid var(--akn-ft-line); }
.akn-ft--accordion .akn-ft__num { flex: 0 0 36px; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; color: var(--akn-ft-muted); }
.akn-ft--accordion .akn-ft__item.is-active .akn-ft__num { color: var(--akn-ft-accent); }
.akn-ft--accordion .akn-ft__body > div { padding-left: 54px; }
.akn-ft--accordion .akn-ft__item.is-active .akn-ft__desc { padding-top: 12px; }
.akn-ft--accordion .akn-ft__toggle { position: relative; flex: 0 0 16px; width: 16px; height: 16px; color: var(--akn-ft-muted); }
.akn-ft--accordion .akn-ft__toggle::before,
.akn-ft--accordion .akn-ft__toggle::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transform: translate(-50%, -50%);
	transition: transform .25s ease;
}
.akn-ft--accordion .akn-ft__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.akn-ft--accordion .akn-ft__item.is-active .akn-ft__toggle::after { transform: translate(-50%, -50%) rotate(0); }

/* ============ Kartu ============ */
.akn-ft--card .akn-ft__list { gap: 14px; }
.akn-ft--card .akn-ft__item {
	padding: 14px 24px;
	background: transparent;
	border-radius: 24px;
	transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
}
.akn-ft--card .akn-ft__item.is-active {
	padding: 24px;
	background: #fff;
	box-shadow: 0 16px 40px rgba(26, 31, 29, .1);
}
.akn-ft--card .akn-ft__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	font-size: 22px;
	color: #B8860B;
	background: #FBEFD2;
	border-radius: 16px;
	transition: background .25s ease, color .25s ease;
}
.akn-ft--card .akn-ft__icon i,
.akn-ft--card .akn-ft__icon svg { width: 1em; height: 1em; font-size: inherit; color: inherit; fill: currentColor; }
.akn-ft--card .akn-ft__item.is-active .akn-ft__icon { color: #E6B33A; background: #1A1F1D; }
.akn-ft--card .akn-ft__item.is-active .akn-ft__title { font-weight: 600; }
.akn-ft--card .akn-ft__body > div { padding-left: 70px; }
.akn-ft--card .akn-ft__item.is-active .akn-ft__desc { padding-top: 14px; }

/* ============ Panel visual ============ */
.akn-ft .akn-ft__panel {
	position: relative;
	display: grid;
	min-height: 520px;
	padding: 32px;
	overflow: hidden;
	background: #F4F6F5;
	border-radius: 28px;
}
.akn-ft .akn-ft__slide {
	grid-area: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	opacity: 0;
	transform: translateY(8px) scale(.98);
	transition: opacity .35s ease, transform .35s ease;
	pointer-events: none;
}
.akn-ft .akn-ft__slide.is-active { opacity: 1; transform: none; pointer-events: auto; z-index: 1; }
.akn-ft .akn-ft__slide img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }

.akn-ft .akn-ft__panel.has-dots::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(128, 138, 132, .35) 1px, transparent 1.5px);
	background-size: 18px 18px;
	pointer-events: none;
}
.akn-ft .akn-ft__panel.has-corners::after {
	content: "";
	position: absolute;
	inset: 20px;
	pointer-events: none;
	background:
		linear-gradient(var(--akn-ft-corner), var(--akn-ft-corner)) top left / 18px 2px no-repeat,
		linear-gradient(var(--akn-ft-corner), var(--akn-ft-corner)) top left / 2px 18px no-repeat,
		linear-gradient(var(--akn-ft-corner), var(--akn-ft-corner)) top right / 18px 2px no-repeat,
		linear-gradient(var(--akn-ft-corner), var(--akn-ft-corner)) top right / 2px 18px no-repeat,
		linear-gradient(var(--akn-ft-corner), var(--akn-ft-corner)) bottom left / 18px 2px no-repeat,
		linear-gradient(var(--akn-ft-corner), var(--akn-ft-corner)) bottom left / 2px 18px no-repeat,
		linear-gradient(var(--akn-ft-corner), var(--akn-ft-corner)) bottom right / 18px 2px no-repeat,
		linear-gradient(var(--akn-ft-corner), var(--akn-ft-corner)) bottom right / 2px 18px no-repeat;
}

@media (max-width: 900px) {
	.akn-ft,
	.akn-ft-panel-left .akn-ft { grid-template-columns: 1fr; row-gap: 32px; }
	.akn-ft-panel-left .akn-ft .akn-ft__list { order: 1; }
	.akn-ft-panel-left .akn-ft .akn-ft__panel { order: 0; }
	.akn-ft .akn-ft__panel { min-height: 360px; }
	.akn-ft--accordion .akn-ft__list > .akn-ft__panel { margin: 16px 0; }
}
@media (prefers-reduced-motion: reduce) {
	.akn-ft .akn-ft__item.is-active .akn-ft__progress { animation: none; transform: scaleX(1); }
	.akn-ft .akn-ft__body,
	.akn-ft .akn-ft__slide,
	.akn-ft--card .akn-ft__item { transition: none; }
}

@media (max-width: 767px) {
	.akn-ft .akn-ft__title { font-size: 17px; }
	.akn-ft--accordion .akn-ft__head { gap: 12px; }
	.akn-ft--accordion .akn-ft__num { flex-basis: 24px; }
	.akn-ft--accordion .akn-ft__body > div { padding-left: 36px; }
	.akn-ft--card .akn-ft__item,
	.akn-ft--card .akn-ft__item.is-active { padding: 14px 16px; }
	.akn-ft--card .akn-ft__head { gap: 12px; }
	.akn-ft--card .akn-ft__body > div { padding-left: 0; }
	.akn-ft .akn-ft__panel { min-height: 280px; padding: 18px; border-radius: 20px; }
}
