/*
 * Inquiry form and mobile action bar.
 *
 * Two rules guide this file:
 *
 * 1. The form must be readable and operable without JavaScript. Layout is plain
 *    CSS grid, the submit button is a real submit button, and native validation
 *    is disabled only where a script provides a better message.
 * 2. The mobile action bar must never cover content. It is fixed to the bottom
 *    on small screens and the page reserves the matching space via padding on
 *    the body, so the last paragraph is always reachable.
 */

/* -------------------------------------------------------------------------
 * Form shell
 * ---------------------------------------------------------------------- */

.hb-inquiry {
	margin-top: clamp(2rem, 5vw, 3.25rem);
	padding-top: clamp(1.5rem, 4vw, 2.5rem);
	border-top: 1px solid #e4e7ea;
}

.hb-inquiry__heading {
	margin-top: 0;
}

.hb-inquiry__form {
	margin-top: 1.25rem;
}

.hb-inquiry__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 1.25rem;
}

@media (min-width: 720px) {
	.hb-inquiry__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.hb-inquiry__field {
	margin: 0 0 1.1rem;
}

.hb-inquiry__field label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: #2b3642;
}

.hb-inquiry__field input[type="text"],
.hb-inquiry__field input[type="email"],
.hb-inquiry__field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.8rem;
	border: 1px solid #d3d9df;
	border-radius: 8px;
	background: #fff;
	font-size: 1rem;
	line-height: 1.5;
	color: #1c2530;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hb-inquiry__field input:focus,
.hb-inquiry__field textarea:focus {
	outline: none;
	border-color: #16202a;
	box-shadow: 0 0 0 3px rgba(22, 32, 42, 0.12);
}

.hb-inquiry__field textarea {
	resize: vertical;
	min-height: 7rem;
}

.hb-inquiry__req {
	margin-left: 0.2rem;
	color: #b32d2e;
}

/* The file input needs its own treatment: it does not accept the text styles. */
.hb-inquiry__field--file input[type="file"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55rem 0.7rem;
	border: 1px dashed #c9d0d8;
	border-radius: 8px;
	background: #fafbfc;
	font-size: 0.9rem;
	color: #3f4a55;
	cursor: pointer;
}

.hb-inquiry__hint {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.78rem;
	line-height: 1.5;
	color: #78828d;
}

/* -------------------------------------------------------------------------
 * Consent
 * ---------------------------------------------------------------------- */

.hb-inquiry__consent {
	margin: 1.25rem 0 0;
	font-size: 0.88rem;
	line-height: 1.6;
	color: #4a5560;
}

.hb-inquiry__consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	cursor: pointer;
}

.hb-inquiry__consent input[type="checkbox"] {
	flex: 0 0 auto;
	width: 1.05rem;
	height: 1.05rem;
	margin-top: 0.15rem;
	accent-color: #16202a;
}

/* -------------------------------------------------------------------------
 * Actions
 * ---------------------------------------------------------------------- */

.hb-inquiry__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.9rem;
	margin: 1.5rem 0 0;
}

.hb-inquiry__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.75rem 1.75rem;
	border: 1px solid #16202a;
	border-radius: 8px;
	background: #16202a;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hb-inquiry__submit:hover {
	background: #26333f;
	border-color: #26333f;
}

.hb-inquiry__submit:focus-visible {
	outline: 2px solid #16202a;
	outline-offset: 2px;
}

.hb-inquiry__submit[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.hb-inquiry__status {
	font-size: 0.85rem;
	color: #78828d;
}

.hb-inquiry__status.is-error {
	color: #b32d2e;
	font-weight: 600;
}

/* Field-level invalid state, applied by the script only. */
.hb-inquiry__field.is-invalid input,
.hb-inquiry__field.is-invalid textarea {
	border-color: #b32d2e;
}

/* -------------------------------------------------------------------------
 * Notices
 * ---------------------------------------------------------------------- */

.hb-inquiry__notice {
	margin: 1.25rem 0 0;
	padding: 0.9rem 1.1rem;
	border-radius: 8px;
	font-size: 0.92rem;
	line-height: 1.6;
	border: 1px solid transparent;
}

.hb-inquiry__notice--ok {
	background: #f0f7f1;
	border-color: #cfe4d4;
	color: #245a32;
}

.hb-inquiry__notice--bad {
	background: #fdf2f2;
	border-color: #f3cfcf;
	color: #8a2020;
}

/* -------------------------------------------------------------------------
 * Honeypot
 *
 * Removed from layout rather than hidden with display:none, because some bots
 * skip display:none fields and would reveal themselves. Kept out of the tab
 * order and out of the accessibility tree by markup.
 * ---------------------------------------------------------------------- */

.hb-inquiry__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* -------------------------------------------------------------------------
 * Direct contact channels
 * ---------------------------------------------------------------------- */

.hb-inquiry__channels {
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid #e9ecef;
}

.hb-inquiry__channels-label {
	margin: 0 0 0.6rem;
	font-size: 0.85rem;
	color: #78828d;
}

.hb-inquiry__channel-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hb-inquiry__channel {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0.55rem 1rem;
	border: 1px solid #dfe3e8;
	border-radius: 999px;
	background: #fff;
	font-size: 0.86rem;
	font-weight: 600;
	color: #2b3642;
	text-decoration: none;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.hb-inquiry__channel:hover {
	border-color: #c9cfd6;
	background: #f8f9fa;
}

.hb-inquiry__channel--whatsapp {
	border-color: #cfe8d4;
	color: #1f6b33;
}

.hb-inquiry__channel--whatsapp:hover {
	background: #f2fbf4;
	border-color: #b8ddc0;
}

/* -------------------------------------------------------------------------
 * Mobile action bar
 *
 * Shown only on the narrow viewports where a buyer is scrolling with a thumb.
 * The body padding below keeps the bar from covering page content.
 * ---------------------------------------------------------------------- */

.hb-mobile-cta {
	display: none;
}

@media (max-width: 899px) {
	.hb-mobile-cta {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: 1fr;
		gap: 0;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		background: #fff;
		border-top: 1px solid #dfe3e8;
		box-shadow: 0 -2px 14px rgba(16, 28, 40, 0.08);
		padding-bottom: env(safe-area-inset-bottom, 0);
	}

	.hb-mobile-cta__item {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 54px;
		font-size: 0.92rem;
		font-weight: 600;
		text-decoration: none;
		color: #16202a;
		background: #fff;
	}

	.hb-mobile-cta__item + .hb-mobile-cta__item {
		border-left: 1px solid #e4e7ea;
	}

	.hb-mobile-cta__item--primary {
		background: #16202a;
		color: #fff;
	}

	.hb-mobile-cta__item--primary:focus-visible,
	.hb-mobile-cta__item:focus-visible {
		outline: 2px solid #16202a;
		outline-offset: -2px;
	}

	/* Reserve the space the bar occupies so nothing is buried. */
	body.hb-has-mobile-cta {
		padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px));
	}
}

