.jao-wrap {
    --jao-primary: var(--okp-primary-color, var(--jpl-primary-color, var(--primary-color, var(--wp--preset--color--primary, #2563eb))));
    --jao-text: var(--jao-text-color, #1f2937);
    --jao-muted: #5b6472;
    --jao-border: #dfe3ea;
    --jao-bg: #ffffff;
    --jao-soft: #f6f8fb;
    --jao-tint: rgba(37, 99, 235, 0.07);
    --jao-radius: 14px;
    --jao-aside-w: 340px;
    width: 100%;
    max-width: none;
    margin: 0;
    color: var(--jao-text);
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    /* Breakpoint mengikuti lebar kolom konten tema, bukan lebar layar */
    container-type: inline-size;
}
@supports (background: color-mix(in srgb, red 10%, white)) {
    .jao-wrap { --jao-tint: color-mix(in srgb, var(--jao-primary) 7%, #ffffff); }
}
.jao-wrap *, .jao-wrap *::before, .jao-wrap *::after { box-sizing: border-box; }
.jao-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Layout dua kolom: pilihan di kiri, ringkasan sticky di kanan */
.jao-wrap .jao-form { display: block; margin: 0; padding: 0; }
.jao-wrap .jao-main { min-width: 0; }
.jao-wrap .jao-aside { min-width: 0; margin-top: 8px; }
@container (min-width: 960px) {
    .jao-wrap .jao-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) var(--jao-aside-w);
        gap: 32px;
        align-items: start;
    }
    .jao-wrap .jao-aside { margin-top: 0; align-self: stretch; }
    /* Offset menyesuaikan header lengket tema; ubah lewat --jao-sticky-top bila perlu */
    .jao-wrap .jao-summary { position: sticky; top: var(--jao-sticky-top, 88px); }
    body.admin-bar .jao-wrap .jao-summary { top: calc(var(--jao-sticky-top, 88px) + 32px); }
}

/* Header langkah */
.jao-wrap .jao-section { border: 0; margin: 0 0 32px; padding: 0; min-width: 0; }
.jao-wrap .jao-step-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.jao-wrap .jao-step-badge {
    flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--jao-primary); color: #fff; font-size: 15px; font-weight: 700; line-height: 1;
}
.jao-wrap .jao-step-title { margin: 0; padding: 0; font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--jao-text); }
.jao-wrap .jao-step-sub { margin: 2px 0 0; font-size: 14px; color: var(--jao-muted); line-height: 1.4; }

/* Input tersembunyi tapi tetap bisa difokus (dipakai ubin) */
.jao-wrap .jao-tile { position: relative; }
.jao-wrap .jao-tile-input, .jao-wrap .jao-chip-input, .jao-wrap .jao-none .jao-tile-input {
    position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; padding: 0;
    top: 0; left: 0; pointer-events: none;
}

/* Ubin umum */
.jao-wrap .jao-tiles { display: grid; grid-template-columns: 1fr; gap: 8px; }
@container (min-width: 560px) {
    .jao-wrap .jao-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Ubin terakhir yang terlihat memanjang penuh bila jumlah ubin terlihat ganjil (kelas diatur PHP & JS, karena ubin tersembunyi tetap dihitung nth-child). */
    .jao-wrap .jao-tiles > .jao-tile.jao-span-full { grid-column: 1 / -1; }
    /* Layanan tambahan: daftar vertikal selebar penuh. */
    .jao-wrap .jao-tiles.jao-tiles-list { grid-template-columns: minmax(0, 1fr); }
}
.jao-wrap .jao-tile-face {
    position: relative; display: flex; align-items: center; gap: 12px; height: 100%;
    min-height: 56px; padding: 10px 44px 10px 12px; margin: 0;
    background: var(--jao-bg); border: 1px solid var(--jao-border); border-radius: 12px;
    flex-wrap: wrap; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s;
    font-weight: 400;
}
.jao-wrap .jao-tile-face:hover { border-color: var(--jao-primary); }
.jao-wrap .jao-tile-icon {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--jao-soft); color: var(--jao-muted);
}
.jao-wrap .jao-tile-icon-brand { background: var(--jao-soft); }
.jao-wrap .jao-tile-icon svg { width: 20px; height: 20px; display: block; }
.jao-wrap .jao-tile-body { flex: 1 1 100px; min-width: 0; display: flex; flex-direction: column; }
.jao-wrap .jao-tile-name { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--jao-text); }
.jao-wrap .jao-tile-body small { font-size: 13px; color: var(--jao-muted); line-height: 1.3; }
.jao-wrap .jao-tile-stat { margin-top: 2px; font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--jao-muted); }
.jao-wrap .jao-stats-note { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: var(--jao-muted); }
.jao-wrap .jao-tile-price { flex: 0 0 auto; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--jao-muted); }
.jao-wrap .jao-tile-check {
    position: absolute; top: 18px; right: 12px; width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--jao-primary); color: #fff; opacity: 0; transform: scale(.6);
    transition: opacity .15s, transform .15s;
}
.jao-wrap .jao-tile-check svg { width: 14px; height: 14px; stroke-width: 3; display: block; }
.jao-wrap .jao-tile-input:checked ~ .jao-tile-face,
.jao-wrap .jao-tile-qty.is-on .jao-tile-face {
    border-color: var(--jao-primary); background: var(--jao-tint);
}
.jao-wrap .jao-tile-input:checked ~ .jao-tile-face .jao-tile-price { color: var(--jao-text); }
.jao-wrap .jao-tile-input:checked ~ .jao-tile-face .jao-tile-check { opacity: 1; transform: scale(1); }
.jao-wrap .jao-tile-input:checked ~ .jao-tile-face .jao-tile-icon:not(.jao-tile-icon-brand),
.jao-wrap .jao-tile-qty.is-on .jao-tile-icon { background: var(--jao-primary); color: #fff; }
.jao-wrap .jao-tile-input:focus-visible ~ .jao-tile-face,
.jao-wrap .jao-tile-face:focus-within,
.jao-wrap .jao-chip-input:focus-visible + .jao-chip,
.jao-wrap .jao-none .jao-tile-input:focus-visible + .jao-none-face {
    outline: 3px solid var(--jao-primary); outline-offset: 2px;
}
.jao-wrap .jao-tile-qty .jao-tile-face { padding-right: 14px; flex-wrap: wrap; }
.jao-wrap .jao-tile-qty input[type="number"] {
    flex: 0 0 auto; width: 76px; height: 44px; padding: 0 8px; margin: 0;
    font: inherit; font-size: 16px; text-align: center; color: var(--jao-text);
    background: var(--jao-bg); border: 1px solid var(--jao-border); border-radius: 10px;
}

/* Repost: muncul hanya setelah kanal dicentang; chip di dalam ubin */
.jao-wrap .jao-has-repost .jao-tile-face { align-items: flex-start; transition: padding-bottom .2s ease, border-color .15s, background-color .15s; }
.jao-wrap .jao-has-repost .jao-tile-body { min-height: 36px; justify-content: center; }
.jao-wrap .jao-has-repost .jao-tile-price { line-height: 36px; }
.jao-wrap .jao-has-repost .jao-tile-input:checked ~ .jao-tile-face { padding-bottom: 50px; }
.jao-wrap .jao-chip {
    position: absolute; left: 12px; bottom: 10px; z-index: 1;
    display: inline-flex; align-items: center; gap: 6px; min-height: 30px; margin: 0; padding: 2px 12px;
    font-size: 12.5px; font-weight: 500; line-height: 1.2; color: var(--jao-primary);
    background: var(--jao-bg); border: 1px solid var(--jao-primary); border-radius: 999px;
    cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s, background-color .15s, color .15s;
}
.jao-wrap .jao-tile-input:checked ~ .jao-chip { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.jao-wrap .jao-chip-price { font-weight: 600; }
.jao-wrap .jao-chip-input:checked + .jao-chip { background: var(--jao-primary); color: #fff; }

/* Paket website */
.jao-wrap .jao-plans { display: grid; grid-template-columns: 1fr; gap: 12px; }
@container (min-width: 560px) {
    .jao-wrap .jao-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.jao-wrap .jao-plan .jao-tile-face {
    flex-direction: column; flex-wrap: nowrap; align-items: flex-start; justify-content: flex-start; gap: 2px; padding: 20px 16px 16px;
}
.jao-wrap .jao-plan-name { font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--jao-text); }
.jao-wrap .jao-plan-price { margin-top: 6px; font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--jao-primary); }
.jao-wrap .jao-plan-desc { margin-top: 4px; font-size: 13px; color: var(--jao-muted); }
.jao-wrap .jao-plan .jao-tile-check { top: 12px; right: 12px; }
.jao-wrap .jao-save {
    display: inline-block; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; line-height: 1.6; color: #0f6b3a; background: #dcf5e6;
}
.jao-wrap .jao-plan .jao-tile-input:checked ~ .jao-tile-face .jao-save { padding-right: 34px; }
.jao-wrap .jao-none { position: relative; margin-top: 12px; }
.jao-wrap .jao-none-face {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; margin: 0;
    font-size: 14px; font-weight: 500; color: var(--jao-muted); cursor: pointer;
    border: 1.5px dashed var(--jao-border); border-radius: 999px; transition: all .15s;
}
.jao-wrap .jao-none-face:hover { color: var(--jao-primary); border-color: var(--jao-primary); }
.jao-wrap .jao-none .jao-tile-input:checked + .jao-none-face {
    color: var(--jao-primary); border-style: solid; border-color: var(--jao-primary); background: var(--jao-tint);
}

/* Ringkasan */
.jao-wrap .jao-summary {
    background: var(--jao-bg); border: 1px solid var(--jao-border); border-radius: 18px;
    padding: 22px; box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}
.jao-wrap .jao-summary h3 { margin: 0 0 14px; padding: 0; font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--jao-text); }
.jao-wrap .jao-summary-list { list-style: none; margin: 0; padding: 0; }
.jao-wrap .jao-summary-list li {
    display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0;
    font-size: 14px; line-height: 1.4; border-bottom: 1px dashed var(--jao-border);
}
.jao-wrap .jao-summary-list li span:last-child { flex: 0 0 auto; font-weight: 600; white-space: nowrap; }
.jao-wrap .jao-summary-empty {
    margin: 0; padding: 18px 12px; text-align: center; font-size: 14px; color: var(--jao-muted);
    background: var(--jao-soft); border-radius: 10px;
}
.jao-wrap .jao-summary-empty[hidden] { display: none; }
.jao-wrap .jao-total {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    margin-top: 14px; padding-top: 14px; border-top: 1.5px solid var(--jao-border); font-size: 15px; font-weight: 600;
}
.jao-wrap .jao-total strong { font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--jao-primary); font-variant-numeric: tabular-nums; }
.jao-wrap .jao-summary-note { margin: 10px 0 0; font-size: 13px; line-height: 1.4; color: var(--jao-muted); text-align: center; }

