/* ==========================================================================
   Reli Academy — lms.css
   Tutor LMS screens (loaded only there, after main.css — inc/enqueue.php): the student dashboard and the
   learning area (lesson) — Tutor 4's standalone "modern" UI — and the Tutor course page (inside our header/footer).
   No Tutor template is overridden: Tutor's UI is driven by CSS custom properties, so we map them to our tokens
   (colours, fonts, radii) and add the few rules its variables don't reach. The exercise card (.c-exercise) is
   printed by reli-core (inc/lesson-exercise.php).
   Mobile-first; breakpoints 640 / 960 / 1280. RTL: logical properties only.
   ========================================================================== */

/* 1. Tutor design tokens → ours
   ========================================================================== */
:root {
	/* Fonts (Tutor falls back to "Inter", which we don't load) */
	--tutor-font-family-body: var(--ff-body);
	--tutor-font-family-heading: var(--ff-head);

	/* Brand scale used by the dashboard / learning area */
	--tutor-brand-100: var(--c-light);
	--tutor-brand-200: var(--c-light);
	--tutor-brand-300: var(--c-light-hover);
	--tutor-brand-400: var(--c-accent);
	--tutor-brand-450: var(--c-accent);
	--tutor-brand-500: var(--c-accent);
	--tutor-brand-600: var(--c-primary);
	--tutor-brand-700: var(--c-primary-hover);
	--tutor-brand-800: var(--c-primary-hover);
	--tutor-brand-900: var(--c-footer);
	--tutor-brand-950: var(--c-footer);

	/* Surfaces, text, lines */
	--tutor-surface-base: var(--c-cream);
	--tutor-surface-l1: var(--c-white);
	--tutor-surface-sidebar-l1: var(--c-white);
	--tutor-text-primary: var(--c-ink);
	--tutor-text-secondary: var(--c-ink);
	--tutor-text-subdued: var(--c-muted);
	--tutor-border-idle: var(--c-line);
	--tutor-border-idle2: var(--c-line);

	/* Tutor course page (legacy front-end stylesheet) */
	--tutor-color-primary: var(--c-primary);
	--tutor-color-primary-hover: var(--c-primary-hover);
	--tutor-body-color: var(--c-ink);
	--tutor-border-color: var(--c-field);
	--tutor-color-gray: var(--c-muted);
}

/* Headings inside Tutor screens use the heading font; body copy keeps our base size */
.tutor-lms :is(h1, h2, h3, h4, .tutor-h1, .tutor-h2, .tutor-h3, .tutor-h4, .tutor-h5),
.tutor-screen-frontend-dashboard :is(h1, h2, h3, h4),
.tutor-learning-area :is(h1, h2, h3, h4) {
	font-family: var(--ff-head);
}

.tutor-lms :focus-visible {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

/* Tutor's primary buttons: our radius and weight (colours come from the brand scale above) */
.tutor-lms .tutor-btn {
	border-radius: var(--r-btn);
	font-family: var(--ff-head);
	font-weight: 500;
}

/* 2. Dashboard
   ========================================================================== */
.tutor-dashboard-sidebar-logo {
	color: var(--c-primary);
	font-family: var(--ff-head);
	font-weight: 700;
	letter-spacing: .08em;
	text-decoration: none;
}

.tutor-student-dashboard-stats > *,
.tutor-student-dashboard-courses .tutor-progress-card,
.tutor-dashboard-page .tutor-card {
	border-radius: var(--r-card);
}

/* 3. Course page (enrolled view)
   ========================================================================== */
.tutor-course-details-page {
	padding-block: clamp(24px, 4vw, 56px);
}

.tutor-course-details-page .tutor-course-details-title {
	color: var(--c-primary);
	font-family: var(--ff-head);
	font-weight: 600;
}

.tutor-course-details-page :is(.tutor-card, .tutor-sidebar-card, .tutor-course-sidebar-card) {
	border-radius: var(--r-card);
}

.tutor-course-details-page .tutor-btn-primary {
	min-height: 48px;
}

/* 4. Lesson — exercise card ("שלחו לי את התרגיל")
   ========================================================================== */
.c-exercise {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 24px;
	padding: clamp(20px, 3vw, 28px);
	border-radius: var(--r-card);
	background: var(--c-light);
}

.c-exercise__title {
	font-size: var(--fs-h3);
	font-weight: 600;
}

.c-exercise__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.c-exercise__text p {
	color: var(--c-muted);
	font-size: var(--fs-small);
}

.c-exercise__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
}

.c-exercise .c-btn {
	min-height: 48px;
	padding-inline: 24px;
	text-decoration: none;
}

.c-exercise .c-btn--primary,
.c-exercise .c-btn--primary:hover {
	color: var(--c-white);
}

.c-exercise__mail {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--c-primary);
	font-size: var(--fs-small);
	font-weight: 500;
	text-underline-offset: 3px;
}

@media (min-width: 960px) {
	.c-exercise {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}
