/**
 * 全站搜索浮层（页头搜索按钮触发）
 * - .bk-search-toggle  页头搜索按钮
 * - .bk-search-modal   浮层本体（overlay + panel + 输入区 + 提示区 + 快捷键说明）
 */

/* -- 1. 页头搜索按钮 -- */
.header-icons .bk-search-toggle {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	line-height: 0;
	transition: opacity 0.3s ease, color 0.2s ease;
}

.header-icons .bk-search-toggle:hover {
	color: #4a6cf7;
}

/* -- 2. 浮层骨架 -- */
.bk-search-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	overflow-y: auto;
}

.bk-search-modal.is-open {
	display: block;
}

body.bk-search-open {
	overflow: hidden;
}

.bk-search-modal__overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.32);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: bkSearchFade 0.18s ease;
}

.bk-search-modal__panel {
	position: relative;
	z-index: 2;
	width: 92%;
	max-width: 560px;
	margin: 96px auto 48px;
	background: #fff;
	border-radius: 14px;
	padding: 18px 20px 16px;
	box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
	box-sizing: border-box;
	animation: bkSearchPanelIn 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes bkSearchFade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes bkSearchPanelIn {
	from { opacity: 0; transform: translateY(-10px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* -- 3. 顶部标题行 -- */
.bk-search-modal__head {
	display: flex;
	align-items: center;
	gap: 6px;
}

.bk-search-modal__kicker {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: #94a3b8;
	text-transform: uppercase;
}

.bk-search-modal__sep {
	font-size: 12px;
	color: #cbd5e1;
}

.bk-search-modal__title {
	font-size: 13px;
	color: #64748b;
}

.bk-search-modal__close {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: none;
	color: #94a3b8;
	cursor: pointer;
	transition: all 0.18s ease;
}

.bk-search-modal__close:hover {
	background: #f1f5f9;
	color: #475569;
}

/* -- 4. 输入区 -- */
.bk-search-modal__field {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	height: 46px;
	padding: 0 12px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bk-search-modal__field:focus-within {
	border-color: #4a6cf7;
	box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.12);
}

.bk-search-modal__icon {
	flex-shrink: 0;
	color: #94a3b8;
}

.bk-search-modal__input {
	flex: 1;
	min-width: 0;
	height: 100%;
	border: 0;
	outline: none;
	background: transparent;
	font-size: 15px;
	color: #1e293b;
	box-shadow: none;
}

.bk-search-modal__input::placeholder {
	color: #b6c0cd;
}

.bk-search-modal__input::-webkit-search-cancel-button,
.bk-search-modal__input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.bk-search-modal__clear {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f5f9;
	color: #64748b;
	cursor: pointer;
	transition: all 0.18s ease;
}

.bk-search-modal__clear[hidden] {
	display: none;
}

.bk-search-modal__clear:hover {
	background: #e2e8f0;
	color: #334155;
}

/* -- 5. 提示区 -- */
.bk-search-modal__hint {
	margin-top: 12px;
	padding: 20px 16px;
	border: 1px dashed #e2e8f0;
	border-radius: 12px;
	background: #fbfcfe;
	text-align: center;
}

.bk-search-modal__hint-title {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: #64748b;
}

.bk-search-modal__hint-desc {
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.7;
	color: #94a3b8;
}

.bk-search-modal__hot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}

.bk-search-modal__hot-label {
	font-size: 11px;
	letter-spacing: 0.08em;
	color: #c2ccd8;
}

.bk-search-modal__hot-item {
	padding: 4px 12px;
	border: 1px solid #e8edf4;
	border-radius: 999px;
	background: #fff;
	font-size: 12px;
	color: #64748b;
	cursor: pointer;
	transition: all 0.18s ease;
}

.bk-search-modal__hot-item:hover {
	border-color: #c7d2fe;
	background: #f5f7ff;
	color: #4f46e5;
}

/* -- 6. 底部快捷键说明 -- */
.bk-search-modal__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #f1f5f9;
	font-size: 12px;
	color: #94a3b8;
}

.bk-search-modal__keys {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.bk-search-modal__keys kbd {
	font-family: inherit;
	font-size: 11px;
	line-height: 1;
	padding: 3px 6px;
	border: 1px solid #e2e8f0;
	border-bottom-width: 2px;
	border-radius: 5px;
	background: #f8fafc;
	color: #64748b;
}

.bk-search-modal__keys span + kbd {
	margin-left: 6px;
}

.bk-search-modal__submit {
	padding: 7px 16px;
	border: 0;
	border-radius: 8px;
	background: linear-gradient(135deg, #4a6cf7 0%, #6366f1 100%);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 8px rgba(74, 108, 247, 0.28);
}

.bk-search-modal__submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(74, 108, 247, 0.36);
}

@media (max-width: 640px) {
	.bk-search-modal__panel {
		margin-top: 72px;
		padding: 16px 14px 14px;
	}

	.bk-search-modal__hint {
		padding: 16px 12px;
	}
}