/* Form data */
.jao-wrap .jao-fields { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 20px; }
@container (min-width: 560px) {
    .jao-wrap .jao-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jao-wrap .jao-fields .jao-full { grid-column: 1 / -1; }
}
.jao-wrap .jao-field { margin: 0; }
.jao-wrap .jao-field label { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--jao-text); }
.jao-wrap .jao-field input, .jao-wrap .jao-field textarea {
    display: block; width: 100%; max-width: none; margin: 0; padding: 10px 14px; min-height: 46px;
    font: inherit; font-size: 16px; line-height: 1.4; color: var(--jao-text);
    background: var(--jao-bg); border: 1.5px solid var(--jao-border); border-radius: 12px; box-shadow: none;
}
.jao-wrap .jao-field textarea { min-height: 96px; resize: vertical; }
.jao-wrap .jao-field input::placeholder, .jao-wrap .jao-field textarea::placeholder { color: #8a93a1; opacity: 1; }
.jao-wrap .jao-field input:focus, .jao-wrap .jao-field textarea:focus {
    outline: 3px solid var(--jao-tint); outline-offset: 0; border-color: var(--jao-primary);
}
.jao-wrap .jao-field input[type="file"] { padding: 9px 12px; font-size: 14px; cursor: pointer; }
.jao-wrap .jao-doc-note { font-size: 13px; line-height: 1.5; color: var(--jao-muted); }
.jao-wrap .jao-terms {
    margin: 0 0 12px; padding: 12px 14px; font-size: 13px; line-height: 1.55; color: var(--jao-muted);
    background: var(--jao-soft); border: 1px solid var(--jao-border); border-radius: 12px;
}
.jao-wrap .jao-consent {
    display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 0; padding: 12px 14px;
    font-size: 14px; line-height: 1.45; font-weight: 500; cursor: pointer;
    background: var(--jao-bg); border: 1.5px solid var(--jao-border); border-radius: 12px;
}
.jao-wrap .jao-consent input[type="checkbox"] {
    flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--jao-primary);
}
.jao-wrap .jao-consent:focus-within { outline: 3px solid var(--jao-primary); outline-offset: 2px; }
.jao-wrap .jao-consent a { color: var(--jao-primary); text-decoration: underline; font-weight: 600; }
.jao-wrap .jao-consent a:hover { opacity: 0.85; }

