/**
 * Panel pencarian — pita putih selebar layar di bawah navbar.
 *
 * Acuan tonybianco.com, diukur langsung 7 Sep 2026 di viewport 1440px:
 * input `name="q"` selebar PENUH layar (1440×64px) tepat di bawah navbar,
 * lalu heading "Trending Now" + grid produk (kartu ±268×401).
 *
 * Bentuk pita putihnya sengaja SAMA PERSIS dengan dropdown navbar
 * (collections-menu.css) — dua panel yang membuka dari tempat yang sama
 * harus terasa satu keluarga, bukan dua komponen yang kebetulan
 * berdekatan.
 */

.tk-search-panel {
	position: fixed;
	left: 0;
	right: 0;
	/* top di-set JS (panel-position.js) — tinggi navbar berbeda antar
	   halaman & breakpoint, jadi tidak boleh angka tetap di sini. */
	background: #ffffff;
	color: #000000;
	padding: 24px 20px 32px;
	/* 95 — sama seperti pita dropdown: DI BAWAH navbar (96) supaya menu
	   navbar tidak pernah tertutup panel, tapi di atas konten halaman.
	   Urutan lapisan ini sudah pernah jadi bug ("menunya malah ilang kalo
	   di hover", 4 Sep 2026), jadi angkanya sengaja disamakan. */
	z-index: 95;
	display: none;
	max-height: calc( 100vh - 60px );
	overflow-y: auto;
}

.tk-search-panel.is-open {
	display: block;
}

/* ---------- Backdrop ----------
   Ditambahkan 28 Sep 2026 (permintaan user): begitu ikon search diklik,
   halaman di belakang panel meredup 20% hitam — pola & markup SAMA PERSIS
   dengan `.tk-cart-drawer-backdrop`/`.tk-region-picker-backdrop` (elemen
   `hidden` + class `.is-open` ditoggle JS, lihat search-panel.js). z-index
   94 — SATU angka di bawah panel (95) supaya backdrop tidak pernah
   menutupi pita putihnya sendiri, tapi tetap di atas seluruh konten
   halaman & navbar. */
.tk-search-panel-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.2);
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--tk-duration) var(--tk-ease);
	z-index: 94;
}

.tk-search-panel-backdrop.is-open {
	opacity: 1;
	pointer-events: auto;
}

/* ---------- Baris input ---------- */

.tk-search-panel__form {
	display: flex;
	align-items: center;
	gap: 16px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	padding-bottom: 12px;
}

/* ⚠️ Selector ditulis PANJANG (`.tk-search-panel input.tk-...`), bukan
   cuma nama class-nya. GeneratePress memberi gaya lewat
   `input[type="search"]` — kotak abu-abu + border 1px (terukur 7 Sep 2026:
   background rgb(247,248,249)). Selector satu-class kita spesifisitasnya
   TIDAK cukup untuk menimpanya; pelajaran yang sama persis dengan bug
   Cart/USD 6 Sep 2026. */
.tk-search-panel input.tk-search-panel__input {
	flex: 1 1 auto;
	min-width: 0;
	background: none;
	border: none;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	/* Input pencarian SENGAJA lebih besar dari teks lain (situs ini
	   seluruhnya 14px) — ini satu-satunya tempat pengunjung mengetik, dan
	   di acuan pun tingginya 64px. Ukuran di sini menandakan "silakan
	   ketik", bukan hierarki tipografi. */
	font-size: 22px;
	line-height: 1.3;
}

/* Browser menggambar sendiri tombol "×" di dalam input type=search —
   dibuang supaya tidak ada dua tombol tutup bersebelahan. */
.tk-search-panel__input::-webkit-search-cancel-button {
	display: none;
}

.tk-search-panel input.tk-search-panel__input:focus {
	outline: none; /* Fokusnya sudah jelas: panel ini baru saja membuka penuh selebar layar khusus untuk mengetik. */
}

.tk-search-panel__close {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

/* ⚠️ `background: none` wajib eksplisit di :hover DAN :focus — kuirk
   GeneratePress yang sama seperti tombol tutup cart drawer & region
   picker: mereka mencetak <style> inline `button:hover, button:focus
   { background: … }`, dan warnanya MENEMPEL setelah diklik. */
.tk-search-panel__close:hover,
.tk-search-panel__close:focus {
	background: none;
	opacity: 0.6;
}

/* ---------- Suggestion list (ganti "Trending Now") ----------
   DIROMBAK 28 Sep 2026 (permintaan user, kirim 3 gambar acuan): "Trending
   Now" dibuang total — panel kosong sampai pembeli mengetik, lalu baris
   ringkas (foto kecil + nama + harga) muncul lewat AJAX (search-panel.js
   + endpoint `takkan_search_suggest` di takkan-core). Dipilih baris
   ringkas (bukan kartu foto besar ala PLP) — keputusan user lewat
   AskUserQuestion, supaya lebih banyak hasil muat tanpa scroll panjang. */

.tk-search-panel__results {
	margin-top: 8px;
}

.tk-search-suggest__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tk-search-suggest__item + .tk-search-suggest__item {
	border-top: 1px solid #f2f2f2; /* Warna garis tipis yang sama dipakai di navbar solid & accordion PDP — lihat CLAUDE.md. */
}

.tk-search-suggest__item a {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 0;
	color: inherit;
	text-decoration: none;
}

.tk-search-suggest__item a:hover {
	text-decoration: none; /* Menimpa aturan a:hover global di style.css. */
	opacity: 0.7;
}

.tk-search-suggest__thumb {
	flex: 0 0 auto;
	display: block;
	width: 48px;
	overflow: hidden;
}

.tk-search-suggest__thumb img {
	display: block;
	width: 100%;
	height: auto;
	/* Rasio potret 5:7, sama dengan kartu produk PLP — foto yang sama tidak
	   terlihat beda proporsi di dua tempat. */
	aspect-ratio: 5 / 7;
	object-fit: cover;
}

.tk-search-suggest__info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tk-search-suggest__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tk-search-suggest__price {
	color: rgba(0, 0, 0, 0.6);
}

.tk-search-suggest__viewall {
	display: block;
	margin-top: 16px;
	color: inherit;
	text-decoration: underline;
}

.tk-search-suggest__viewall:hover {
	opacity: 0.7;
}

.tk-search-suggest__empty,
.tk-search-suggest__loading {
	margin: 8px 0 0;
	color: rgba(0, 0, 0, 0.45);
}

@media (max-width: 767px) {
	.tk-search-panel {
		padding: 16px 20px 24px;
	}

	.tk-search-panel input.tk-search-panel__input {
		font-size: 18px;
	}
}