/* -------------------------------------------------------------------------
 * Print
 *
 * Buyers routinely print a product page to bring into a sourcing meeting, and
 * the browser "Save as PDF" path is the zero-dependency substitute for a
 * generated datasheet.
 * ---------------------------------------------------------------------- */

@media print {
	.hb-mobile-cta,
	.hb-inquiry__form,
	.hb-inquiry__channels,
	.hb-showcase-block {
		display: none !important;
	}

	.hb-inquiry {
		border-top: 0;
		margin-top: 0;
		padding-top: 0;
	}

	body.hb-has-mobile-cta {
		padding-bottom: 0;
	}
}
/* -------------------------------------------------------------------------
 * Theme override layer
 *
 * Blocksy styles bare button and input elements very aggressively, which
 * repainted the submit button in the theme accent colour and flattened the
 * field padding. These selectors are deliberately one class deeper than the
 * rules above so they win without needing !important.
 * ---------------------------------------------------------------------- */

.hb-inquiry__form .hb-inquiry__submit {
	padding: 0.75rem 1.75rem;
	border: 1px solid #16202a;
	border-radius: 8px;
	background: #16202a;
	background-color: #16202a;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.01em;
	text-decoration: none;
	box-shadow: none;
}

.hb-inquiry__form .hb-inquiry__submit:hover {
	background: #26333f;
	background-color: #26333f;
	border-color: #26333f;
	color: #fff;
}

.hb-inquiry__form .hb-inquiry__submit:focus-visible {
	outline: 2px solid #16202a;
	outline-offset: 2px;
}

.hb-inquiry__form .hb-inquiry__field input[type="text"],
.hb-inquiry__form .hb-inquiry__field input[type="email"],
.hb-inquiry__form .hb-inquiry__field input[type="file"],
.hb-inquiry__form .hb-inquiry__field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.65rem 0.8rem;
	border: 1px solid #d3d9df;
	border-radius: 8px;
	background: #fff;
	background-color: #fff;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: #1c2530;
	box-shadow: none;
}

.hb-inquiry__form .hb-inquiry__field--file input[type="file"] {
	padding: 0.55rem 0.7rem;
	border-style: dashed;
	border-color: #c9d0d8;
	background: #fafbfc;
	background-color: #fafbfc;
	font-size: 0.9rem;
	color: #3f4a55;
	cursor: pointer;
}

.hb-inquiry__form .hb-inquiry__field input:focus,
.hb-inquiry__form .hb-inquiry__field textarea:focus {
	outline: none;
	border-color: #16202a;
	box-shadow: 0 0 0 3px rgba(22, 32, 42, 0.12);
}

.hb-inquiry__form .hb-inquiry__field.is-invalid input,
.hb-inquiry__form .hb-inquiry__field.is-invalid textarea {
	border-color: #b32d2e;
	box-shadow: 0 0 0 3px rgba(179, 45, 46, 0.1);
}

.hb-inquiry__form .hb-inquiry__consent input[type="checkbox"] {
	width: 1.05rem;
	height: 1.05rem;
	min-width: 0;
	margin: 0.15rem 0 0;
	accent-color: #16202a;
}

/* The theme also forces its own label colours and paragraph margins. */
.hb-inquiry__form .hb-inquiry__field > label,
.hb-inquiry__form .hb-inquiry__consent label {
	color: #2b3642;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0;
}

.hb-inquiry__form .hb-inquiry__consent label {
	font-size: 0.88rem;
	font-weight: 400;
	color: #4a5560;
}

.hb-inquiry__form .hb-inquiry__field {
	margin: 0;
	padding: 0;
}

.hb-inquiry__form .hb-inquiry__grid .hb-inquiry__field {
	margin: 0;
}