/* Pesan error / sukses (inline, di atas tombol) */
.jao-wrap .jao-message {
    margin: 14px 0 0; padding: 12px 14px; font-size: 14px; line-height: 1.45;
    background: #fdeceb; color: #8a1f1f; border: 1px solid #f3b9b5; border-left: 4px solid #d93025; border-radius: 10px;
}
.jao-wrap .jao-message[hidden] { display: none; }
.jao-wrap .jao-message ul { margin: 0; padding: 0 0 0 18px; }
.jao-wrap .jao-message li { margin: 0; padding: 0; }
.jao-wrap .jao-message-ok { background: #e3f3e8; color: #145a2a; border-color: #b4dfc2; border-left-color: #1e8e4a; }

.jao-wrap .jao-submit {
    display: block; width: 100%; min-height: 52px; margin: 14px 0 0; padding: 14px 18px;
    font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; text-align: center;
    color: #fff; background: var(--jao-primary); border: 0; border-radius: 12px; cursor: pointer;
    box-shadow: none; text-transform: none; letter-spacing: 0;
}
.jao-wrap .jao-submit:hover { filter: brightness(0.92); }
.jao-wrap .jao-submit:focus-visible, .jao-wrap .jao-bar-btn:focus-visible { outline: 3px solid var(--jao-primary); outline-offset: 3px; }
.jao-wrap .jao-submit:disabled { opacity: 0.6; cursor: wait; }

/* Bar total menempel di bawah layar (hanya HP/tablet, diaktifkan JS) */
.jao-wrap .jao-bar { display: none; }
@container (max-width: 959px) {
    .jao-wrap .jao-form { padding-bottom: 96px; }
    .jao-wrap .jao-bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
        background: var(--jao-bg); border-top: 1px solid var(--jao-border); box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.08);
        transform: translateY(110%); visibility: hidden; transition: transform .2s, visibility .2s;
    }
    .jao-wrap.jao-bar-on .jao-bar { transform: none; visibility: visible; }
    .jao-wrap .jao-bar-total { display: flex; flex-direction: column; line-height: 1.2; font-size: 12px; color: var(--jao-muted); }
    .jao-wrap .jao-bar-total strong { font-size: 20px; font-weight: 700; color: var(--jao-primary); font-variant-numeric: tabular-nums; }
    .jao-wrap .jao-bar-btn {
        flex: 0 0 auto; min-height: 46px; margin: 0; padding: 0 20px; font: inherit; font-size: 15px; font-weight: 700;
        color: #fff; background: var(--jao-primary); border: 0; border-radius: 12px; cursor: pointer;
        text-transform: none; letter-spacing: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jao-wrap *, .jao-wrap *::before, .jao-wrap *::after { transition: none !important; }
}

