/* Project 1 front-end (Part A C1–C3 / Part B C4–C8).
 * Choice cards match GGSA_RTO_Assessments::enqueue_styles() / WHS P2 grey-block H5P look. */

.ggsa-p1 {
	--p1-accent: #177f99;
	--p1-accent-ink: #0f3d50;
	--p1-line: #dcdcdc;
	--p1-ok: #2f7a58;
	--p1-error: #a94a35;
	max-width: 820px;
	margin: 0 auto;
	font-family: "Calibri", sans-serif;
	font-size: 16px;
	line-height: 1.55;
	color: #24303a;
}

.ggsa-p1 * { box-sizing: border-box; }

.ggsa-p1__section {
	border: 1px solid var(--p1-line);
	border-radius: 10px;
	padding: 18px 20px;
	margin: 0 0 18px;
	background: #fff;
}

.ggsa-p1__q {
	font-size: 18px;
	margin: 0 0 12px;
	color: var(--p1-accent-ink);
	line-height: 1.3;
}

.ggsa-p1__label,
.ggsa-p1__rule {
	font-size: 14px;
	margin: 14px 0 8px;
	color: #55616e;
}

.ggsa-p1__rule { margin-top: 0; }

.ggsa-p1__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 16px;
}

@media ( max-width: 600px ) {
	.ggsa-p1__grid { grid-template-columns: 1fr; }
}

.ggsa-p1__choice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 15px;
	background-color: #f1f1f1;
	border: 1px solid var(--p1-line);
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.15s;
}

.ggsa-p1__choice:hover { background-color: #e8e8e8; }

.ggsa-p1__choice input { margin-top: 3px; flex: none; }

.ggsa-p1__choice.is-selected {
	background-color: #dff0f4;
	border-color: var(--p1-accent);
}

.ggsa-p1__choice.is-selected span { font-weight: 600; color: var(--p1-accent-ink); }

.ggsa-p1__choice.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ggsa-p1__select {
	width: 100%;
	max-width: 460px;
	padding: 10px 12px;
	border: 1px solid var(--p1-line);
	border-radius: 8px;
	font-size: 16px;
	background: #fff;
}

.ggsa-p1__fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 18px;
	margin-top: 14px;
}

@media ( max-width: 600px ) {
	.ggsa-p1__fields { grid-template-columns: 1fr; }
}

.ggsa-p1__field { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.ggsa-p1__field label { font-size: 13px; font-weight: 600; color: #55616e; }
.ggsa-p1__field input,
.ggsa-p1__field textarea {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--p1-line);
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
}
.ggsa-p1__field--carry input { background: #f4f6f8; color: #55616e; }

.ggsa-p1__count { font-size: 13px; margin: 10px 0 0; color: #8a94a0; }
.ggsa-p1__count.is-ok { color: var(--p1-ok); font-weight: 600; }
.ggsa-p1__count.is-ok::before { content: "✓ "; }

.ggsa-p1__section--c3 { margin-top: 8px; }

.ggsa-p1__c3-preview,
.ggsa-p1__c3-locked {
	pointer-events: none;
	user-select: none;
	cursor: default;
	max-width: 100%;
	overflow-x: auto;
	margin-top: 10px;
	padding: 12px;
	background: #f9fafb;
	border: 1px solid #d8dee4;
	border-radius: 8px;
}

.ggsa-p1__c3-preview table,
.ggsa-p1__c3-locked table {
	max-width: 100%;
}

.ggsa-p1__preview .ggsa-p1__c3-locked {
	pointer-events: none;
	user-select: none;
}

.ggsa-p1__note {
	margin: 10px 0 0;
	padding: 10px 12px;
	background: #fff7e6;
	border: 1px solid #f0d9a8;
	border-radius: 8px;
	font-size: 14px;
	color: #715417;
}

.ggsa-p1__loading { color: #8a94a0; font-style: italic; }

.ggsa-p1__error {
	margin: 6px 0 14px;
	padding: 10px 12px;
	background: #f8e7e2;
	border: 1px solid #e3b3a7;
	border-radius: 8px;
	color: var(--p1-error);
	font-size: 14px;
}

.ggsa-p1__submit {
	appearance: none;
	border: none;
	background: var(--p1-accent);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: 8px;
	cursor: pointer;
	transition: background .15s, opacity .15s;
}
.ggsa-p1__submit:hover { background: var(--p1-accent-ink); }
.ggsa-p1__submit:disabled { opacity: .5; cursor: default; }
.ggsa-p1__submit--secondary { background: #fff; color: var(--p1-accent-ink); border: 1px solid var(--p1-accent); }
.ggsa-p1__submit--secondary:hover { background: #eef6f9; }

.ggsa-p1__wizard-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: 8px;
}

.ggsa-p1__actions { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.ggsa-p1__actions [hidden] { display: none !important; }

.ggsa-p1__intro { color: #55616e; margin: 0 0 12px; }

.ggsa-p1__preview {
	border: 1px solid var(--p1-line);
	border-radius: 10px;
	padding: 20px 24px;
	background: #fff;
}
.ggsa-p1__preview[contenteditable="true"] {
	outline: 2px solid var(--p1-accent);
	background: #fffef8;
}
.ggsa-p1__preview h4,
.ggsa-p1__preview .ggsa-p1__prompt {
	color: var(--p1-accent-ink);
	margin: 18px 0 8px;
	font-weight: 700;
}
.ggsa-p1__preview h4:first-child,
.ggsa-p1__preview .ggsa-p1__prompt:first-child { margin-top: 0; }
.ggsa-p1__preview h4[contenteditable="false"],
.ggsa-p1__preview .incident-report-form,
.ggsa-p1__preview .incident-report-form * {
	user-select: none;
}
.ggsa-p1__preview[contenteditable="true"] h4,
.ggsa-p1__preview[contenteditable="true"] .ggsa-p1__prompt,
.ggsa-p1__preview[contenteditable="true"] .incident-report-form {
	cursor: default;
}
.ggsa-p1__preview table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.ggsa-p1__preview td { border: 1px solid #ccc; padding: 8px; vertical-align: top; }
/* C3 incident form: 37% label column on Employee / Witness detail tables. */
.ggsa-p1__preview table.c3-detail-table td:first-child:not([colspan]),
.ggsa-p1__preview table[cellpadding="10"] tr:has(> td + td) > td:first-child:not([colspan]) {
	width: 37%;
}
.ggsa-p1__preview table td[width="35%"],
.ggsa-p1__preview table td[width="30%"],
.ggsa-p1__preview table td[width="22%"] {
	width: 37% !important;
}
