/* ══════════════════════════════════════════════════════════════════════════
   Blok Accordion & Accordion Blok — gaya v2 (page-builder.js renderBlock
   'accordion'). Markup lama .bk-acc-accent / .bk-acc-filled / .bk-tabs tetap
   di public/style.css untuk halaman yang belum disimpan ulang.

   Warna aksen: --bk-acc (inline, diizinkan HtmlSanitizer) → fallback warna tema.
   Status buka/tutup dibaca dari [aria-expanded] yang diatur Bootstrap Collapse.
   ══════════════════════════════════════════════════════════════════════════ */
.bk-acx, .bk-tbx { --acx: var(--bk-acc, var(--main-color, #b30202)); }

.bk-acx { display: flex; flex-direction: column; gap: 10px; }
.bk-acx-item { position: relative; transition: background-color .2s, border-color .2s, box-shadow .2s; }

.bk-acx .bk-acx-btn {
    all: unset; box-sizing: border-box;
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 18px 22px; cursor: pointer;
    font-weight: 650; line-height: 1.4; color: #101828; text-align: start;
    transition: color .2s;
}
.bk-acx .bk-acx-btn:focus-visible { outline: 2px solid var(--acx); outline-offset: 2px; border-radius: 8px; }
.bk-acx .bk-acx-btn:hover,
.bk-acx .bk-acx-btn[aria-expanded="true"] { color: var(--acx); }
.bk-acx-title { flex: 1 1 auto; min-width: 0; }
.bk-acx-ts-sm .bk-acx-btn { font-size: 15px; padding-block: 14px; }
.bk-acx-ts-md .bk-acx-btn { font-size: 16.5px; }
.bk-acx-ts-lg .bk-acx-btn { font-size: 19px; padding-block: 22px; }

.bk-acx-iic { flex: 0 0 auto; font-size: 1.15em; color: var(--acx); line-height: 1; }
.bk-acx-num {
    flex: 0 0 auto; font-variant-numeric: tabular-nums;
    font-size: .8em; font-weight: 800; letter-spacing: .04em; color: var(--acx); opacity: .85;
}

.bk-acx-body {
    padding: 0 22px 22px; color: #475467; font-size: 15.5px; line-height: 1.8;
}
.bk-acx-body > :first-child { margin-top: 0; }
.bk-acx-body > :last-child { margin-bottom: 0; }
/* teks rata dengan judul bila ada nomor/ikon di kiri */
.bk-acx-ip-left .bk-acx-body { padding-inline-start: 58px; }

/* ── Ikon buka/tutup ── */
.bk-acx-ic { position: relative; flex: 0 0 auto; width: 22px; height: 22px; color: #98a2b3; transition: transform .3s ease, color .2s, background-color .2s; }
.bk-acx-btn:hover .bk-acx-ic,
.bk-acx-btn[aria-expanded="true"] .bk-acx-ic { color: var(--acx); }
.bk-acx-ip-left .bk-acx-ic { order: -2; }
.bk-acx-ip-left .bk-acx-num { order: -1; }

/* chevron */
.bk-acx-ic-chevron .bk-acx-ic::before {
    content: ""; position: absolute; left: 50%; top: 45%; width: 9px; height: 9px;
    border: solid currentColor; border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg);
}
.bk-acx-ic-chevron .bk-acx-btn[aria-expanded="true"] .bk-acx-ic { transform: rotate(180deg); }
/* caret (segitiga) */
.bk-acx-ic-caret .bk-acx-ic::before {
    content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30%);
    border: 6px solid transparent; border-top-color: currentColor;
}
.bk-acx-ic-caret .bk-acx-btn[aria-expanded="false"] .bk-acx-ic { transform: rotate(-90deg); }
[dir="rtl"] .bk-acx-ic-caret .bk-acx-btn[aria-expanded="false"] .bk-acx-ic { transform: rotate(90deg); }
/* plus / minus */
.bk-acx-ic-plus .bk-acx-ic::before,
.bk-acx-ic-plus .bk-acx-ic::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; border-radius: 2px;
    background: currentColor; transform: translate(-50%, -50%); transition: transform .3s ease;
}
.bk-acx-ic-plus .bk-acx-ic::after { transform: translate(-50%, -50%) rotate(90deg); }
.bk-acx-ic-plus .bk-acx-btn[aria-expanded="true"] .bk-acx-ic::after { transform: translate(-50%, -50%) rotate(0deg); }
/* chevron dalam lingkaran */
.bk-acx-ic-arrow .bk-acx-ic { width: 32px; height: 32px; border-radius: 50%; background: #f2f4f7; }
.bk-acx-ic-arrow .bk-acx-ic::before {
    content: ""; position: absolute; left: 50%; top: 44%; width: 8px; height: 8px;
    border: solid currentColor; border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg);
}
.bk-acx-ic-arrow .bk-acx-btn[aria-expanded="true"] .bk-acx-ic { transform: rotate(180deg); background: var(--acx); color: #fff; }

/* ── Gaya: Aksen (garis kiri) ── */
.bk-acx-accent .bk-acx-item {
    background: #fff; border-radius: 12px; border-inline-start: 4px solid #e4e7ec;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
}
.bk-acx-accent .bk-acx-item:has(> .bk-acx-btn[aria-expanded="true"]) { border-inline-start-color: var(--acx); box-shadow: 0 8px 24px rgba(16, 24, 40, .08); }
.bk-acx-accent .bk-acx-item:hover { border-inline-start-color: color-mix(in srgb, var(--acx) 45%, #fff); }
.bk-acx-accent .bk-acx-item:has(> .bk-acx-btn[aria-expanded="true"]):hover { border-inline-start-color: var(--acx); }

/* ── Gaya: Header Berwarna ── */
.bk-acx-filled { gap: 8px; }
.bk-acx-filled .bk-acx-item { border-radius: 12px; overflow: hidden; background: #f2f4f7; }
.bk-acx-filled .bk-acx-btn[aria-expanded="true"] { background: var(--acx); color: #fff; }
.bk-acx-filled .bk-acx-btn[aria-expanded="true"] .bk-acx-ic,
.bk-acx-filled .bk-acx-btn[aria-expanded="true"] .bk-acx-iic,
.bk-acx-filled .bk-acx-btn[aria-expanded="true"] .bk-acx-num { color: #fff; }
.bk-acx-filled.bk-acx-ic-arrow .bk-acx-btn[aria-expanded="true"] .bk-acx-ic { background: rgba(255, 255, 255, .2); }
.bk-acx-filled .bk-acx-btn[aria-expanded="false"]:hover { background: #eaecf0; }
.bk-acx-filled .bk-acx-body { background: #fff; padding-top: 20px; border: 1px solid #eaecf0; border-top: 0; border-radius: 0 0 12px 12px; }

/* ── Gaya: Minimal (daftar FAQ bergaris) ── */
.bk-acx-minimal { gap: 0; border-top: 1px solid #eaecf0; }
.bk-acx-minimal .bk-acx-item { border-bottom: 1px solid #eaecf0; }
.bk-acx-minimal .bk-acx-btn { padding-inline: 4px; }
.bk-acx-minimal .bk-acx-body { padding-inline: 4px; }
.bk-acx-minimal.bk-acx-ip-left .bk-acx-body { padding-inline-start: 40px; }

/* ── Gaya: Kartu terpisah ── */
.bk-acx-card { gap: 14px; }
.bk-acx-card .bk-acx-item { background: #fff; border: 1px solid #eaecf0; border-radius: 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.bk-acx-card .bk-acx-item:hover { border-color: #d0d5dd; box-shadow: 0 6px 16px rgba(16, 24, 40, .07); }
.bk-acx-card .bk-acx-item:has(> .bk-acx-btn[aria-expanded="true"]) {
    border-color: color-mix(in srgb, var(--acx) 45%, #fff);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--acx) 10%, transparent), 0 12px 28px rgba(16, 24, 40, .08);
}

/* ── Gaya: Kotak tunggal ── */
.bk-acx-boxed { gap: 0; border: 1px solid #eaecf0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); }
.bk-acx-boxed .bk-acx-item + .bk-acx-item { border-top: 1px solid #eaecf0; }
.bk-acx-boxed .bk-acx-item:has(> .bk-acx-btn[aria-expanded="true"]) { background: color-mix(in srgb, var(--acx) 4%, #fff); }

/* ── Gaya: FAQ lembut (latar tipis, judul tebal) ── */
.bk-acx-faq { gap: 12px; }
.bk-acx-faq .bk-acx-item { background: #f9fafb; border-radius: 16px; }
.bk-acx-faq .bk-acx-item:has(> .bk-acx-btn[aria-expanded="true"]) { background: color-mix(in srgb, var(--acx) 7%, #fff); }
.bk-acx-faq .bk-acx-btn { font-weight: 750; padding: 22px 24px; }
.bk-acx-faq .bk-acx-body { padding: 0 24px 24px; }
.bk-acx-faq .bk-acx-ic { width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .1); }
.bk-acx-faq .bk-acx-btn[aria-expanded="true"] .bk-acx-ic { background: var(--acx); color: #fff; box-shadow: none; }

/* ── Gaya: Langkah / timeline (selalu bernomor) ── */
.bk-acx-timeline { gap: 0; }
.bk-acx-timeline .bk-acx-item { padding-inline-start: 58px; }
.bk-acx-timeline .bk-acx-item::before {
    content: ""; position: absolute; inset-inline-start: 19px; top: 0; bottom: 0; width: 2px; background: #eaecf0;
}
.bk-acx-timeline .bk-acx-item:first-child::before { top: 30px; }
.bk-acx-timeline .bk-acx-item:last-child::before { bottom: auto; height: 30px; }
.bk-acx-timeline .bk-acx-item:only-child::before { display: none; }
.bk-acx-timeline .bk-acx-btn { padding-inline: 0; }
.bk-acx-timeline .bk-acx-num {
    position: absolute; inset-inline-start: 0; top: 10px; width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; opacity: 1;
    background: #fff; border: 2px solid #d0d5dd; color: #667085; font-size: 13px; z-index: 1;
    transition: background-color .2s, border-color .2s, color .2s;
}
.bk-acx-ts-sm.bk-acx-timeline .bk-acx-num { top: 6px; }
.bk-acx-ts-lg.bk-acx-timeline .bk-acx-num { top: 16px; }
.bk-acx-timeline .bk-acx-btn[aria-expanded="true"] .bk-acx-num { background: var(--acx); border-color: var(--acx); color: #fff; }
.bk-acx-timeline .bk-acx-body,
.bk-acx-timeline.bk-acx-ip-left .bk-acx-body { padding-inline: 0; padding-inline-start: 0; }
.bk-acx-timeline.bk-acx-ip-left .bk-acx-ic { order: 0; }

@media (max-width: 575.98px) {
    .bk-acx .bk-acx-btn { padding: 16px 16px; gap: 12px; }
    .bk-acx-body { padding: 0 16px 18px; }
    .bk-acx-ip-left .bk-acx-body { padding-inline-start: 16px; }
    .bk-acx-minimal .bk-acx-btn, .bk-acx-minimal .bk-acx-body { padding-inline: 2px; }
    .bk-acx-timeline .bk-acx-btn { padding-inline: 0; }
    .bk-acx-ts-lg .bk-acx-btn { font-size: 17px; }
}

/* ══ Tab v2: .bk-tbx.bk-tbx-{pill|underline|segmented|card} ══════════════ */
.bk-tbx .bk-tbx-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.bk-tbx .bk-tbx-nav .nav-item { margin: 0; }
.bk-tbx-a-center .bk-tbx-nav { justify-content: center; }
.bk-tbx-a-stretch .bk-tbx-nav .nav-item { flex: 1 1 0; }
.bk-tbx .bk-tbx-btn {
    all: unset; box-sizing: border-box; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 10px 20px; font-size: 15px; font-weight: 650; line-height: 1.35; color: #475467; text-align: center;
    transition: color .2s, background-color .2s, border-color .2s, box-shadow .2s;
}
.bk-tbx .bk-tbx-btn:focus-visible { outline: 2px solid var(--acx); outline-offset: 2px; }
.bk-tbx .bk-tbx-btn:hover { color: #101828; }
.bk-tbx .bk-tbx-btn .bk-acx-iic { font-size: 1.05em; color: inherit; }
.bk-tbx-content > .tab-pane { color: #475467; font-size: 15.5px; line-height: 1.8; }
.bk-tbx-content > .tab-pane > :first-child { margin-top: 0; }
.bk-tbx-content > .tab-pane > :last-child { margin-bottom: 0; }

/* Pil */
.bk-tbx-pill .bk-tbx-btn { border-radius: 99px; background: #f2f4f7; }
.bk-tbx-pill .bk-tbx-btn:hover { background: #eaecf0; }
.bk-tbx-pill .bk-tbx-btn.active { background: var(--acx); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--acx) 30%, transparent); }

/* Garis bawah */
.bk-tbx-underline .bk-tbx-nav { gap: 4px 28px; border-bottom: 1px solid #eaecf0; margin-bottom: 26px; }
.bk-tbx-underline .bk-tbx-btn { padding: 12px 2px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.bk-tbx-underline .bk-tbx-btn.active { color: var(--acx); border-bottom-color: var(--acx); }

/* Segmen */
.bk-tbx-segmented .bk-tbx-nav { display: inline-flex; gap: 4px; padding: 5px; border-radius: 14px; background: #f2f4f7; max-width: 100%; }
.bk-tbx-a-center.bk-tbx-segmented { text-align: center; }
.bk-tbx-a-stretch.bk-tbx-segmented .bk-tbx-nav { display: flex; }
.bk-tbx-segmented .bk-tbx-btn { border-radius: 10px; padding: 9px 18px; }
.bk-tbx-segmented .bk-tbx-btn.active { background: #fff; color: var(--acx); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }
.bk-tbx-segmented .bk-tbx-content { text-align: start; }

/* Kartu (tab ala map, panel berbingkai) */
.bk-tbx-card .bk-tbx-nav { gap: 6px; margin-bottom: 0; }
.bk-tbx-card .bk-tbx-btn { border: 1px solid transparent; border-bottom: 0; border-radius: 12px 12px 0 0; background: #f2f4f7; }
.bk-tbx-card .bk-tbx-btn.active { background: #fff; color: var(--acx); border-color: #eaecf0; box-shadow: inset 0 3px 0 var(--acx); position: relative; z-index: 1; margin-bottom: -1px; padding-bottom: 11px; }
.bk-tbx-card .bk-tbx-content { border: 1px solid #eaecf0; border-radius: 0 14px 14px 14px; padding: 26px; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .05); }

/* Posisi tab di kiri (≥768px) */
@media (min-width: 768px) {
    .bk-tbx-left { display: flex; align-items: flex-start; gap: 28px; }
    .bk-tbx-left .bk-tbx-nav { flex: 0 0 230px; width: 230px; flex-direction: column; flex-wrap: nowrap; margin: 0; }
    .bk-tbx-left .bk-tbx-btn { justify-content: flex-start; text-align: start; }
    .bk-tbx-left .bk-tbx-content { flex: 1; min-width: 0; }
    .bk-tbx-left.bk-tbx-pill .bk-tbx-btn { border-radius: 12px; }
    .bk-tbx-left.bk-tbx-underline .bk-tbx-nav { border-bottom: 0; border-inline-start: 1px solid #eaecf0; gap: 2px; }
    .bk-tbx-left.bk-tbx-underline .bk-tbx-btn { border-bottom: 0; border-inline-start: 2px solid transparent; margin: 0 0 0 -1px; padding: 10px 18px; }
    [dir="rtl"] .bk-tbx-left.bk-tbx-underline .bk-tbx-btn { margin: 0 -1px 0 0; }
    .bk-tbx-left.bk-tbx-underline .bk-tbx-btn.active { border-inline-start-color: var(--acx); }
    .bk-tbx-left.bk-tbx-segmented .bk-tbx-nav { display: flex; }
    .bk-tbx-left.bk-tbx-card { gap: 0; }
    .bk-tbx-left.bk-tbx-card .bk-tbx-btn { border-radius: 12px 0 0 12px; border: 1px solid transparent; border-inline-end: 0; }
    .bk-tbx-left.bk-tbx-card .bk-tbx-btn.active { box-shadow: inset 3px 0 0 var(--acx); margin: 0 -1px 0 0; padding-bottom: 10px; border-color: #eaecf0; }
    .bk-tbx-left.bk-tbx-card .bk-tbx-content { border-radius: 0 14px 14px 14px; }
}
@media (max-width: 575.98px) {
    .bk-tbx .bk-tbx-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .bk-tbx .bk-tbx-nav .nav-item { flex: 0 0 auto; }
    .bk-tbx .bk-tbx-btn { white-space: nowrap; }
    /* Tab rata tengah yang digulir: justify center memotong tab pertama (tidak
       bisa dijangkau) → mulai dari kiri; segmen jadi selebar kolom. */
    .bk-tbx-a-center .bk-tbx-nav { justify-content: flex-start; }
    .bk-tbx-segmented .bk-tbx-nav { display: flex; }
    .bk-tbx-card .bk-tbx-content { padding: 20px; border-radius: 0 0 14px 14px; }
}