/* Pilihan jenis postingan (Share Posting / Full Posting) */
.jao-wrap .jao-seg { margin: 0 0 12px; }
.jao-wrap .jao-seg-title { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--jao-muted); }
.jao-wrap .jao-seg-opts { display: grid; grid-template-columns: 1fr; gap: 8px; }
@container (min-width: 480px) {
    .jao-wrap .jao-seg-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.jao-wrap .jao-seg-opt { position: relative; }
.jao-wrap .jao-seg-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; padding: 0; top: 0; left: 0; pointer-events: none; }
.jao-wrap .jao-seg-face {
    display: flex; flex-direction: column; gap: 1px; height: 100%; margin: 0; padding: 8px 12px;
    background: var(--jao-bg); border: 1px solid var(--jao-border); border-radius: 12px;
    cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; font-weight: 400;
}
.jao-wrap .jao-seg-face strong { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--jao-text); }
.jao-wrap .jao-seg-face small { font-size: 12px; line-height: 1.3; color: var(--jao-muted); }
.jao-wrap .jao-seg-face:hover { border-color: var(--jao-primary); }
.jao-wrap .jao-seg-input:checked + .jao-seg-face { border-color: var(--jao-primary); background: var(--jao-tint); }
.jao-wrap .jao-seg-input:focus-visible + .jao-seg-face { outline: 3px solid var(--jao-primary); outline-offset: 2px; }
.jao-wrap .jao-type-warn { margin: 8px 0 0; padding: 8px 12px; font-size: 13px; line-height: 1.4; color: #8a1f1f; background: #fdf0f0; border: 1px solid #f0c4c4; border-radius: 8px; }
.jao-wrap .jao-type-warn[hidden] { display: none; }
.jao-wrap .jao-tile-body small.jao-design-note { margin-top: 4px; }
.jao-wrap .jao-tiles-list .jao-tile-body small + small { margin-top: 4px; }

/* Subjudul kecil (mis. Paket bundling) */
.jao-wrap .jao-subhead { margin: 18px 0 8px; padding: 0; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--jao-muted); }

/* Ketersediaan kanal per jenis postingan */
.jao-wrap .jao-tile[hidden], .jao-wrap .jao-tiles[hidden], .jao-wrap .jao-bundle-block[hidden] { display: none; }
.jao-wrap .jao-channel { animation: jao-fade .2s ease; }
@keyframes jao-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .jao-wrap .jao-channel { animation: none; } }
.jao-wrap .jao-avail-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--jao-muted); }
.jao-wrap .jao-avail-note[hidden] { display: none; }
.jao-wrap .jao-seg-opts.jao-seg-single { grid-template-columns: minmax(0, 1fr); }
.jao-wrap .jao-chip[hidden] { display: none; }
