/* Classroom CPT. The room is fixed colours (a picture, not chrome), so it
   looks the same in both themes. Stimuli switch by attribute with no
   transition: a picture is fully drawn on the frame its onset is timed from. */

.aula-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.aula-rules { margin: 0 0 10px; padding-left: 22px; }
.aula-rules li { margin: 4px 0; }
.aula-note { color: var(--text-soft); font-size: 14.5px; }
.aula-error { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--border); background: var(--surface-2); }

.aula-sounds { margin: 14px 0; }
.aula-sounds-title { font-weight: 700; margin: 0 0 8px; }
.aula-sound-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.aula-sound {
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	padding: 8px 4px; border: 1.5px solid var(--border); border-radius: 10px;
	background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.aula-sound:hover { border-color: var(--accent); }
.aula-sound svg { width: 48px; height: 48px; padding: 6px; border-radius: 8px; background: #2f5d46; }
.aula-sounds .odak-hint { margin-top: 6px; }

.aula-stage { padding: 52px 12px 12px; cursor: pointer; } /* the top strip holds the Pause button */
.aula-room {
	position: relative; width: 100%; max-width: 680px; aspect-ratio: 16 / 10;
	overflow: hidden; border-radius: 10px; background: #efe4cc;
}
.aula-board {
	position: absolute; left: 24%; right: 24%; top: 9%; height: 48%;
	display: flex; align-items: center; justify-content: center;
	background: #2f5d46; border: 6px solid #8b5e3c; border-radius: 4px;
}
.aula-board-stim { width: 42%; aspect-ratio: 1; position: relative; }
.aula-icon { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; }
.aula-board-stim[data-item="bell"] [data-for="bell"],
.aula-board-stim[data-item="drum"] [data-for="drum"],
.aula-board-stim[data-item="bird"] [data-for="bird"],
.aula-board-stim[data-item="horn"] [data-for="horn"] { visibility: visible; }

.aula-window {
	position: absolute; left: 3.5%; top: 12%; width: 15%; height: 34%;
	overflow: hidden; background: #bfe3ff; border: 4px solid #fbfaf6; border-radius: 3px;
}
.aula-car { position: absolute; bottom: 4%; left: -120%; width: 110%; height: auto; visibility: hidden; }
.aula-door { position: absolute; right: 3.5%; top: 7%; width: 13%; height: 64%; background: #3b2b20; perspective: 400px; }
.aula-door-panel { width: 100%; height: 100%; background: #9c6b43; transform-origin: left center; border: 2px solid #7a5131; }
.aula-plane { position: absolute; top: 18%; left: -14%; width: 11%; height: auto; visibility: hidden; }
.aula-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: #d6c19c; }
.aula-desks { position: absolute; left: 6%; right: 6%; bottom: 0; height: 26%; display: flex; justify-content: space-around; align-items: flex-end; }
.aula-pupil { position: relative; width: 18%; height: 100%; }
.aula-pupil::before {
	content: ""; position: absolute; left: 30%; bottom: 46%; width: 40%; aspect-ratio: 1;
	border-radius: 50%; background: #5b3a29; box-shadow: inset 0 -6px 0 #46291c;
}
.aula-pupil::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: #a8774a; border-radius: 4px 4px 0 0; }

/* Distractors: shown while their class is on; they move unless the reader
   asked for reduced motion, in which case they simply appear. */
.aula-room.d-plane .aula-plane { visibility: visible; animation: aula-fly 2.8s linear forwards; }
.aula-room.d-car .aula-car { visibility: visible; animation: aula-drive 2.8s linear forwards; }
.aula-room.d-door .aula-door-panel { animation: aula-door 2.8s ease-in-out forwards; }
.aula-room.d-classmate [data-who="turner"]::before { animation: aula-turn 2.8s ease-in-out forwards; }
@keyframes aula-fly { from { transform: translate(0, 0) rotate(8deg); } to { transform: translate(1150%, 160%) rotate(14deg); } }
@keyframes aula-drive { from { transform: translateX(0); } to { transform: translateX(230%); } }
@keyframes aula-door { 0%, 100% { transform: rotateY(0); } 25%, 75% { transform: rotateY(-62deg); } }
@keyframes aula-turn { 0%, 100% { transform: translate(0, 0); } 20%, 80% { transform: translate(-70%, -25%); } }
@media (prefers-reduced-motion: reduce) {
	.aula-room.d-plane .aula-plane { left: 44%; }
	.aula-room.d-car .aula-car { left: -5%; }
	.aula-room.d-door .aula-door-panel { transform: rotateY(-62deg); }
	.aula-room.d-classmate [data-who="turner"]::before { transform: translate(-70%, -25%); }
}

.aula-msg {
	position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
	width: min(92%, 34em); padding: 10px 14px; border-radius: 10px;
	background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--text);
	box-shadow: 0 1px 4px rgb(0 0 0 / 0.15);
}
.aula-msg[hidden] { display: none; }
.odak-stage[data-odak-state="running"] .aula-msg { display: none; }

.aula-table-wrap { overflow-x: auto; margin-top: 16px; }
.aula-table { border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 100%; }
.aula-table caption { text-align: left; font-weight: 700; font-size: 15.5px; margin-bottom: 6px; }
.aula-table th, .aula-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--border); text-align: right; }
.aula-table th:first-child, .aula-table td:first-child { text-align: left; }
.aula-table thead th { font-weight: 600; color: var(--text-soft); vertical-align: bottom; }

@media (max-width: 480px) {
	.aula-sound svg { width: 40px; height: 40px; }
	.aula-board { left: 21%; right: 21%; }
}
.aula-table tbody th { background: none; font-weight: 600; }

@media (max-width: 520px) {
	.aula-stage { padding: 50px 6px 6px; }
	.aula-room { aspect-ratio: 4 / 3; }
	.aula-board { height: 44%; }
}
