/* =========================================================
   全站统一询价 / 留言表单（以「联系我们」页表单为准）
   前缀 ybf- 以避免与各模板原有 .q-form 样式冲突
   ========================================================= */

.ybf-form { max-width: 100%; margin: 0 auto; text-align: left; }

.ybf-row { display: flex; gap: 24px; margin-bottom: 22px; }
.ybf-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.ybf-col > label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 8px;
	letter-spacing: .5px;
}
.ybf-col > label em { color: #ef4444; font-style: normal; margin-left: 2px; }

.ybf-input,
.ybf-area {
	width: 100%;
	padding: 13px 16px;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	font-size: 14px;
	color: #0f172a;
	background: #ffffff;
	transition: all .3s cubic-bezier(.4, 0, .2, 1);
	box-sizing: border-box;
	font-family: inherit;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .02);
}
.ybf-input:focus,
.ybf-area:focus {
	outline: none;
	border-color: #1E7BC1;
	box-shadow: 0 0 0 4px rgba(30, 123, 193, .15);
}
.ybf-input::placeholder,
.ybf-area::placeholder { color: #94a3b8; }

.ybf-area { min-height: 110px; resize: vertical; line-height: 1.6; }

.ybf-input[readonly] { background: #f1f5f9; color: #475569; cursor: default; }

/* 验证码 */
.ybf-code-wrap { display: flex; align-items: center; gap: 10px; width: 100%; }
.ybf-code-wrap .ybf-input { flex: 0 0 180px; width: 180px; height: 46px; }
.ybf-code-img-wrap { display: inline-flex; align-items: center; height: 46px; flex: 0 0 auto; }
.ybf-code-img {
	display: block;
	height: 42px !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	object-fit: contain !important;
	transition: border-color .2s ease, transform .2s ease;
}
.ybf-code-img:hover { border-color: #1E7BC1; transform: scale(1.02); }
.ybf-code-tip { margin-top: 6px; color: #94a3b8; font-size: 12px; line-height: 1.5; }

/* 按钮 */
.ybf-row--code { align-items: flex-end; }
.ybf-col--btn { flex: 0 0 auto; display: flex; align-items: flex-end; }
.ybf-btn {
	background: linear-gradient(135deg, #1E7BC1 0%, #1565a0 100%);
	color: #ffffff;
	border: none;
	padding: 14px 36px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: all .3s ease;
	box-shadow: 0 6px 15px rgba(30, 123, 193, .35);
	white-space: nowrap;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ybf-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30, 123, 193, .45); }
.ybf-btn:active { transform: translateY(0); }
.ybf-btn:disabled { background: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }

/* 成功提示 */
.ybf-success {
	display: none;
	text-align: center;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
	color: #065f46;
	padding: 16px;
	border-radius: 10px;
	margin-top: 25px;
	font-weight: 500;
	border: 1px solid #a7f3d0;
	font-size: 15px;
	box-shadow: 0 4px 12px rgba(16, 185, 129, .1);
	animation: ybfFadeInUp .4s ease-out;
}
.ybf-success.is-visible { display: flex; }
.ybf-success-icon { font-size: 20px; }

@keyframes ybfFadeInUp {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* 单列模式（页脚等窄容器） */
.ybf-form--stack .ybf-row { flex-direction: column; gap: 12px; margin-bottom: 12px; }
.ybf-form--stack .ybf-col { width: 100%; }
.ybf-form--stack .ybf-col > label { font-size: 13px; margin-bottom: 6px; }
.ybf-form--stack .ybf-area { min-height: 88px; }
.ybf-form--stack .ybf-btn { width: 100%; }
.ybf-form--stack .ybf-code-wrap .ybf-input { flex: 0 0 128px; width: 128px; }

/* 深色背景容器（页脚）里的标签用浅色 */
.foot-form-column .ybf-col > label { color: #e2e8f0; }
.foot-form-column .ybf-code-tip { color: #94a3b8; }

@media (max-width: 768px) {
	.ybf-row { flex-direction: column; gap: 18px; }
	.ybf-col { width: 100%; }
	.ybf-row--code { flex-direction: column; align-items: stretch; }
	.ybf-col--btn { width: 100%; margin-top: 5px; }
	.ybf-btn { width: 100%; height: 50px; font-size: 16px; }
}

/* =========================================================
   页脚专用：紧凑双列
   页脚列窄，既要保留「公司 / 国家」等全部字段，又不能把页脚撑太高，
   所以压小 label/输入框尺寸，并把短字段两两并排。
   行序：姓名|公司 · 国家|WhatsApp · 邮箱 · 需求 · 验证码 · 提交
   ========================================================= */
.ybf-form--footer .ybf-row { gap: 10px; margin-bottom: 10px; }
.ybf-form--footer .ybf-col > label {
	font-size: 12px;
	margin-bottom: 4px;
	letter-spacing: 0;
	font-weight: 600;
}
.ybf-form--footer .ybf-input,
.ybf-form--footer .ybf-area {
	padding: 8px 11px;
	font-size: 13px;
	border-radius: 6px;
	border-width: 1px;
}
.ybf-form--footer .ybf-area { min-height: 62px; }
.ybf-form--footer .ybf-code-wrap { gap: 8px; }
.ybf-form--footer .ybf-code-wrap .ybf-input { flex: 0 0 108px; width: 108px; height: 36px; }
.ybf-form--footer .ybf-code-img-wrap { height: 36px; }
.ybf-form--footer .ybf-code-img { height: 34px !important; }
.ybf-form--footer .ybf-code-tip { display: none; }
.ybf-form--footer .ybf-btn { height: 42px; font-size: 15px; padding: 0 18px; }
.ybf-form--footer .ybf-success {
	margin-top: 10px;
	padding: 10px 12px;
	font-size: 12px;
	gap: 6px;
}
.ybf-form--footer .ybf-success-icon { font-size: 15px; }

