/* Study Axis RTA Practice — frontend styles (mobile-first, no frameworks). */

.sa-rta-quiz {
	max-width: 720px;
	margin: 1em auto;
	font-family: inherit;
	color: #1a1a1a;
}

.sa-rta-quiz *,
.sa-rta-quiz *::before,
.sa-rta-quiz *::after {
	box-sizing: border-box;
}

.sa-rta-app {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* Language toggle */
.sa-lang-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.sa-lang-btn {
	flex: 1 1 auto;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #c9c9c9;
	border-radius: 8px;
	background: #f7f7f7;
	font-size: 15px;
	line-height: 1.3;
	cursor: pointer;
}

.sa-lang-btn.active {
	background: #0b6e4f;
	border-color: #0b6e4f;
	color: #fff;
	font-weight: 600;
}

/* Header row: progress + timer */
.sa-qhead {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: #555;
	margin-bottom: 8px;
}

.sa-timer {
	font-weight: 700;
	color: #0b6e4f;
	white-space: nowrap;
}

.sa-timer-low {
	color: #b3261e;
}

.sa-progress {
	height: 8px;
	background: #eee;
	border-radius: 99px;
	overflow: hidden;
	margin-bottom: 16px;
}

.sa-progress-bar {
	height: 100%;
	background: #0b6e4f;
	border-radius: 99px;
	transition: width 0.25s ease;
}

/* Question + options */
.sa-question {
	font-size: 19px;
	font-weight: 600;
	line-height: 1.55;
	margin: 0 0 14px;
}

.sa-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sa-option {
	width: 100%;
	min-height: 52px;
	padding: 12px 14px;
	text-align: left;
	font-size: 16px;
	line-height: 1.5;
	background: #fafafa;
	border: 2px solid #d8d8d8;
	border-radius: 10px;
	cursor: pointer;
}

[dir="rtl"] .sa-option {
	text-align: right;
}

.sa-option:hover:not(:disabled) {
	border-color: #0b6e4f;
}

.sa-option.selected {
	border-color: #0b6e4f;
	background: #e6f4ef;
}

.sa-option.correct {
	border-color: #1e7d32;
	background: #e6f4ea;
}

.sa-option.wrong {
	border-color: #b3261e;
	background: #fdecea;
}

.sa-option:disabled {
	cursor: default;
	opacity: 1;
}

/* Feedback */
.sa-feedback {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 16px;
}

.sa-feedback.good {
	background: #e6f4ea;
	border: 1px solid #1e7d32;
}

.sa-feedback.bad {
	background: #fdecea;
	border: 1px solid #b3261e;
}

.sa-explain {
	margin: 6px 0 0;
	color: #333;
	line-height: 1.6;
}

/* Navigation */
.sa-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
}

.sa-btn {
	min-height: 48px;
	padding: 10px 20px;
	font-size: 16px;
	border: 1px solid #c9c9c9;
	border-radius: 10px;
	background: #f7f7f7;
	cursor: pointer;
}

.sa-btn.primary {
	background: #0b6e4f;
	border-color: #0b6e4f;
	color: #fff;
	font-weight: 600;
}

.sa-answered {
	font-size: 14px;
	color: #555;
	margin-left: auto;
}

/* Result */
.sa-result h3 {
	margin: 18px 0 8px;
	font-size: 18px;
}

.sa-badge {
	display: block;
	text-align: center;
	font-size: 30px;
	font-weight: 800;
	letter-spacing: 1px;
	padding: 14px;
	border-radius: 12px;
	margin-bottom: 10px;
}

.sa-badge.pass {
	background: #e6f4ea;
	color: #1e7d32;
	border: 2px solid #1e7d32;
}

.sa-badge.fail {
	background: #fdecea;
	color: #b3261e;
	border: 2px solid #b3261e;
}

.sa-score-line {
	font-size: 20px;
	font-weight: 700;
	text-align: center;
	margin: 8px 0;
}

.sa-note {
	font-size: 14px;
	color: #666;
}

