/**
 * 询盘表单 — 样式
 */

.b2b-inq__grid {
	display: grid;
	gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
	align-items: start;
}

@media (min-width: 1000px) {
	.b2b-inq__grid--split {
		grid-template-columns: 0.85fr 1.15fr;
	}
	.b2b-inq__grid--split .b2b-inq__aside {
		position: sticky;
		top: calc(var(--wp--custom--header--height, 72px) + 2rem);
	}
}

/* --- 左侧联系信息 --- */

.b2b-inq__aside {
	padding-block: 0.5rem;
}

.b2b-inq__aside-title {
	margin: 0 0 1.25rem;
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
}

.b2b-inq__channels {
	margin: 0;
	padding: 0;
	list-style: none;
}

.b2b-inq__channels li {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.875rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.b2b-inq__channels li:first-child {
	padding-top: 0;
}

.b2b-inq__ch-label {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-muted);
}

.b2b-inq__ch-value {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 500;
	color: var(--wp--preset--color--text);
	text-decoration: none;
	word-break: break-word;
}

a.b2b-inq__ch-value:hover {
	color: var(--wp--preset--color--primary);
}

.b2b-inq__aside .b2b-social a {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--text);
}

.b2b-inq__aside .b2b-social a:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* --- 表单卡片 --- */

.b2b-inq__card {
	box-shadow: var(--wp--preset--shadow--card);
	border-color: transparent;
}

.b2b-form__field {
	margin-bottom: 1.25rem;
}

.b2b-form__label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--text);
}

.b2b-form__req {
	color: var(--wp--preset--color--accent);
	font-weight: 700;
}

.b2b-form__input {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md, 12px);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--text);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	transition: border-color var(--wp--custom--transition--fast),
				box-shadow var(--wp--custom--transition--fast);
	/* iOS 聚焦时自动放大，16px 以下会缩放页面 */
	-webkit-appearance: none;
	appearance: none;
}

.b2b-form__input::placeholder {
	color: rgba(91, 107, 132, 0.55);
}

.b2b-form__input:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 3px var(--wp--preset--color--primary-light);
}

.b2b-form__input.is-invalid {
	border-color: #DC2626;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.b2b-form__textarea {
	min-height: 130px;
	resize: vertical;
}

/* 自动填充时不要黄色背景 */
.b2b-form__input:-webkit-autofill,
.b2b-form__input:-webkit-autofill:hover,
.b2b-form__input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--wp--preset--color--text);
	-webkit-box-shadow: 0 0 0 1000px var(--wp--preset--color--white) inset;
	transition: background-color 9999s ease-in-out 0s;
}

/* --- 同意勾选 --- */

.b2b-form__field--consent {
	margin-bottom: 1.5rem;
}

.b2b-form__check {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.6;
	color: var(--wp--preset--color--text-muted);
	cursor: pointer;
}

.b2b-form__check input {
	width: 18px;
	height: 18px;
	margin: 0.15em 0 0;
	flex-shrink: 0;
	accent-color: var(--wp--preset--color--primary);
	cursor: pointer;
}

.b2b-form__check a {
	color: var(--wp--preset--color--primary);
}

/* --- 蜜罐：视觉上完全隐藏，但不 display:none（否则部分机器人会跳过） --- */

.b2b-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/* --- 按钮与消息 --- */

.b2b-form .b2b-btn {
	border: 0;
	font-family: inherit;
	cursor: pointer;
}

.b2b-form .b2b-btn.is-loading {
	opacity: 0.7;
	cursor: wait;
	transform: none;
}

.b2b-form .b2b-btn.is-loading .b2b-btn__icon {
	animation: b2b-spin 900ms linear infinite;
}

@keyframes b2b-spin {
	to { transform: rotate(360deg); }
}

.b2b-form__msg {
	margin: 1rem 0 0;
	padding: 0.85rem 1rem;
	border-radius: var(--wp--custom--radius--md, 12px);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}

.b2b-form__msg.is-success {
	background: rgba(14, 159, 110, 0.1);
	color: #0A7C56;
	border: 1px solid rgba(14, 159, 110, 0.25);
}

.b2b-form__msg.is-error {
	background: rgba(220, 38, 38, 0.08);
	color: #B42318;
	border: 1px solid rgba(220, 38, 38, 0.22);
}

.b2b-form__msg.is-info {
	background: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-dark);
	border: 1px solid var(--wp--preset--color--primary-light);
}

.b2b-form__note {
	margin: 1rem 0 0;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--text-muted);
	text-align: center;
}

.b2b-form__note a {
	color: var(--wp--preset--color--primary);
}
