/* =====================================================================
   SEFORAA – fitur Cari (kotak perintah)
   Pasangan: includes/cari.php + assets/js/seforaa-cari.js
   Desktop: panel melayang di atas tengah layar. HP: lembar penuh.
   ===================================================================== */
.cr { --cr-maroon: #69131B; --cr-deep: #4A0D13; --cr-accent: #C74A56; --cr-ink: #2B2B2B; --cr-slate: #5E6672; --cr-line: #ECE6E4; --cr-bg: #FBF8F7;
  position: fixed; inset: 0; z-index: 2000; display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px; }
.cr[hidden] { display: none; }
.cr-backdrop { position: absolute; inset: 0; background: rgba(42, 8, 12, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.cr-panel {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 720px; max-height: min(78vh, 760px); border-radius: 22px; overflow: hidden;
  background: #fff; color: var(--cr-ink); box-shadow: 0 50px 100px -30px rgba(20, 2, 6, .65), 0 0 0 1px rgba(255, 255, 255, .06);
}

/* ---------- baris input ---------- */
.cr-bar { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--cr-line); }
.cr-ic { flex: none; color: var(--cr-maroon); }
/* spesifisitas tinggi: gaya input bawaan tema (bingkai, tinggi, padding) tidak boleh ikut masuk */
.cr .cr-bar input.cr-input { flex: 1; min-width: 0; width: auto; height: auto; margin: 0; padding: 6px 0; border: 0; border-radius: 0; outline: 0; background: none; box-shadow: none; font: inherit; font-size: 18px; font-weight: 500; line-height: 1.4; color: var(--cr-ink); }
.cr .cr-bar input.cr-input:focus, .cr .cr-bar input.cr-input:focus-visible { border: 0; outline: 0; box-shadow: none; background: none; }
.cr .cr-bar input.cr-input::placeholder { color: #9A9099; font-weight: 400; opacity: 1; }
.cr-hapus { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; color: var(--cr-slate); background: #F1ECEA; cursor: pointer; transition: background-color .25s ease, color .25s ease; }
.cr-hapus:hover { color: #fff; background: var(--cr-maroon); }
.cr-hapus[hidden] { display: none; }
.cr-esc, .cr-kaki kbd { display: inline-block; min-width: 24px; padding: 2px 7px; border-radius: 6px; font: 600 11.5px/1.5 inherit; font-family: inherit; text-align: center; color: var(--cr-slate); background: #F4EFED; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08); }
.cr-tutup { display: none; flex: none; padding: 8px 4px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--cr-maroon); cursor: pointer; }

/* ---------- isi ---------- */
.cr-isi { position: relative; flex: 1; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px 14px; scrollbar-width: thin; }
.cr-sorot { position: absolute; left: 10px; right: 10px; top: 0; height: 0; border-radius: 14px; background: linear-gradient(90deg, #F9EDEE, #FBF6F4); box-shadow: inset 0 0 0 1.5px rgba(199, 74, 86, .35); pointer-events: none; opacity: 0; z-index: 0; }
.cr-judul { display: flex; align-items: center; justify-content: space-between; margin: 14px 8px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8A7A7C; }
.cr-awal .cr-judul:first-child { margin-top: 8px; }
.cr-bersih { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--cr-maroon); cursor: pointer; }

/* aplikasi cepat */
.cr-apps { list-style: none; margin: 0; padding: 0 4px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cr-app { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; border-radius: 14px; font-size: 11.5px; font-weight: 600; line-height: 1.25; text-align: center; color: var(--cr-ink); text-decoration: none; transition: background-color .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.cr-app:hover, .cr-app:focus-visible { color: var(--cr-ink); background: color-mix(in srgb, var(--c1) 9%, #fff); transform: translateY(-3px); outline: none; }
.cr-app .sm-ico { width: 44px; height: 44px; border-radius: 13px; }
.cr-app .sm-ico svg { width: 22px; height: 22px; }

/* chip saran */
.cr-chips { list-style: none; margin: 0; padding: 0 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.cr-chip { padding: 7px 14px; border: 0; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--cr-ink); background: #F4EFED; cursor: pointer; transition: background-color .25s ease, color .25s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.cr-chip:hover, .cr-chip:focus-visible { color: #fff; background: var(--cr-maroon); transform: translateY(-2px); outline: none; }

/* ---------- hasil ---------- */
.cr-hasil { position: relative; z-index: 1; }
.cr-grup { margin-top: 8px; }
.cr-grup-j { margin: 12px 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8A7A7C; }
.cr-grup-j b { margin-left: 6px; font-weight: 600; color: #B5A8AB; }
.cr-opsi { position: relative; z-index: 1; list-style: none; }
.cr-item { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 14px; color: var(--cr-ink); text-decoration: none; }
.cr-item:hover, .cr-item:focus-visible { color: var(--cr-ink); outline: none; }
.cr-tile { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--cr-maroon); background: #F4EFED; }
.cr-tile svg { width: 20px; height: 20px; }
.cr-tile.is-app { color: #fff; background: linear-gradient(140deg, var(--c1), var(--c2)); box-shadow: 0 8px 14px -8px var(--c1); }
.cr-tile.is-hal { background: #F9EDEE; }
.cr-tile.is-faq { color: var(--cr-accent); background: #FDF1F2; }
.cr-teks { min-width: 0; }
.cr-t { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.35; color: var(--cr-ink); }
.cr-d { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 13.5px; line-height: 1.45; color: var(--cr-slate); }
.cr-s { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: #A09699; }
.cr-t mark, .cr-d mark { padding: 0 1px; border-radius: 3px; color: inherit; background: rgba(199, 74, 86, .2); box-shadow: 0 1px 0 rgba(199, 74, 86, .55); }
.cr-go { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--cr-accent); opacity: 0; transform: translateX(-6px); transition: opacity .2s ease, transform .3s ease; }
.cr-item[aria-selected="true"] .cr-go { opacity: 1; transform: none; }
.cr-item[aria-selected="true"] .cr-t { color: var(--cr-maroon); }

/* ---------- tidak ada hasil ---------- */
.cr-kosong { padding: 26px 16px 20px; text-align: center; }
.cr-kosong[hidden], .cr-awal[hidden], .cr-hasil[hidden], #cr-terakhir[hidden], .cr-maksud[hidden] { display: none; }
.cr-kosong-t { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--cr-ink); }
.cr-kosong-t b { color: var(--cr-maroon); word-break: break-word; }
.cr-kosong-s { margin: 0 0 6px; font-size: 14px; color: var(--cr-slate); }
.cr-kosong-s em { font-style: normal; font-weight: 600; color: var(--cr-ink); }
.cr-maksud { margin: 8px 0 14px; font-size: 14.5px; color: var(--cr-slate); }
.cr-kosong-a { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0 0; }
.cr-kosong-a a { padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--cr-maroon); box-shadow: inset 0 0 0 1.5px rgba(105, 19, 27, .35); text-decoration: none; }
.cr-kosong-a a:first-child { color: #fff; background: var(--cr-maroon); box-shadow: none; }
.cr-kosong-a a:hover { color: #fff; background: var(--cr-deep); }

/* ---------- kaki ---------- */
.cr-kaki { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 10px 18px; border-top: 1px solid var(--cr-line); font-size: 12.5px; color: var(--cr-slate); background: var(--cr-bg); }
.cr-kaki kbd { margin-right: 4px; min-width: 22px; padding: 1px 6px; }
.cr-kaki-r { margin-left: auto; }

/* kunci gulir halaman di belakang */
html.cr-kunci { overflow: hidden; }

/* fokus papan ketik terlihat di pemicu header */
.tp-search-open-btn[role="button"] { cursor: pointer; }
.tp-search-open-btn[role="button"]:focus-visible { outline: 2px solid var(--cr-accent, #C74A56); outline-offset: 4px; border-radius: 6px; }

/* ---------- tablet & HP ---------- */
@media (max-width: 767px) {
  .cr { padding: 0; }
  .cr-panel { max-width: none; max-height: none; height: 100%; border-radius: 0; }
  .cr .cr-bar input.cr-input { font-size: 16px; } /* 16px mencegah browser iOS memperbesar layar saat mengetik */
  .cr-esc, .cr-kaki { display: none; }
  .cr-tutup { display: block; }
  .cr-bar { padding: 12px 14px; gap: 10px; }
  .cr-isi { padding: 6px 6px calc(16px + env(safe-area-inset-bottom)); }
  .cr-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 6px; }
  .cr-item { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 11px 10px; }
  .cr-go { display: none; }
  .cr-t { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .cr-app, .cr-chip, .cr-go { transition: none; } }
