/*
 * CookieGate — form shell (CLS fix, 2.4.1 item 1).
 * Developed & maintained by: Vijaya Kumar L, Lead Application Engineering, CIEL HR.
 *
 * LIGHT-DOM critical stylesheet for the server-rendered form markup BEFORE ckg-mount.js
 * moves it into its Shadow root. It reproduces only the HEIGHT-DETERMINING box metrics of
 * the final (shadow) form so the first paint reserves the same vertical space the mounted
 * form will occupy — eliminating the Shadow-DOM mount reflow (was CLS ~0.63 on the
 * rights/grievance pages). Colours/fonts are intentionally minimal; this is about layout
 * stability, not final styling (the shadow stylesheets take over on mount). Scoped to
 * `.ckg-host[data-ckg-form-shell]` so it never touches the page or other components.
 */
/* Same self-hosted Inter as the mounted form, so pre-mount text wraps to the same number of
 * lines (the main reason the reserved height matched the mounted height exactly at 1440 but
 * drifted on narrow viewports with a different theme font). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-700.woff2") format("woff2"); }
/* Metric-adjusted fallback (matches tokens.css) so the pre-mount text wraps like Inter. */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Roboto"), local("Segoe UI"), local("Liberation Sans"); ascent-override: 90.44%; descent-override: 22.52%; line-gap-override: 0%; size-adjust: 107.12%; }

.ckg-host[data-ckg-form-shell] {
	--ckg-max-width: 820px;
	display: block;
}
.ckg-host[data-ckg-form-shell] .ckg-forms {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 820px;
	margin-inline: auto;
	font-family: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.ckg-host[data-ckg-form-shell] .ckg-forms * { box-sizing: border-box; }
.ckg-host[data-ckg-form-shell] [hidden] { display: none !important; }

/* Honeypot must not occupy a visible row. */
.ckg-host[data-ckg-form-shell] .ckg-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Hero (blue gradient card) — padding + gaps set its height. */
.ckg-host[data-ckg-form-shell] .ckg-hero {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 32px 24px;
	border-radius: 16px;
	background: linear-gradient(135deg, #0363fc, #024fd0);
	color: #fff;
}
.ckg-host[data-ckg-form-shell] .ckg-hero-head { display: flex; align-items: center; gap: 12px; }
.ckg-host[data-ckg-form-shell] .ckg-hero-ico { width: 38px; height: 38px; flex: 0 0 auto; }
.ckg-host[data-ckg-form-shell] .ckg-hero-title { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.3; }
.ckg-host[data-ckg-form-shell] .ckg-hero-lead { margin: 0; font-size: 14px; line-height: 1.5; max-width: 62ch; }

/* The form card + stacks. */
.ckg-host[data-ckg-form-shell] .ckg-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 24px;
	border: 1px solid #d7dce5;
	border-radius: 16px;
}
.ckg-host[data-ckg-form-shell] .ckg-step-head { display: flex; align-items: center; gap: 12px; margin: 0; }
.ckg-host[data-ckg-form-shell] .ckg-step-num { width: 28px; height: 28px; flex: 0 0 auto; }
.ckg-host[data-ckg-form-shell] .ckg-step-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }

.ckg-host[data-ckg-form-shell] .ckg-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.ckg-host[data-ckg-form-shell] .ckg-field > label,
.ckg-host[data-ckg-form-shell] .ckg-label { font-size: 14px; font-weight: 600; margin: 0; }
.ckg-host[data-ckg-form-shell] .ckg-input,
.ckg-host[data-ckg-form-shell] .ckg-select,
.ckg-host[data-ckg-form-shell] .ckg-textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	font-size: 16px;
	line-height: 1.5;
	border: 1px solid #d7dce5;
	border-radius: 8px;
}
.ckg-host[data-ckg-form-shell] .ckg-textarea { min-height: 104px; resize: vertical; }
.ckg-host[data-ckg-form-shell] .ckg-field-help { font-size: 12px; line-height: 1.4; margin: 0; }
.ckg-host[data-ckg-form-shell] .ckg-field-error:empty { display: none; }
.ckg-host[data-ckg-form-shell] .ckg-field-error { font-size: 13px; }

.ckg-host[data-ckg-form-shell] .ckg-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) {
	.ckg-host[data-ckg-form-shell] .ckg-row { grid-template-columns: 1fr 1fr; }
}

/* Consent box. */
.ckg-host[data-ckg-form-shell] .ckg-declare {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	margin-top: 16px;
	border: 1px solid #0363fc;
	border-radius: 8px;
	background: rgba(3, 99, 252, .06);
}
.ckg-host[data-ckg-form-shell] .ckg-consent-head { display: flex; align-items: flex-start; gap: 8px; }
.ckg-host[data-ckg-form-shell] .ckg-consent-notice { margin: 0; font-size: 14px; line-height: 1.5; }
.ckg-host[data-ckg-form-shell] .ckg-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.45; margin: 0; }
.ckg-host[data-ckg-form-shell] .ckg-check input { width: 20px; height: 20px; flex: 0 0 auto; margin: 1px 0 0; }
.ckg-host[data-ckg-form-shell] .ckg-under18-toggle { align-self: flex-start; margin: -6px 0 0 28px; font-size: 12.5px; font-weight: 400; }
.ckg-host[data-ckg-form-shell] .ckg-under18-msg { margin: 6px 0 0 28px; font-size: 12.5px; }

