/**
 * CookieGate — DPDP Cookie Consent & Data Principal Rights
 * Developed & maintained by: Vijaya Kumar L, Lead Application Engineering, CIEL HR
 * © 2026 CIEL HR. Internal use only — not for sale or redistribution.
 *
 * ckg-forms.css — form-SPECIFIC layout for the rights / grievance / track forms and the
 * contact cards. In v1.1 (A02) the forms render inside a Shadow DOM host where tokens.css
 * + ckg-ui.css already provide the design tokens AND the shared kit (fields, selects,
 * checkboxes, buttons, success panel, cookie table, alerts…). This file therefore only adds
 * the thin layer that is unique to the forms: the .ckg-forms column wrapper, section
 * spacing, the track-request message list and a few fallbacks for a light-DOM render.
 */

.ckg-forms {
	--ckg-fcard-bg: var(--ckg-page-bg, #f4f6fb);
	display: flex;
	flex-direction: column;
	gap: var(--ckg-sp-5, 24px);
	font-size: var(--ckg-fs-16, 16px);
	line-height: var(--ckg-lh, 1.5);
	color: var(--ckg-text, #0a1931);
	max-width: var(--ckg-max-width, 820px);
	margin-inline: auto;
}

.ckg-forms * {
	box-sizing: border-box;
}

.ckg-forms [hidden] {
	display: none !important;
}

/* Numbered step header at the top of a form card (approved board design). */
.ckg-step-head {
	display: flex;
	align-items: center;
	gap: var(--ckg-sp-3, 12px);
}
.ckg-step-num {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 28px;
	block-size: 28px;
	border-radius: 999px;
	background: var(--ckg-primary, #0363fc);
	color: #fff;
	font-size: var(--ckg-fs-13, 13px);
	font-weight: 700;
}
.ckg-step-title {
	margin: 0;
	font-size: var(--ckg-fs-18, 18px);
	font-weight: 700;
	color: var(--ckg-text, #0a1931);
}

/* Cards (rights-info / escalation / DPO) render inline in the page flow. */
.ckg-fcard {
	background: var(--ckg-fcard-bg);
	border: 1px solid var(--ckg-border, #d7dce5);
	border-radius: var(--ckg-radius-card, 16px);
	padding: var(--ckg-sp-5, 24px);
}

.ckg-fcard-title {
	margin: 0 0 var(--ckg-sp-4, 16px);
	font-size: var(--ckg-fs-18, 18px);
	font-weight: 700;
	color: var(--ckg-text, #0a1931);
	line-height: 1.3;
}

/* Breathing room under the card heading: the body paragraphs / escalation tiers would
 * otherwise collapse together (the shared `.ckg-scope p` reset sets margin:0). */
.ckg-scope .ckg-fcard > p {
	margin: 0 0 var(--ckg-sp-3, 12px);
	line-height: 1.55;
}
.ckg-scope .ckg-fcard > p:last-child {
	margin-bottom: 0;
}
.ckg-scope .ckg-fcard .ckg-tier {
	margin: 0 0 var(--ckg-sp-2, 8px);
}

.ckg-contact-col p {
	margin: 0 0 4px;
}

/* Track status pill + messages (unique to the track flow). */
.ckg-status-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--ckg-tint, #e8f0fe);
	color: var(--ckg-primary, #0363fc);
	font-size: var(--ckg-fs-14, 14px);
	font-weight: 600;
}

.ckg-track-messages ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--ckg-sp-3, 12px);
}

.ckg-track-messages li {
	background: var(--ckg-fcard-bg);
	border: 1px solid var(--ckg-border, #d7dce5);
	border-radius: var(--ckg-radius, 8px);
	padding: 10px 12px;
	font-size: var(--ckg-fs-14, 14px);
}

.ckg-track-msg-meta {
	display: block;
	font-size: var(--ckg-fs-12, 12px);
	color: var(--ckg-muted, #5b6475);
	margin-bottom: 4px;
}

/* Withdraw note (shown when "Withdraw consent" request type is chosen). */
.ckg-withdraw-note {
	background: var(--ckg-tint, #e8f0fe);
	border: 1px solid color-mix(in srgb, var(--ckg-primary, #0363fc) 25%, transparent);
	border-radius: var(--ckg-radius, 8px);
	padding: var(--ckg-sp-3, 12px) var(--ckg-sp-4, 16px);
	font-size: var(--ckg-fs-14, 14px);
}

.ckg-withdraw-note p {
	margin: 0;
}

@media (max-width: 640px) {
	.ckg-fcard {
		padding: var(--ckg-sp-4, 16px);
	}
}

/* ===== 8px spacing system (item 14) — .ckg-scope beats the h1-h4 / p margin reset ===== */
.ckg-scope .ckg-fcard-title { margin: 0 0 16px; }          /* card heading -> content */
.ckg-scope .ckg-step-head { margin-bottom: 16px; }          /* step num+title row -> fields */
.ckg-scope .ckg-step-title { margin: 0; }
.ckg-scope .ckg-field-help { margin: 2px 0 0; }             /* field -> help text */
.ckg-scope .ckg-field-error:not(:empty) { margin: 4px 0 0; }
.ckg-scope .ckg-contact-col p { margin: 0 0 6px; }
.ckg-scope .ckg-success-title { margin: 0 0 8px; }
.ckg-scope .ckg-declare { margin-top: 16px; }               /* consent box spacing */
