/*
 * Live 3D lesson models on /editions/educator (assets/js/lesson-models.js).
 * The panel is dark to match the viewer. Text on navy-950 uses #FFFFFF (18.9:1) and
 * --on-dark-muted (12.9:1); the selected outline uses --mint (12.6:1).
 */

.lm {
  --focus: var(--gold);
  background: var(--navy-950);
  color: var(--on-dark);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
@media (min-width: 48rem) { .lm { padding: 1.5rem; } }
/* Phones: the panel runs to the screen edges so the model gets the full width. */
@media (max-width: 40rem) { .lm { margin-inline: -1.25rem; padding: 0.5rem 0.5rem 1rem; border-radius: 0; } }

.lm__stage { position: relative; }
.lm__frame {
  display: block; width: 100%; height: 600px;
  border: 1px solid var(--navy-800); border-radius: 10px;
  background: #070B16;
}
@media (max-width: 40rem) { .lm__frame { height: 480px; } }
.lm__noscript { margin: 0; padding: 1rem; color: var(--on-dark-muted); }

.lm__info {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem 2rem;
  padding: 1.25rem 0.25rem 0.5rem;
}
@media (max-width: 40rem) { .lm__info, .lm__group { padding-inline: 0.5rem; } }
.lm__about { flex: 1 1 28rem; min-width: 0; }
.lm__kind { margin: 0 0 0.4rem; font-size: 1rem; font-weight: 700; color: var(--gold); }
.lm__ask {
  margin: 0 0 0.4rem; padding-left: 1rem; border-left: 3px solid var(--mint);
  font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.45; color: #FFFFFF; max-width: 62ch;
}
.lm__ask[hidden] { display: none; }
.lm__level { margin: 0; font-size: 0.95rem; color: var(--on-dark-muted); }
.lm__full svg { width: 1.15rem; height: 1.15rem; }

.lm__group {
  margin: 1.5rem 0.25rem 0.75rem;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--on-dark-muted);
}
.lm__picker {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
}
.lm__picker > li { margin: 0; }
.lm__pick {
  display: grid; width: 100%; height: 100%; padding: 0 0 0.6rem; gap: 0.15rem; align-content: start;
  border: 2px solid var(--navy-800); border-radius: 12px; background: var(--navy-900);
  color: #FFFFFF; font: inherit; text-align: left; cursor: pointer; overflow: hidden;
}
.lm__pick img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 0.35rem; }
.lm__name { padding-inline: 0.7rem; font-size: 0.98rem; font-weight: 700; line-height: 1.3; }
.lm__meta { padding-inline: 0.7rem; font-size: 0.85rem; color: var(--on-dark-muted); }
.lm__pick:hover { border-color: var(--on-dark-muted); }
.lm__pick[aria-pressed="true"] { border-color: var(--mint); background: var(--navy-800); }
.lm__pick[aria-pressed="true"] .lm__name::after { content: " ✓"; color: var(--mint); }
.lm__pick:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .lm__pick { transition: border-color 0.15s ease, background-color 0.15s ease; }
  .lm__pick img { transition: transform 0.25s ease; }
  .lm__pick:hover img { transform: scale(1.04); }
}
@media (forced-colors: active) {
  .lm__pick[aria-pressed="true"] { outline: 3px solid Highlight; }
}

.lm-steps { margin-top: 2.5rem; margin-bottom: 2rem; }
.lm__more { margin: 1.5rem 0.25rem 0.25rem; }
@media (max-width: 40rem) { .lm__more { padding-inline: 0.5rem; } }
