/* ==========================================================================
   Custom Search — 搜索框新版式
   样式参考：圆角胶囊，左侧浅红输入区（放大镜 + “输入并按回车键搜索”），
             右侧深红“搜索”按钮。桌面与移动端统一兼容。
   作用于：header 展开搜索(.search-expand)、顶部搜索(.wrap-content-top-search)、
           无结果页搜索(404/search.php 的 get_search_form)。
   ========================================================================== */

/* --- 容器：圆角胶囊 --- */
.themeform.searchform {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 520px;
	margin: 0;
	padding: 0;
	border: 1px solid #f3cdd5;
	border-radius: 26px;
	background: #ffe3e9;                 /* 浅红 */
	overflow: hidden;
	box-sizing: border-box;
	box-shadow: 0 2px 10px rgba(217, 37, 52, 0.08);
	transition: border-color .25s ease, box-shadow .25s ease;
}

.themeform.searchform:focus-within {
	border-color: #eaa7b4;
	box-shadow: 0 3px 14px rgba(217, 37, 52, 0.16);
}

/* --- 放大镜图标（Font Awesome） --- */
.themeform.searchform::before {
	content: "\f002";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 15px;
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #d92534;
	z-index: 1;
	pointer-events: none;
}

/* --- 输入区：浅红背景 --- */
.themeform.searchform input.search {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 12px 14px 12px 44px;
	background: #ffe3e9;
	border: 0;
	border-radius: 0;
	color: #5a3a3f;
	font-size: 15px;
	line-height: 20px;
	outline: none;
	box-shadow: none;
	transition: background .2s ease;
}

.themeform.searchform input.search::placeholder {
	color: #b56b78;
	opacity: 1;
}

.themeform.searchform input.search:focus {
	background: #ffe8ee;
	color: #5a3a3f;
	border-color: transparent;
	box-shadow: none;
}

/* --- 搜索按钮：深红 --- */
.themeform.searchform .searchform-submit {
	flex: 0 0 auto;
	margin: 0;
	padding: 0 26px;
	border: 0;
	border-radius: 0 26px 26px 0;        /* 右侧圆角与容器一致 */
	background: #d92534;                 /* 深红 */
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 44px;
	display: inline-block;
	text-align: center;
	cursor: pointer;
	transition: background .2s ease, opacity .2s ease;
}

.themeform.searchform .searchform-submit:hover,
.themeform.searchform .searchform-submit:focus {
	background: #b81f2c;
	color: #fff;
}

.themeform.searchform .searchform-submit:active {
	opacity: .9;
}

/* --- 顶部搜索区域（桌面） --- */
.wrap-content-top-search .themeform.searchform {
	max-width: 480px;
}

/* --- 移动端 header 展开搜索：占满可用宽度 --- */
.search-expand .themeform.searchform {
	max-width: 100%;
}

/* --- 小屏适配 --- */
@media (max-width: 768px) {
	.themeform.searchform {
		max-width: 100%;
	}
	.themeform.searchform input.search {
		padding: 10px 10px 10px 40px;
		font-size: 14px;
	}
	.themeform.searchform::before {
		left: 14px;
		font-size: 14px;
	}
	.themeform.searchform .searchform-submit {
		padding: 0 18px;
		font-size: 14px;
		line-height: 42px;
	}
}

/* --- 移动端不显示顶部搜索框（≤719px 隐藏，与主题原行为一致；
       移动端搜索仍可通过页头放大镜按钮展开） --- */
@media only screen and (max-width: 719px) {
	.wrap-content-top-search,
	.wrap-content-top .searchform {
		display: none;
	}
}
