/* GASG Quiz Plugin - front-end (learner/Assessor) styles.
   Simple, clean, minimal - inherits the site's base font/colours
   where possible, adds just enough structure to be usable on any
   screen size. */

.gasg {
	font-size: 16px;
	line-height: 1.55;
	max-width: 780px;
	margin: 0 auto;
}

.gasg h2 {
	margin-top: 0;
}

.gasg-back-link {
	margin-bottom: 1em;
}

.gasg-back-link a {
	text-decoration: none;
}

/* Notices */
.gasg-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin: 12px 0 20px;
	border-left: 4px solid;
}

.gasg-notice-info {
	background: #eef4fb;
	border-color: #3b7ec2;
}

.gasg-notice-warning {
	background: #fff8e5;
	border-color: #c99a1e;
}

.gasg-notice-error {
	background: #fbeaea;
	border-color: #c0392b;
}

/* Cards */
.gasg-card {
	background: #fff;
	border: 1px solid #e2e5e8;
	border-radius: 8px;
	padding: 20px 24px;
	margin: 0 0 20px;
}

.gasg-card h3 {
	margin-top: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

/* Badges & status pills */
.gasg-badge {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 2px 8px;
	border-radius: 10px;
}

.gasg-badge-mandatory {
	background: #2e7d6b;
	color: #fff;
}

.gasg-badge-optional {
	background: #eef1f0;
	color: #2e7d6b;
	border: 1px solid #2e7d6b;
}

.gasg-status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 500;
}

.gasg-status-passed,
.gasg-status-available {
	background: #e6f4ea;
	color: #1e7e34;
}

.gasg-status-in_progress {
	background: #eef4fb;
	color: #2b5f92;
}

.gasg-status-exhausted,
.gasg-status-failed {
	background: #fbeaea;
	color: #c0392b;
}

.gasg-status-locked {
	background: #f1f1f1;
	color: #666;
}

/* Progress table (dashboard / results / assessor) */
.gasg-progress-table,
.gasg-history-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}

.gasg-progress-table td,
.gasg-history-table td,
.gasg-history-table th {
	padding: 8px 6px;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: middle;
}

.gasg-stage-name {
	font-weight: 600;
	width: 30%;
}

.gasg-attempts-remaining {
	color: #777;
	font-size: 13px;
	margin-left: 6px;
}

.gasg-score-badge {
	display: inline-block;
	margin-left: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #444;
	background: #f1f1f1;
	border-radius: 10px;
	padding: 1px 8px;
}

.gasg-results-history summary {
	cursor: pointer;
	margin-top: 8px;
	color: #2e7d6b;
	font-weight: 500;
}

/* Buttons */
.gasg-button {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 6px;
	border: none;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	background: #eef1f0;
	color: #1f3b4d;
}

.gasg-button-primary {
	background: #2e7d6b;
	color: #fff;
}

.gasg-button-small {
	padding: 6px 12px;
	font-size: 13px;
}

.gasg-link-quiet {
	color: #777;
	font-size: 13px;
	text-decoration: none;
}

/* Quiz-taking form */
.gasg-attempt-meta {
	color: #555;
}

.gasg-timer {
	position: sticky;
	top: 0;
	background: #fff8e5;
	border: 1px solid #e6c766;
	border-radius: 6px;
	padding: 8px 14px;
	margin-bottom: 16px;
	font-weight: 600;
	z-index: 10;
}

.gasg-timer.gasg-timer-urgent {
	background: #fbeaea;
	border-color: #c0392b;
	color: #c0392b;
}

.gasg-question {
	border: 1px solid #e2e5e8;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 16px;
}

.gasg-question legend {
	font-weight: 600;
	padding: 0;
	white-space: normal;
}

.gasg-question img {
	max-width: 100%;
	height: auto;
	margin: 10px 0;
	border-radius: 4px;
}

.gasg-option {
	display: block;
	padding: 8px 4px;
	cursor: pointer;
}

.gasg-option input {
	margin-right: 8px;
}

.gasg-matching-instructions {
	color: #666;
	font-size: 14px;
}

.gasg-matching-columns {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 12px 24px;
	margin-bottom: 10px;
}

.gasg-matching-column {
	display: flex !important;
	flex-direction: column !important;
	gap: 10px;
	min-width: 0; /* lets long labels wrap instead of forcing the grid track wide */
}

/* Reset first, in case the site's theme applies its own global button
   styling (Elementor and similar page builders often do, with enough
   specificity to override plain class rules) - without this reset the
   chips can fall back to inline, auto-width buttons that just wrap
   onto multiple lines instead of forming two clean columns. */
.gasg-chip {
	all: unset;
	box-sizing: border-box !important;
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 10px 14px;
	border-radius: 8px;
	border: 1px solid #ccc;
	background: #fafafa;
	cursor: pointer;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.4;
	text-align: left;
}

