/* =====================================================================
   PELENGKAP (3.90.0) — bilah progres baca, tombol ke atas, pencarian situs
   Semua kelas berawalan .pl- supaya tidak menyentuh gaya lain.
   Untuk kembali: hapus <link> pelengkap.css dan <script> pelengkap.js di tiap halaman publik.
   ===================================================================== */

/* ---------- Bilah progres baca ---------- */
.pl-progres {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 120;
  height: 3px; pointer-events: none;
  background: var(--biru-muda, #3a7ab5);
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: 0; transition: opacity 0.2s ease;
  will-change: transform;
}
.pl-progres.aktif { opacity: 1; }

/* ---------- Dok kiri bawah: cari + ke atas ---------- */
.pl-dok {
  position: fixed; z-index: 49;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.pl-tombol {
  appearance: none; display: grid; place-items: center;
  width: 46px; height: 46px; padding: 0; cursor: pointer;
  color: var(--biru-tua, #143554); background: #fff;
  border: 1px solid rgba(20, 53, 84, 0.22); border-radius: 50%;
  box-shadow: 0 1px 2px rgba(20, 53, 84, 0.08), 0 10px 22px -12px rgba(20, 53, 84, 0.4);
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.2s ease, visibility 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.pl-tombol:hover { background: var(--biru-soft, #e8f1f8); border-color: var(--biru, #1e4d7b); transform: translateY(-2px); }
.pl-tombol:active { transform: scale(0.95); }
.pl-tombol:focus-visible { outline: 2px solid var(--biru-muda, #3a7ab5); outline-offset: 3px; }
.pl-tombol svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pl-atas { opacity: 0; visibility: hidden; transform: translateY(10px); }
.pl-atas.tampil { opacity: 1; visibility: visible; transform: none; }
.pl-atas.tampil:hover { transform: translateY(-2px); }

/* kartu status pendaftar memakai dasar layar yang sama: dok mengalah */
body:has(.kartu-status) .pl-dok { opacity: 0; pointer-events: none; }

/* ---------- Dialog pencarian ---------- */
.pl-cari {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: flex-start; justify-content: center;
  padding: max(10px, env(safe-area-inset-top, 0px)) 10px 10px;
  background: rgba(10, 24, 38, 0.56);
  opacity: 0; transition: opacity 0.16s ease;
}
.pl-cari[hidden] { display: none; }
.pl-cari.buka { opacity: 1; }
html.pl-kunci, html.pl-kunci body { overflow: hidden; }

.pl-panel {
  width: 100%; max-width: 580px; margin-top: 8vh;
  display: flex; flex-direction: column; max-height: min(78vh, 640px);
  color: var(--teks, #10202e); background: #fff;
  border: 1px solid rgba(20, 53, 84, 0.16); border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 4px rgba(20, 53, 84, 0.08), 0 28px 60px -20px rgba(8, 24, 40, 0.6);
  transform: translateY(10px); transition: transform 0.18s ease;
}
.pl-cari.buka .pl-panel { transform: none; }

.pl-kolom {
  display: flex; align-items: center; gap: 10px; padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--garis, #d9e2ea);
}
.pl-kolom > svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--biru, #1e4d7b); stroke-width: 2; stroke-linecap: round; }
.pl-input {
  flex: 1; min-width: 0; height: 56px; padding: 0; border: 0; background: transparent; outline: none;
  font: 500 1rem/1.2 var(--font-isi, system-ui, sans-serif); color: inherit;
  -webkit-appearance: none; appearance: none;
}
.pl-input::placeholder { color: var(--teks-redup, #4c5f70); opacity: 1; }
.pl-input::-webkit-search-cancel-button { display: none; }
.pl-tutup {
  appearance: none; flex: none; min-width: 44px; height: 44px; padding: 0 10px; cursor: pointer;
  font: 600 0.8125rem/1 var(--font-isi, system-ui, sans-serif); color: var(--teks-redup, #4c5f70);
  background: transparent; border: 0; border-radius: 10px;
}
.pl-tutup:hover { background: var(--biru-soft, #e8f1f8); color: var(--biru-tua, #143554); }
.pl-tutup:focus-visible { outline: 2px solid var(--biru-muda, #3a7ab5); outline-offset: -2px; }
.pl-input:focus, .pl-input:focus-visible { outline: none; box-shadow: none; }
.pl-kolom:focus-within { border-bottom-color: var(--biru, #1e4d7b); box-shadow: 0 1px 0 var(--biru, #1e4d7b); }

.pl-daftar { list-style: none; margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; }
.pl-label {
  margin: 8px 10px 4px; font: 700 0.6875rem/1 var(--font-isi, system-ui, sans-serif);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--teks-redup, #4c5f70);
}
.pl-label:first-child { margin-top: 4px; }
.pl-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: inherit; text-decoration: none; cursor: pointer;
}
.pl-item[aria-selected="true"], .pl-item:hover { background: var(--biru-soft, #e8f1f8); }
.pl-item-teks { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pl-item-judul { font: 600 0.9375rem/1.3 var(--font-isi, system-ui, sans-serif); color: var(--biru-tua, #143554); overflow-wrap: anywhere; }
.pl-item-ket {
  font-size: 0.8125rem; line-height: 1.4; color: var(--teks-redup, #4c5f70);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.pl-item > svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--biru, #1e4d7b); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translateX(-4px); transition: opacity 0.12s, transform 0.12s; }
.pl-item[aria-selected="true"] > svg { opacity: 1; transform: none; }

.pl-kosong { padding: 26px 18px 28px; text-align: center; font-size: 0.9375rem; line-height: 1.55; color: var(--teks-redup, #4c5f70); }
.pl-kosong a { color: var(--biru, #1e4d7b); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.pl-kaki {
  display: none; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--garis, #d9e2ea);
  font-size: 0.75rem; color: var(--teks-redup, #4c5f70); background: var(--kertas, #f4f7fa);
}
.pl-kaki kbd {
  font: 600 0.6875rem/1 var(--font-isi, system-ui, sans-serif); padding: 3px 6px; margin-right: 4px;
  border: 1px solid var(--garis-kuat, #c3d0db); border-bottom-width: 2px; border-radius: 5px; background: #fff; color: var(--teks, #10202e);
}
@media (hover: hover) and (min-width: 720px) { .pl-kaki { display: flex; } }

.pl-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 719px) {
  .pl-cari { padding-inline: 8px; }
  .pl-panel { margin-top: 0; max-height: 86vh; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-progres, .pl-tombol, .pl-cari, .pl-panel, .pl-item > svg { transition: none; }
  .pl-panel { transform: none; }
  .pl-tombol:hover, .pl-atas.tampil:hover { transform: none; }
}

@media print { .pl-progres, .pl-dok, .pl-cari { display: none !important; } }
