/* PDF Catalog Gate — front-end form */
.pcg {
	--pcg-primary: #1f4e3d;
	--pcg-accent: #c8a45d;
	--pcg-radius: 10px;
	--pcg-text: #1f2328;
	--pcg-muted: #6b7280;
	--pcg-border: #d9dce1;
	--pcg-error: #b42318;
	font-size: 16px;
	line-height: 1.5;
	color: var(--pcg-text);
	margin: 1.5em 0;
}
.pcg *,
.pcg *::before,
.pcg *::after { box-sizing: border-box; }

/* Card */
.pcg--card .pcg-box,
.pcg-modal .pcg-box {
	background: #fff;
	border: 1px solid var(--pcg-border);
	border-top: 4px solid var(--pcg-accent);
	border-radius: var(--pcg-radius);
	padding: 28px;
	box-shadow: 0 8px 30px rgba(17, 24, 39, 0.06);
	max-width: 640px;
}
.pcg--inline .pcg-box { padding: 0; }

.pcg-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.pcg--inline .pcg-head { margin-bottom: 12px; }
.pcg-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: calc(var(--pcg-radius) * 0.8);
	background: color-mix(in srgb, var(--pcg-primary) 10%, #fff);
	color: var(--pcg-primary);
}
.pcg-icon svg { width: 24px; height: 24px; }
.pcg-title { margin: 0 0 4px; font-size: 1.25em; line-height: 1.3; color: var(--pcg-primary); }
.pcg-text { margin: 0; color: var(--pcg-muted); font-size: 0.95em; }

.pcg-label { display: block; font-weight: 600; font-size: 0.9em; margin-bottom: 6px; }
.pcg-inputs { display: flex; gap: 10px; flex-wrap: wrap; }
.pcg-input {
	flex: 1 1 220px;
	min-width: 0;
	height: 48px;
	padding: 0 14px;
	border: 1px solid var(--pcg-border);
	border-radius: var(--pcg-radius);
	font: inherit;
	background: #fff;
	color: inherit;
}
.pcg-input:focus { outline: none; border-color: var(--pcg-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pcg-primary) 18%, transparent); }
.pcg-input[aria-invalid="true"] { border-color: var(--pcg-error); }

.pcg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	padding: 0 22px;
	border: 0;
	border-radius: var(--pcg-radius);
	background: var(--pcg-primary);
	color: var(--pcg-on-primary, #fff) !important;
	font: inherit;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: filter 0.15s, transform 0.05s;
}
.pcg-btn:hover { filter: brightness(1.12); }
.pcg-btn:active { transform: translateY(1px); }
.pcg-btn:focus-visible { outline: 3px solid var(--pcg-accent); outline-offset: 2px; }
.pcg-btn svg { width: 20px; height: 20px; }
.pcg-btn--submit { flex: 0 0 auto; }

.pcg-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: var(--pcg-on-primary, #fff);
	border-radius: 50%;
	animation: pcg-spin 0.8s linear infinite;
}
.pcg-form.is-loading .pcg-spinner { display: inline-block; }
.pcg-form.is-loading .pcg-btn--submit { pointer-events: none; opacity: 0.85; }
@keyframes pcg-spin { to { transform: rotate(360deg); } }

.pcg-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 0.85em; color: var(--pcg-muted); cursor: pointer; }
.pcg-consent input { margin: 3px 0 0; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--pcg-primary); }
.pcg-consent a { color: var(--pcg-primary); text-decoration: underline; }
.pcg-consent.is-invalid { color: var(--pcg-error); }

.pcg-error { min-height: 0; margin-top: 10px; color: var(--pcg-error); font-size: 0.9em; }
.pcg-error:empty { display: none; }

.pcg-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Result */
.pcg-result { text-align: left; }
.pcg-result h4 { margin: 0 0 6px; font-size: 1.15em; color: var(--pcg-primary); }
.pcg-result p { margin: 0 0 14px; color: var(--pcg-muted); }
.pcg-result .pcg-note { margin: 14px 0 0; font-size: 0.9em; }
.pcg-wait { display: flex; align-items: center; gap: 12px; color: var(--pcg-muted); }
.pcg-wait .pcg-spinner { display: inline-block; border-color: color-mix(in srgb, var(--pcg-primary) 20%, transparent); border-top-color: var(--pcg-primary); width: 22px; height: 22px; }

/* Modal */
.pcg-modal { margin: 0; position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pcg-modal[hidden] { display: none; }
.pcg-modal__backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, 0.55); }
.pcg-modal__dialog { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; }
.pcg-modal .pcg-box { max-width: none; }
.pcg-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 1;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: var(--pcg-muted);
	cursor: pointer;
}
body.pcg-modal-open { overflow: hidden; }

@media (max-width: 480px) {
	.pcg--card .pcg-box, .pcg-modal .pcg-box { padding: 20px; }
	.pcg-btn--submit { width: 100%; }
}

/* Product page: "Get the description as PDF" */
.pcg-product { margin: 14px 0; }
.pcg-product-name { margin: 0 0 6px; font-weight: 600; color: var(--pcg-text); }
.pcg-privacy-note { margin: 12px 0 0; font-size: 0.82em; color: var(--pcg-muted); }
.pcg-privacy-note a { color: var(--pcg-primary); text-decoration: underline; }
.pcg-result .pcg-success { margin: 0; font-size: 1em; color: var(--pcg-text); }
/* Secondary look next to "Add to cart": visible, but the purchase button stays the main one. */
.pcg-btn.pcg-btn--product { background: transparent; color: var(--pcg-primary) !important; border: 2px solid var(--pcg-primary); }
.pcg-btn.pcg-btn--product:hover { background: var(--pcg-primary); color: var(--pcg-on-primary, #fff) !important; filter: none; }
