.lmt-app, .lmt-dashboard {
	--lmt-primary: #AD5207;
	--lmt-secondary: #0a59c2;
	--lmt-green: #1e8e3e;
	--lmt-red: #c0392b;
	--lmt-purple: #7a3fbd;
	--lmt-gray: #6b7280;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #222;
}

.lmt-app {
	max-width: 1200px;
	margin: 0 auto;
	border: 1px solid #e2e6ea;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.lmt-app * , .lmt-dashboard * { box-sizing: border-box; }

.lmt-h, .lmt-app h2, .lmt-app h3 { color: var(--lmt-primary); margin: 0 0 10px; }

.lmt-loading { padding: 60px 20px; text-align: center; color: #777; font-size: 16px; }

/* ---- Locked / login / membership-required state ---- */
.lmt-locked { padding: 50px 30px; text-align: center; }
.lmt-lock-icon { font-size: 40px; margin: 10px 0; }
.lmt-btn {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.15s, filter 0.15s;
}
.lmt-btn-primary { background: var(--lmt-secondary); color: #fff; }
.lmt-btn-primary:hover { filter: brightness(0.88); color: #fff; }
.lmt-btn-secondary { background: var(--lmt-primary); color: #fff; }
.lmt-btn-secondary:hover { filter: brightness(0.88); color: #fff; }

.lmt-locked-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 10px;
}

.lmt-access-note {
	background: #fff7ec;
	border: 1px solid #f1d9b8;
	border-left: 4px solid var(--lmt-primary);
	border-radius: 6px;
	padding: 10px 14px;
	margin-bottom: 16px;
	font-size: 14px;
}

/* ---- Header ---- */
.lmt-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	padding: 14px 20px;
	background: #f8f9fb;
	border-bottom: 2px solid var(--lmt-primary);
}
.lmt-header-title { font-size: 18px; font-weight: 700; color: var(--lmt-primary); }
.lmt-timer {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 15px;
}
.lmt-timer-box {
	background: #1f2937;
	color: #fff;
	padding: 6px 12px;
	border-radius: 5px;
	font-variant-numeric: tabular-nums;
	letter-spacing: 1px;
}
.lmt-timer-box.lmt-timer-warning { background: var(--lmt-red); }

.lmt-language-select {
	padding: 6px 10px;
	border-radius: 5px;
	border: 1px solid #c9ced6;
	background: #fff;
	color: #26292f;
	font-size: 13.5px;
	font-weight: 600;
	max-width: 170px;
}
.lmt-language-switch { margin-right: 4px; }

.lmt-language-picker {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.lmt-language-picker label { font-weight: 700; color: #333; }


/* ---- Full screen exam-mode toggle (top right of header) ---- */
.lmt-fullscreen-controls { display: flex; align-items: center; margin-left: auto; }
.lmt-fs-toggle-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 5px;
	border: 1px solid var(--lmt-primary);
	background: #fff;
	color: var(--lmt-primary);
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}
.lmt-fs-toggle-btn:hover { background: var(--lmt-primary); color: #fff; }

/*
 * Independent scrolling for the question column and the question-number
 * palette while in full screen mode. Without this the header, question
 * column and side palette all scrolled together as one long page, so a
 * long passage-based question pushed the palette (and part of the
 * question itself) out of view with no way to reach it - especially once
 * the browser was zoomed in and the visible viewport got smaller.
 *
 * NOTE: this intentionally does NOT sit behind a min-width media query.
 * Browser page-zoom (Ctrl +/-) shrinks the effective CSS viewport width
 * that media queries see, so a width-based breakpoint would stop applying
 * at exactly the zoom levels this is meant to fix. Instead the two-column
 * layout is forced unconditionally whenever the widget is in full screen,
 * so the palette is always reachable no matter how far the page is zoomed.
 */
.lmt-app:fullscreen, .lmt-dashboard:fullscreen,
.lmt-app:-webkit-full-screen, .lmt-dashboard:-webkit-full-screen,
.lmt-app:-ms-fullscreen, .lmt-dashboard:-ms-fullscreen {
	display: flex;
	flex-direction: column;
	overflow: hidden; /* children below scroll internally instead of the whole app */
}
.lmt-app:fullscreen .lmt-header, .lmt-dashboard:fullscreen .lmt-header,
.lmt-app:-webkit-full-screen .lmt-header, .lmt-dashboard:-webkit-full-screen .lmt-header,
.lmt-app:-ms-fullscreen .lmt-header, .lmt-dashboard:-ms-fullscreen .lmt-header {
	flex: 0 0 auto;
}
.lmt-app:fullscreen .lmt-body, .lmt-dashboard:fullscreen .lmt-body,
.lmt-app:-webkit-full-screen .lmt-body, .lmt-dashboard:-webkit-full-screen .lmt-body,
.lmt-app:-ms-fullscreen .lmt-body, .lmt-dashboard:-ms-fullscreen .lmt-body {
	flex: 1 1 auto;
	flex-wrap: nowrap; /* keep the palette beside the question, never pushed below it, even at high zoom */
	min-height: 0; /* let flex children shrink below content size so they can scroll internally */
	width: 100%;
	overflow: hidden;
}
.lmt-app:fullscreen .lmt-main, .lmt-dashboard:fullscreen .lmt-main,
.lmt-app:-webkit-full-screen .lmt-main, .lmt-dashboard:-webkit-full-screen .lmt-main,
.lmt-app:-ms-fullscreen .lmt-main, .lmt-dashboard:-ms-fullscreen .lmt-main {
	flex: 1 1 auto;
	min-width: 0; /* allow the question column to shrink instead of forcing horizontal overflow at high zoom */
	overflow-y: auto;
	max-height: 100%;
}
.lmt-app:fullscreen .lmt-side, .lmt-dashboard:fullscreen .lmt-side,
.lmt-app:-webkit-full-screen .lmt-side, .lmt-dashboard:-webkit-full-screen .lmt-side,
.lmt-app:-ms-fullscreen .lmt-side, .lmt-dashboard:-ms-fullscreen .lmt-side {
	flex: 0 0 260px;
	overflow-y: auto;
	max-height: 100%;
}

/* Fill the whole screen (no card border/shadow/width cap) once the test
   widget itself enters native full screen. */
.lmt-app:fullscreen, .lmt-dashboard:fullscreen,
.lmt-app:-webkit-full-screen, .lmt-dashboard:-webkit-full-screen,
.lmt-app:-ms-fullscreen, .lmt-dashboard:-ms-fullscreen {
	max-width: none;
	width: 100%;
	height: 100%;
	border-radius: 0;
	box-shadow: none;
	background: #fff;
}

/* ---- Body layout ---- */
.lmt-body { display: flex; flex-wrap: wrap; }
.lmt-main { flex: 1 1 640px; padding: 22px; min-width: 320px; }
.lmt-side { flex: 0 0 320px; background: #f4f6fa; padding: 18px; border-left: 1px solid #e2e6ea; }

@media (max-width: 780px) {
	.lmt-side { flex: 1 1 100%; border-left: none; border-top: 1px solid #e2e6ea; }
}

.lmt-meta-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	font-size: 14px;
	color: #555;
	flex-wrap: wrap;
	gap: 8px;
}
.lmt-marks span { font-weight: 700; padding: 2px 8px; border-radius: 4px; color: #fff; font-size: 12px; margin-right: 4px; }
.lmt-marks .lmt-mark-plus { background: var(--lmt-green); }
.lmt-marks .lmt-mark-minus { background: var(--lmt-red); }

.lmt-q-number-label { font-weight: 700; color: var(--lmt-secondary); }

.lmt-question-text { font-size: 17px; line-height: 1.6; margin: 12px 0 20px; color: #1f2430; }

.lmt-question-image-wrap { margin: 0 0 20px; }
.lmt-question-image {
	display: block;
	max-width: 100%;
	max-height: 420px;
	border: 1px solid #e2e6ea;
	border-radius: 6px;
	background: #fff;
}

.lmt-options { list-style: none; margin: 0; padding: 0; }
.lmt-option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 14px;
	margin-bottom: 10px;
	border: 1px solid #dfe3ea;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.lmt-option:hover { border-color: var(--lmt-secondary); background: #f5f9ff; }
.lmt-option.lmt-option-selected { border-color: var(--lmt-secondary); background: #eef5ff; }
.lmt-option input[type="radio"] { margin-top: 3px; }
.lmt-option-text { font-size: 15.5px; line-height: 1.5; }

/* Results view coloring of options */
.lmt-option.lmt-correct { border-color: var(--lmt-green); background: #eaf7ee; }
.lmt-option.lmt-incorrect-selected { border-color: var(--lmt-red); background: #fdeceb; }
.lmt-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 3px; margin-left: 8px; color: #fff; vertical-align: middle; }
.lmt-tag-correct { background: var(--lmt-green); }
.lmt-tag-your { background: var(--lmt-secondary); }

.lmt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/*
 * Action buttons: each variant gets its own hover treatment (darken via filter)
 * instead of a single shared hover rule. The old shared ".lmt-action-btn:hover"
 * forced a near-white background on every button, which made the white text on
 * the colored Save/Submit/Confirm buttons unreadable. Fixed below.
 */
.lmt-action-btn {
	padding: 10px 18px;
	border-radius: 6px;
	border: 1px solid #c9ced6;
	background: #fff;
	color: #333;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.15s, filter 0.15s, color 0.15s;
}
.lmt-action-btn:hover { background: #eef1f5; border-color: #b7bec9; color: #111; }

.lmt-action-mark { background: #eee6f8; border-color: #d6c3ef; color: var(--lmt-purple); }
.lmt-action-mark:hover { background: #e2d3f6; border-color: #c6a9ec; color: var(--lmt-purple); }

.lmt-action-clear { background: #fdeceb; border-color: #f3c7c2; color: var(--lmt-red); }
.lmt-action-clear:hover { background: #fbdedc; border-color: #eab0a9; color: var(--lmt-red); }

.lmt-action-save { background: var(--lmt-secondary); border-color: var(--lmt-secondary); color: #fff; margin-left: auto; }
.lmt-action-save:hover { filter: brightness(0.88); background: var(--lmt-secondary); color: #fff; }

.lmt-action-submit { background: var(--lmt-primary); border-color: var(--lmt-primary); color: #fff; }
.lmt-action-submit:hover { filter: brightness(0.88); background: var(--lmt-primary); color: #fff; }

.lmt-action-cancel { background: #fff; border-color: #c9ced6; color: #333; }
.lmt-action-cancel:hover { background: #eef1f5; border-color: #b7bec9; color: #111; }

/* ---- Side panel: legend + palette ---- */
.lmt-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-bottom: 18px; font-size: 12.5px; }
.lmt-legend-item { display: flex; align-items: center; gap: 6px; }
.lmt-dot { width: 16px; height: 16px; border-radius: 50%; display: inline-block; flex: none; color: #fff; font-size: 9px; text-align: center; line-height: 16px; }
.lmt-dot-answered { background: var(--lmt-green); }
.lmt-dot-not-answered { background: var(--lmt-red); }
.lmt-dot-not-visited { background: #fff; border: 1px solid #aaa; }
.lmt-dot-marked { background: var(--lmt-purple); }

.lmt-palette-title { font-weight: 700; margin-bottom: 10px; color: var(--lmt-secondary); }
.lmt-palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lmt-palette-btn {
	border: 1px solid #c9ced6;
	background: #fff;
	border-radius: 5px;
	padding: 8px 0;
	font-weight: 700;
	cursor: pointer;
	font-size: 13px;
	color: #333;
	transition: filter 0.15s;
}
.lmt-palette-btn:hover { filter: brightness(0.95); }
.lmt-palette-btn.lmt-p-current { outline: 2px solid var(--lmt-secondary); outline-offset: 1px; }
.lmt-palette-btn.lmt-p-answered { background: var(--lmt-green); border-color: var(--lmt-green); color: #fff; }
.lmt-palette-btn.lmt-p-not-answered { background: var(--lmt-red); border-color: var(--lmt-red); color: #fff; }
.lmt-palette-btn.lmt-p-marked { background: var(--lmt-purple); border-color: var(--lmt-purple); color: #fff; }
.lmt-palette-btn.lmt-p-marked-answered { background: var(--lmt-purple); border-color: var(--lmt-purple); color: #fff; box-shadow: inset 0 0 0 2px var(--lmt-green); }

/* ---- Results summary ---- */
.lmt-result-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	padding: 20px;
	background: #f8f9fb;
}
.lmt-stat-card {
	flex: 1 1 140px;
	background: #fff;
	border: 1px solid #e2e6ea;
	border-radius: 8px;
	padding: 14px 16px;
	text-align: center;
}
.lmt-stat-value { font-size: 24px; font-weight: 800; color: var(--lmt-secondary); }
.lmt-stat-label { font-size: 12.5px; color: #666; margin-top: 4px; }
.lmt-stat-filter { cursor: pointer; transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s; user-select: none; }
.lmt-stat-filter:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.lmt-stat-filter.lmt-stat-active { border-color: var(--lmt-secondary); box-shadow: 0 0 0 2px var(--lmt-secondary) inset; }
.lmt-filter-note { padding: 0 20px 14px; font-size: 13px; color: #666; }
.lmt-filter-note a.lmt-filter-clear { color: var(--lmt-secondary); font-weight: 600; text-decoration: none; margin-left: 4px; }
.lmt-filter-note a.lmt-filter-clear:hover { text-decoration: underline; }

.lmt-solutions { padding: 20px; }
.lmt-solution-block { border: 1px solid #e2e6ea; border-radius: 8px; padding: 18px; margin-bottom: 16px; }
.lmt-solution-status { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 4px; color: #fff; }
.lmt-status-correct { background: var(--lmt-green); }
.lmt-status-wrong { background: var(--lmt-red); }
.lmt-status-skipped { background: var(--lmt-gray); }
.lmt-solution-box { background: #fff7ec; border-left: 4px solid var(--lmt-primary); padding: 10px 14px; margin-top: 12px; font-size: 14.5px; line-height: 1.6; }
.lmt-solution-box strong { color: var(--lmt-primary); }

.lmt-instructions-box { background: #fff7ec; border: 1px solid #f1d9b8; border-radius: 8px; padding: 16px 18px; margin-bottom: 18px; font-size: 14.5px; line-height: 1.6; }

.lmt-modal-overlay {
	position: fixed; inset: 0; background: rgba(0,0,0,0.5);
	display: flex; align-items: center; justify-content: center; z-index: 99999; padding: 20px;
}
.lmt-modal { background: #fff; border-radius: 8px; padding: 26px; max-width: 420px; width: 100%; }
.lmt-modal h3 { margin-top: 0; }
.lmt-modal-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.lmt-modal-summary { margin: 14px 0; font-size: 14px; }
.lmt-modal-summary li { margin-bottom: 4px; }

/*
 * Submit-test confirmation popup buttons (Cancel / Yes, Submit).
 * Forced with higher specificity + !important so the plugin's own primary
 * color always wins, even if the active WordPress theme ships global button
 * styles (white text on white background) that would otherwise make these
 * buttons invisible.
 */
.lmt-modal-actions button.lmt-action-btn.lmt-action-cancel {
	background: #eef1f5 !important;
	border: 1px solid #c9ced6 !important;
	color: #26292f !important;
}
.lmt-modal-actions button.lmt-action-btn.lmt-action-cancel:hover {
	background: #e2e6ec !important;
	color: #111 !important;
}
.lmt-modal-actions button.lmt-action-btn.lmt-action-submit {
	background: var(--lmt-primary) !important;
	border: 1px solid var(--lmt-primary) !important;
	color: #fff !important;
}
.lmt-modal-actions button.lmt-action-btn.lmt-action-submit:hover {
	filter: brightness(0.88);
	background: var(--lmt-primary) !important;
	color: #fff !important;
}

/* ================= Dashboard (subject-wise test listing) ================= */
.lmt-dashboard { max-width: 1200px; margin: 0 auto; }
.lmt-subject-block { margin-bottom: 34px; }
.lmt-subject-title {
	font-size: 20px;
	font-weight: 800;
	color: var(--lmt-primary);
	border-bottom: 2px solid var(--lmt-primary);
	padding-bottom: 8px;
	margin-bottom: 16px;
}
.lmt-test-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}
.lmt-test-card {
	border: 1px solid #e2e6ea;
	border-radius: 8px;
	padding: 16px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.lmt-test-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lmt-test-card-title { font-weight: 700; font-size: 15.5px; color: #1f2430; line-height: 1.4; }
.lmt-badge { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }
.lmt-badge-free { background: var(--lmt-green); }
.lmt-badge-premium { background: var(--lmt-primary); }
.lmt-test-card-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: #666; }
.lmt-test-card .lmt-btn { width: 100%; text-align: center; margin-top: auto; }

.lmt-dashboard-active-wrap { margin-top: 36px; }
