/* TM Learning — Question Exam taking page (3 panels: Question,
   Case Study, Notepad+Calculator). Builds on tml-quiz.css
   (palette-btn base styles, calculator, notepad, Finish/Submit
   buttons, .tml-quiz-side-panel sizing) — this file adds what's
   specific to Questions. */

.tml-header {
	position: relative;
	padding: 0 20px;
}

.tml-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.tml-quiz-timer {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.tml-case-study-btn {
	font-weight: bold;
}

/* Panel 1 — the palette/prev/next bar merged into this panel's own
   title bar (not a separate panel), per the reference layout. Panel 1
   itself splits the remaining width 50/50 with Panel 2 (Case Study). */
.tml-question-center {
	flex: 1 1 0;
	min-width: 0;
}

.tml-question-nav-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 0 16px;
	overflow-x: auto;
}

.tml-question-nav-bar .tml-quiz-prev,
.tml-question-nav-bar .tml-quiz-next {
	flex: 0 0 auto;
}

.tml-question-palette-nums {
	flex: 0 1 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	overflow-x: auto;
}

.tml-palette-round {
	border-radius: 50%;
	width: 28px;
	height: 28px;
	padding: 0;
	flex: 0 0 auto;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.tml-scenario-heading {
	font-size: 20px;
	font-weight: bold;
	margin: 0 0 14px 0;
}

/* Scenario + Question + answer area */
.tml-question-scenario {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	margin-bottom: 20px;
}

.tml-question-scenario table {
	border-collapse: collapse;
	margin: 12px 0;
}

.tml-question-scenario table td,
.tml-question-scenario table th {
	border: 1px solid var(--tml-border);
	padding: 6px 12px;
}

.tml-question-heading {
	font-size: 18px;
	font-weight: bold;
	margin: 0 0 10px 0;
}

.tml-question-text {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	margin: 0 0 16px 0;
}

.tml-answer-textarea {
	width: 100%;
	min-height: 140px;
	box-sizing: border-box;
	border: 1px solid var(--tml-border);
	border-radius: 4px;
	padding: 10px;
	font-family: inherit;
	font-size: 15px;
	resize: vertical;
}

.tml-answer-table {
	border-collapse: collapse;
	width: 100%;
}

.tml-answer-table td {
	border: 1px solid var(--tml-border);
	padding: 4px;
}

.tml-answer-table-cell {
	width: 100%;
	border: none;
	padding: 6px;
	font-size: 14px;
	box-sizing: border-box;
}

/* Panel 2 — embedded Case Study PDF, with its own small title bar
   (label + expand-to-full-view button) above the frame. Splits the
   remaining width 50/50 with Panel 1 (Question), after the fixed-
   width Notepad+Calculator panel and the page margins are removed. */
.tml-question-pdf-panel {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	padding: 0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.tml-question-pdf-title-bar {
	flex: 0 0 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 12px;
	border-bottom: 1px solid var(--tml-border);
}

.tml-pdf-expand-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--tml-header-bg);
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: none;
	font-size: 15px;
	line-height: 1;
	padding: 0;
}

/* Two independent toggles, each controlled by its own button:
   - Header "Case Study" button: hides the Case Study panel entirely,
     letting Panel 1 fill the space.
   - The Case Study panel's own title-bar button: expands the Case
     Study panel to fill the space, hiding Panel 1 instead.
   Each click clears the other state, so only one is ever active. */
.tml-case-study-hidden .tml-question-pdf-panel {
	display: none;
}

.tml-case-study-hidden .tml-question-center {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
}

.tml-case-study-expanded .tml-question-center {
	display: none;
}

.tml-case-study-expanded .tml-question-pdf-panel {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
}

.tml-question-pdf-frame {
	flex: 1 1 auto;
	width: 100%;
	border: none;
	display: block;
}

@media (max-width: 1100px) {
	.tml-question-pdf-panel {
		display: none;
	}
}