.gasg-chip.gasg-chip-pending {
	border-color: #2e7d6b;
	background: #eaf5f1;
}

.gasg-chip.gasg-chip-paired {
	border-color: #999;
	background: #eee;
	color: #666;
}

.gasg-submit-quiz {
	margin-top: 10px;
}

/* Feedback / review screen */
.gasg-result {
	padding: 16px 20px;
	border-radius: 8px;
	margin-bottom: 20px;
}

.gasg-result-pass {
	background: #e6f4ea;
}

.gasg-result-fail {
	background: #fbeaea;
}

.gasg-result-score {
	font-size: 22px;
	font-weight: 700;
	margin: 0;
}

.gasg-review-item {
	border-left: 4px solid #ccc;
	padding: 10px 16px;
	margin-bottom: 10px;
}

.gasg-review-correct {
	border-color: #1e7e34;
}

.gasg-review-incorrect {
	border-color: #c0392b;
	background: #fffaf9;
}

.gasg-review-partial {
	border-color: #c99a1e;
	background: #fffdf5;
}

.gasg-review-partial .gasg-review-icon {
	color: #a9790a;
}

.gasg-review-partial-label {
	display: inline-block;
	margin-left: 8px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #a9790a;
	background: #fff3cd;
	border: 1px solid #e6c766;
	border-radius: 10px;
	padding: 1px 8px;
}

.gasg-review-unanswered {
	border-color: #999;
	background: #fafafa;
}

.gasg-review-unanswered .gasg-review-icon {
	color: #777;
}

.gasg-review-unanswered-label {
	display: inline-block;
	margin-left: 8px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #555;
	background: #eee;
	border: 1px solid #ccc;
	border-radius: 10px;
	padding: 1px 8px;
}

.gasg-review-unanswered-note {
	color: #666;
	font-style: italic;
	font-size: 14px;
}

.gasg-review-source {
	color: #555;
	font-size: 13px;
	margin-top: 4px;
}

.gasg-review-icon {
	display: inline-block;
	width: 18px;
}

.gasg-review-correct .gasg-review-icon {
	color: #1e7e34;
}

.gasg-review-incorrect .gasg-review-icon {
	color: #c0392b;
}

.gasg-review-explanation {
	color: #555;
	font-size: 14px;
}

/* Responsive - phones/tablets */
@media ( max-width: 600px ) {
	.gasg {
		font-size: 15px;
	}

	.gasg-card {
		padding: 14px 16px;
	}

	.gasg-progress-table td,
	.gasg-history-table td,
	.gasg-history-table th {
		display: block;
		width: 100% !important;
		box-sizing: border-box;
	}

	.gasg-stage-name {
		border-bottom: none;
		padding-bottom: 0;
	}

	.gasg-filter-form {
		flex-direction: column;
		align-items: flex-start;
	}

	.gasg-matching-columns {
		grid-template-columns: 1fr !important;
		gap: 16px;
	}

	.gasg-pills-row {
		grid-template-columns: minmax(56px, 100px) repeat(3, 46px);
	}
}

.gasg-pills-wrap {
	max-width: 100%;
}

.gasg-pills-grid {
	display: inline-flex;
	flex-direction: column;
	gap: 5px;
	background: var(--surface-1, #f6f6f4);
	border-radius: 8px;
	padding: 10px 12px;
}

.gasg-pills-row {
	display: grid;
	grid-template-columns: minmax(70px, 140px) repeat(3, 54px);
	gap: 6px 8px;
	align-items: center;
}

.gasg-pills-header .gasg-pills-col-label {
	font-size: 11px;
	color: #888;
	text-align: center;
}

.gasg-pills-label {
	font-size: 12px;
	color: #555;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gasg-pill {
	display: block;
	text-align: center;
	font-size: 11px;
	font-weight: 500;
	padding: 2px 4px;
	border-radius: 999px;
	line-height: 1.5;
}

.gasg-pill-pass {
	background: #e6f4ea;
	color: #1e7e34;
}

.gasg-pill-fail {
	background: #fbeaea;
	color: #c0392b;
}

.gasg-pill-none {
	background: #fff;
	border: 0.5px solid #ddd;
	color: #999;
}

.gasg-pills-empty {
	font-size: 13px;
	color: #777;
}

/* Printing - results/feedback are on-screen only. .gasg-no-print is
   hidden when a page is sent to a printer (including "Print to PDF");
   .gasg-print-only is hidden on screen and only shown in that case,
   replacing the real content with a plain notice. This is a
   convenience deterrent, not a security measure - anyone can still
   screenshot the screen or disable page styles, so don't rely on this
   to make results genuinely uncopyable. */
.gasg-print-only {
	display: none;
}

@media print {
	.gasg-no-print {
		display: none !important;
	}

	.gasg-print-only {
		display: block !important;
		text-align: center;
		padding: 80px 20px;
		font-size: 18px;
		color: #333;
	}
}
