/* How the rich text lesson notes look for students (and teacher preview).
   Only affects the box with class "lesson-rich" in lesson.php. */

/* the old style used white-space: pre-line for plain text; HTML does not need it */
.lesson-text.lesson-rich {
  white-space: normal;
  overflow-wrap: break-word;
  overflow-x: auto;
}

.lesson-rich > :last-child {
  margin-bottom: 0;
}

.lesson-rich img,
.lesson-rich video,
.lesson-rich iframe {
  max-width: 100%;
}

.lesson-rich img,
.lesson-rich video {
  height: auto;
}

.lesson-rich figure.image {
  display: inline-block;
  margin: 0 0 1rem;
}

.lesson-rich figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: #6c757d;
}

/* tables */
.lesson-rich table {
  border-collapse: collapse;
  max-width: 100%;
  margin-bottom: 1rem;
}

.lesson-rich td,
.lesson-rich th {
  padding: 0.4rem 0.6rem;
}

.lesson-rich table[border="1"] td,
.lesson-rich table[border="1"] th {
  border: 1px solid #adb5bd;
}

.lesson-rich th {
  font-weight: 700;
}

/* quotes and code */
.lesson-rich blockquote {
  border-left: 4px solid #dee2e6;
  margin: 1rem 0;
  padding: 0 1rem;
  color: #6c757d;
}

.lesson-rich pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  overflow: auto;
}

.lesson-rich pre code {
  color: inherit;
}

/* accordion (click to open / close) */
.lesson-rich details {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.lesson-rich summary {
  cursor: pointer;
  font-weight: 600;
}