.sa-breakdown {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.sa-breakdown th,
.sa-breakdown td {
	border: 1px solid #e2e2e2;
	padding: 8px 10px;
	text-align: left;
}

.sa-breakdown th {
	background: #f7f7f7;
}

.sa-review-item {
	border: 1px solid #e2e2e2;
	border-left: 5px solid #c9c9c9;
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 10px;
	font-size: 15px;
	line-height: 1.55;
}

.sa-review-item.ok {
	border-left-color: #1e7d32;
}

.sa-review-item.ko {
	border-left-color: #b3261e;
}

.sa-review-q {
	font-weight: 600;
	margin: 0 0 4px;
}

.sa-review-item p {
	margin: 2px 0;
}

.sa-rta-empty {
	text-align: center;
	color: #666;
	padding: 20px;
	border: 1px dashed #c9c9c9;
	border-radius: 12px;
}

@media (min-width: 600px) {
	.sa-rta-app {
		padding: 24px;
	}

	.sa-question {
		font-size: 21px;
	}
}
/* ============================================================
   Study Axis — site design layer (v1)
   Palette via CSS variables: swap the three brand values in
   :root to re-skin the whole site (Green+Gold / Navy+Yellow /
   Charcoal+Orange). Applied through: plugin CSS (quiz) +
   theme Additional CSS (this file, site-wide parts).
   ============================================================ */

:root {
	/* === PALETTE (change these to re-skin) === */
	--sa-brand: #0b6e4f;        /* primary */
	--sa-brand-dark: #084c36;   /* gradient end / hover */
	--sa-accent: #e9b44c;       /* gold accent */
	--sa-ink: #16302a;          /* headings / dark text */
	--sa-bg: #f4f8f6;           /* page background tint */
	--sa-card: #ffffff;
	--sa-line: #dce8e2;
	--sa-good: #1e7d32;
	--sa-bad: #b3261e;
	--sa-radius: 14px;
}

/* ---------- Site-wide (theme Additional CSS) ---------- */

body {
	background: var(--sa-bg);
}

.wp-site-blocks h1,
.wp-site-blocks h2 {
	color: var(--sa-ink);
	letter-spacing: -0.01em;
}

.wp-site-blocks h2 {
	border-bottom: 3px solid var(--sa-accent);
	padding-bottom: 6px;
}

/* Header bar */
.wp-block-template-part header,
header.wp-block-template-part {
	background: var(--sa-brand);
}

/* Buttons everywhere */
.wp-block-button__link,
.wp-element-button {
	background: var(--sa-brand);
	border-radius: 999px;
	font-weight: 700;
	padding: 12px 26px;
	transition: background 0.2s ease, transform 0.15s ease;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
	background: var(--sa-brand-dark);
	transform: translateY(-1px);
}

/* Tables (lesson content) */
.wp-site-blocks table {
	border-collapse: collapse;
	width: 100%;
	background: var(--sa-card);
	border-radius: var(--sa-radius);
	overflow: hidden;
}

.wp-site-blocks th {
	background: var(--sa-brand);
	color: #fff;
	text-align: left;
}

.wp-site-blocks th,
.wp-site-blocks td {
	padding: 10px 12px;
	border: 1px solid var(--sa-line);
}

/* ---------- Home hero + cards (used in Home page blocks) ---------- */

.sa-hero {
	background: linear-gradient(135deg, var(--sa-brand) 0%, var(--sa-brand-dark) 100%);
	border-radius: 20px;
	color: #fff;
	padding: 44px 28px;
	text-align: center;
}

.sa-hero h1,
.sa-hero h2 {
	color: #fff;
	border: none;
}

.sa-hero .sa-hero-sub {
	font-size: 18px;
	opacity: 0.92;
	max-width: 640px;
	margin: 10px auto 0;
}

.sa-hero-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 18px;
}

.sa-hero-badges span {
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 14px;
	font-weight: 600;
}

.sa-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 16px;
	margin: 22px 0;
}

.sa-card {
	background: var(--sa-card);
	border: 1px solid var(--sa-line);
	border-top: 5px solid var(--sa-accent);
	border-radius: var(--sa-radius);
	padding: 22px 18px;
	text-align: center;
	box-shadow: 0 2px 10px rgba(11, 110, 79, 0.07);
}

.sa-card .sa-card-icon {
	font-size: 34px;
	line-height: 1;
}

.sa-card h3 {
	margin: 10px 0 6px;
	color: var(--sa-ink);
}

.sa-card p {
	margin: 0 0 14px;
	color: #4a5a55;
	font-size: 15px;
}

