/* templates/pages/tutorial.html — lesson and lesson-map pages on the content shell
   (partials/content-layout.css, pages/content.css): lesson notes, the next-steps
   divider, and Listen passages with their reveals. */

/* Lesson notes carry no label, so the text takes the full box */
.page--tutorial .content-body > blockquote:not(.usage-note) {
  padding-left: 1.1rem;
}

.page--tutorial .tutorial-next {
  margin-top: 3.5rem;
  padding: 1.5rem 0 0;
}

.listen-passage {
  max-width: 42rem;
  margin: 0.5rem 0 1.25rem;
}

.listen-passage:has([data-alphabet-sequence]) {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.65rem;
  margin: 0.35rem 0 0.5rem;
}

.listen-passage:has([data-alphabet-sequence]) .lesson-audio-play {
  margin: 0;
}

.listen-passage:has([data-alphabet-sequence]) .listen-reveal {
  flex: 0 1 auto;
  width: max-content;
  max-width: 100%;
  margin: 0;
}

.listen-passage:has([data-alphabet-sequence]) .listen-reveal__summary {
  padding: 0.45rem 0.85rem;
}

.listen-passage:has([data-alphabet-sequence]) .listen-reveal__summary::after {
  margin-left: 0;
}

.listen-reveal {
  margin: 0.75rem 0;
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.listen-reveal__summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.listen-reveal__summary::-webkit-details-marker {
  display: none;
}

.listen-reveal__summary::before {
  content: "";
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  background-color: currentColor;
  -webkit-mask: var(--image-listen-eye) center / contain no-repeat;
  mask: var(--image-listen-eye) center / contain no-repeat;
}

.listen-reveal__summary::after {
  content: "";
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  translate: 0 -0.1em;
}

.listen-reveal[open] > .listen-reveal__summary::after {
  transform: rotate(-135deg);
  translate: 0 0.15em;
}

.listen-reveal[open] > .listen-reveal__summary {
  margin-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.listen-reveal blockquote {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0 1rem 0.85rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.listen-reveal blockquote p {
  margin: 0;
}

.listen-reveal blockquote p + p {
  margin-top: 0.75rem;
}

/* The translation stays unavailable until the transcription is open. */
.listen-passage:not(:has(.listen-reveal--fr[open])) .listen-reveal--en .listen-reveal__summary {
  color: var(--color-text-disabled);
}

.listen-passage:not(:has(.listen-reveal--fr[open])) .listen-reveal--en > :not(summary) {
  display: none;
}