/* Buttons. */
.ckg-host[data-ckg-form-shell] .ckg-btn { min-height: 44px; padding: 0 24px; font-size: 16px; font-weight: 600; }
.ckg-host[data-ckg-form-shell] .ckg-btn-block { width: 100%; min-height: 48px; }

/* Supporting "info" cards (show_info="1"). */
.ckg-host[data-ckg-form-shell] .ckg-section { display: flex; flex-direction: column; gap: 16px; }
.ckg-host[data-ckg-form-shell] .ckg-section-head { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin: 0; }
.ckg-host[data-ckg-form-shell] .ckg-card,
.ckg-host[data-ckg-form-shell] .ckg-fcard { border: 1px solid #d7dce5; border-radius: 16px; padding: 24px; }
.ckg-host[data-ckg-form-shell] .ckg-fcard > p { margin: 0 0 12px; line-height: 1.55; }
.ckg-host[data-ckg-form-shell] .ckg-rights-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ckg-host[data-ckg-form-shell] .ckg-rights-list li { display: flex; align-items: flex-start; gap: 12px; }
.ckg-host[data-ckg-form-shell] .ckg-contact-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 12px; }
@media (min-width: 768px) {
	.ckg-host[data-ckg-form-shell] .ckg-contact-grid { grid-template-columns: 1fr 1fr; }
}
.ckg-host[data-ckg-form-shell] .ckg-fact-chips,
.ckg-host[data-ckg-form-shell] .ckg-escalation-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.ckg-host[data-ckg-form-shell] .ckg-contact-col p,
.ckg-host[data-ckg-form-shell] .ckg-tier { margin: 0 0 6px; }

/* Narrow-viewport parity with the shadow stylesheets' @media (max-width: 640px) block. */
@media (max-width: 640px) {
	.ckg-host[data-ckg-form-shell] .ckg-input,
	.ckg-host[data-ckg-form-shell] .ckg-select,
	.ckg-host[data-ckg-form-shell] .ckg-textarea { min-height: 48px; }
	.ckg-host[data-ckg-form-shell] .ckg-fcard { padding: 16px; }
}

/* Server-rendered success / notice blocks. */
.ckg-host[data-ckg-form-shell] .ckg-success { padding: 24px; border: 1px solid #cfe8d6; border-radius: 16px; display: flex; flex-direction: column; gap: 12px; }
.ckg-host[data-ckg-form-shell] .ckg-form-summary,
.ckg-host[data-ckg-form-shell] .ckg-minor-block { padding: 12px 16px; border: 1px solid #e7b4b4; border-radius: 8px; font-size: 14px; }

/* Manage Preferences page (2.4.2 CLS fix): mirror the HEIGHT-DETERMINING metrics of
 * ckg-manage.css so the pre-mount markup reserves the mounted height — the Shadow-DOM mount
 * then causes no reflow (was CLS ~0.27). Sections that start `hidden` (preferences/DNS) stay
 * collapsed at first paint, exactly as the no-consent mounted state renders them. The hero
 * reuses the shared .ckg-hero metrics already defined above. */
.ckg-host[data-ckg-form-shell] .ckg-manage,
.ckg-host[data-ckg-form-shell] .ckg-manage * { box-sizing: border-box; }
.ckg-host[data-ckg-form-shell] .ckg-manage-inner { display: flex; flex-direction: column; gap: 24px; max-width: 820px; margin-inline: auto; }
.ckg-host[data-ckg-form-shell] .ckg-manage-head { margin: 0; }
.ckg-host[data-ckg-form-shell] .ckg-manage-title { margin: 0; }
.ckg-host[data-ckg-form-shell] .ckg-mp-card { border: 1px solid #e2e6ed; border-radius: 12px; padding: 24px 28px; }
.ckg-host[data-ckg-form-shell] .ckg-mp-card[hidden] { display: none !important; }
.ckg-host[data-ckg-form-shell] .ckg-mp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.ckg-host[data-ckg-form-shell] .ckg-mp-card-title { display: flex; align-items: center; gap: 12px; font-size: 17.6px; font-weight: 700; line-height: 1.3; margin: 0 0 16px; }
.ckg-host[data-ckg-form-shell] .ckg-mp-num { width: 26px; height: 26px; flex: 0 0 auto; }
.ckg-host[data-ckg-form-shell] .ckg-mp-muted { font-size: 14.4px; line-height: 1.6; margin: 0; }
.ckg-host[data-ckg-form-shell] .ckg-mp-history { display: flex; flex-direction: column; gap: 13.6px; }
.ckg-host[data-ckg-form-shell] .ckg-mp-check-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.ckg-host[data-ckg-form-shell] .ckg-mp-input { flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 9.6px 12.8px; font-size: 14.4px; border: 1px solid #cbd2dd; border-radius: 8px; }
.ckg-host[data-ckg-form-shell] .ckg-mp-check-row .ckg-mp-btn { min-height: 44px; }
.ckg-host[data-ckg-form-shell] .ckg-mp-btn { padding: 9.6px 17.6px; font-size: 14px; font-weight: 700; line-height: 1.4; border: 1.5px solid transparent; border-radius: 8px; }
.ckg-host[data-ckg-form-shell] .ckg-mp-foot-links { margin: 8px 0 0; }