.sa-card a.sa-card-btn {
	display: inline-block;
	background: var(--sa-brand);
	color: #fff;
	font-weight: 700;
	border-radius: 999px;
	padding: 10px 22px;
	text-decoration: none;
}

.sa-card a.sa-card-btn:hover {
	background: var(--sa-brand-dark);
}

/* ---------- Quiz (mirrors plugin sa-rta.css class names) ---------- */

.sa-rta-app {
	border: 1px solid var(--sa-line);
	border-top: 6px solid var(--sa-brand);
	border-radius: var(--sa-radius);
	box-shadow: 0 6px 24px rgba(11, 110, 79, 0.10);
	padding: 20px;
}

.sa-lang-btn {
	border: 1px solid var(--sa-line);
	border-radius: 999px;
	background: #fff;
	font-weight: 600;
	transition: all 0.15s ease;
}

.sa-lang-btn:hover {
	border-color: var(--sa-brand);
	color: var(--sa-brand);
}

.sa-lang-btn.active {
	background: var(--sa-brand);
	border-color: var(--sa-brand);
	color: #fff;
}

.sa-progress {
	height: 10px;
	background: #e7efec;
}

.sa-progress-bar {
	background: linear-gradient(90deg, var(--sa-brand), var(--sa-accent));
}

.sa-timer {
	color: var(--sa-brand);
}

.sa-timer-low {
	color: var(--sa-bad);
}

.sa-option {
	border: 2px solid var(--sa-line);
	border-radius: 12px;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sa-option:hover:not(:disabled) {
	border-color: var(--sa-brand);
	background: #f2f8f5;
}

.sa-option.selected {
	border-color: var(--sa-brand);
	background: #e6f4ef;
}

.sa-option.correct {
	border-color: var(--sa-good);
	background: #e6f4ea;
}

.sa-option.wrong {
	border-color: var(--sa-bad);
	background: #fdecea;
}

.sa-btn {
	border-radius: 999px;
	font-weight: 600;
}

.sa-btn.primary {
	background: var(--sa-brand);
	border-color: var(--sa-brand);
}

.sa-btn.primary:hover {
	background: var(--sa-brand-dark);
}

.sa-badge.pass {
	border-color: var(--sa-good);
}

.sa-badge.fail {
	border-color: var(--sa-bad);
}

.sa-breakdown th {
	background: var(--sa-brand);
	color: #fff;
}

/* Mobile tightening */
@media (max-width: 600px) {
	.sa-hero {
		padding: 32px 18px;
	}

	.sa-rta-app {
		padding: 16px;
	}
}

/* ---------- Question image (v1.1.0) ---------- */

.sa-qimg {
	text-align: center;
	margin: 4px 0 14px;
}

.sa-qimg img {
	width: 170px;
	height: 170px;
	max-width: 60vw;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--sa-line, #dce8e2);
	border-radius: 12px;
	padding: 10px;
}
header.wp-block-template-part button {
	color: #ffffff;
}

/* Home page: wide layout so the hero and cards use the full width */
body.home .wp-block-post-content.is-layout-constrained > * {
	max-width: 1280px;
}

body.home .wp-block-post-content {
	padding-left: 20px;
	padding-right: 20px;
}

@media (max-width: 600px) {
	body.home .wp-block-post-content {
		padding-left: 12px;
		padding-right: 12px;
	}
}
/* ---------- Design fix v2 (2026-11-09): header contrast + wide home ---------- */

/* Header bar sits on brand green — all its text and links must be light */
header.wp-block-template-part,
.wp-block-template-part header {
	color: #ffffff;
}

header.wp-block-template-part a,
.wp-block-template-part header a,
header.wp-block-template-part .wp-block-site-title a,
header.wp-block-template-part .wp-block-navigation-item__content {
	color: #ffffff;
}

header.wp-block-template-part .wp-block-navigation__responsive-container-open,
header.wp-block-template-part button {
	color: #ffffff;
}

/* Home page: wide layout so the hero and cards use the full width */
body.home .wp-block-post-content.is-layout-constrained > * {
	max-width: 1280px;
}

body.home .wp-block-post-content {
	padding-left: 20px;
	padding-right: 20px;
}

@media (max-width: 600px) {
	body.home .wp-block-post-content {
		padding-left: 12px;
		padding-right: 12px;
	}
}
