/**
 * Display-only product CTA — "Ordering & Pricing" block.
 * Scoped entirely under .hwp-doc so nothing here can leak into Woodmart,
 * WooCommerce, or any purchasable product's layout.
 *
 * Colours/fonts inherit the WoodMart theme via its CSS variables (with safe
 * fallbacks) so the block reads as part of the site, not a bolt-on.
 */

.hwp-doc {
	--hwp-accent: var(--wd-primary-color, #224079);
	--hwp-accent-2: var(--wd-alternative-color, #236292);
	--hwp-title: var(--wd-title-color, #242424);
	--hwp-text: var(--wd-text-color, #767676);
	--hwp-border: var(--wd-border-color, rgba(0, 0, 0, 0.12));

	margin: 0 0 1.6em;
	padding: 1.35em 1.4em 1.45em;
	border: 1px solid var(--hwp-border);
	border-top: 3px solid var(--hwp-accent);
	border-radius: 6px;
	background: linear-gradient(180deg, rgba(34, 64, 121, 0.035), rgba(34, 64, 121, 0) 60%);
	font-family: var(--wd-text-font, inherit);
}

.hwp-doc__heading {
	margin: 0 0 0.4em;
	font-size: 1.2em;
	line-height: 1.25;
	color: var(--hwp-title);
	font-family: var(--wd-title-font, inherit);
	letter-spacing: 0.01em;
}

.hwp-doc__copy {
	margin: 0 0 0.8em;
	font-size: 0.95em;
	line-height: 1.5;
}

.hwp-doc__contact {
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em 1.4em;
	font-size: 0.95em;
}

.hwp-doc__contact a {
	color: var(--hwp-accent-2);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 500;
}

/* Toggle button — inherits the theme's .button shape, overrides the fill to the
   brand accent. Selector is intentionally specific (.hwp-doc + button.class) so it
   wins over WoodMart's own .button rule without needing !important. */
.hwp-doc button.hwp-doc__toggle {
	display: inline-block;
	width: 100%;
	text-align: center;
	background-color: var(--hwp-accent);
	border-color: var(--hwp-accent);
	color: #fff;
	transition: background-color 0.15s ease, transform 0.05s ease;
}

.hwp-doc button.hwp-doc__toggle:hover,
.hwp-doc button.hwp-doc__toggle:focus {
	background-color: var(--hwp-accent-2);
	border-color: var(--hwp-accent-2);
	color: #fff;
}

.hwp-doc button.hwp-doc__toggle[aria-expanded="true"] {
	background-color: transparent;
	color: var(--hwp-accent);
}

/* Submit button — same accent treatment. */
.hwp-doc button.hwp-doc__submit {
	background-color: var(--hwp-accent);
	border-color: var(--hwp-accent);
	color: #fff;
}

.hwp-doc button.hwp-doc__submit:hover,
.hwp-doc button.hwp-doc__submit:focus {
	background-color: var(--hwp-accent-2);
	border-color: var(--hwp-accent-2);
}

.hwp-doc__toggle:focus-visible,
.hwp-doc__submit:focus-visible,
.hwp-doc :is(input, select, textarea):focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Panel. `hidden` does the hiding, so the form is genuinely inert when closed
   and its fields stay out of the tab order without any JS bookkeeping. */
.hwp-doc__panel[hidden] {
	display: none;
}

.hwp-doc__panel {
	margin-top: 1.1em;
	padding-top: 1.1em;
	border-top: 1px solid var(--hwp-border);
	animation: hwp-doc-in 0.22s ease;
}

@keyframes hwp-doc-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.hwp-doc__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75em 1em;
}

.hwp-doc__field {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

.hwp-doc__field--full {
	margin-top: 0.75em;
}

.hwp-doc__field label {
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.3;
}

.hwp-doc :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
	width: 100%;
	/* 16px minimum prevents iOS from auto-zooming the viewport on focus. */
	font-size: 16px;
	padding: 0.55em 0.65em;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 4px;
	background: #fff;
	color: inherit;
}

.hwp-doc textarea {
	resize: vertical;
	min-height: 4.5em;
}

/* Per-field error, rendered next to the input it belongs to. */
.hwp-doc__error {
	font-size: 0.8em;
	line-height: 1.3;
	color: #a02020;
}

.hwp-doc :is(input, select, textarea)[aria-invalid="true"] {
	border-color: #a02020;
}

.hwp-doc__actions {
	margin: 1em 0 0;
}

.hwp-doc__submit {
	width: 100%;
}

.hwp-doc__status {
	margin: 0.75em 0 0;
	font-size: 0.9em;
	line-height: 1.4;
	/* Reserve nothing when empty — avoids layout shift on first message. */
	min-height: 0;
}

.hwp-doc__status--error {
	color: #a02020;
}

.hwp-doc__status--success {
	color: var(--hwp-title);
	font-weight: 400;
}

/* Elegant confirmation panel shown after a successful submit. */
.hwp-doc__thankyou {
	margin: 0.5em 0 0;
	padding: 1.35em 1.25em;
	border: 1px solid var(--hwp-border);
	border-left: 3px solid var(--hwp-accent);
	border-radius: 6px;
	background: rgba(34, 64, 121, 0.04);
	animation: hwp-doc-in 0.25s ease;
}

.hwp-doc__thankyou-title {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin: 0 0 0.4em;
	font-size: 1.08em;
	font-weight: 600;
	color: var(--hwp-title);
	font-family: var(--wd-title-font, inherit);
}

.hwp-doc__thankyou-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.5em;
	height: 1.5em;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--hwp-accent);
	color: #fff;
	font-size: 0.8em;
	line-height: 1;
}

.hwp-doc__thankyou-body {
	margin: 0;
	font-size: 0.95em;
	line-height: 1.55;
	color: var(--hwp-text);
}

.hwp-doc__noscript {
	margin: 0.75em 0 0;
	font-size: 0.9em;
}

/* Honeypot — hidden from sight and from assistive tech, but still fillable by bots. */
.hwp-doc__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

@media (max-width: 640px) {
	.hwp-doc__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.hwp-doc {
		padding: 1em;
	}

	/* Comfortable touch targets. */
	.hwp-doc__toggle,
	.hwp-doc__submit {
		min-height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hwp-doc * {
		transition: none !important;
		animation: none !important;
	}
}

@media (prefers-color-scheme: dark) {
	.hwp-doc {
		border-color: rgba(255, 255, 255, 0.18);
		background: rgba(255, 255, 255, 0.04);
	}

	.hwp-doc :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
		background: rgba(0, 0, 0, 0.25);
		border-color: rgba(255, 255, 255, 0.28);
	}
}
