/*
 * LMS3 PDF slideshow (EXT:lms3pdfslides): a bar on top (menu and title, fullscreen in the middle, back and
 * forward on the right), the PDF pages on a white stage that they fill as far as their shape allows, a bar
 * below (progress line, back and forward on the right), and the menu with all slides. One accent colour, set
 * by the package (--slides-accent).
 */
:root {
  --slides-accent: #1f2937;
  --slides-text: #1f2937;
  --slides-muted: #5b6573;
  --slides-line: #dfe3e8;
  --slides-hover: #f1f3f5;
  --slides-bar: 48px;
}
html,
body,
.reveal-viewport {
  height: 100%;
  margin: 0;
  background: #ffffff;
}
[hidden] {
  display: none !important;
}
.slides-app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  color: var(--slides-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.35;
}

/* bars */
.slides-bar {
  position: relative;
  z-index: 2;
  flex: 0 0 var(--slides-bar);
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 0 8px;
  background: #ffffff;
}
/* on top: menu and title, fullscreen exactly in the middle, back and forward on the right */
.slides-bar--top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  border-bottom: 1px solid var(--slides-line);
}
.slides-bar__start {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.slides-bar__center {
  display: flex;
  min-width: 40px;
}
.slides-bar--bottom {
  justify-content: flex-end;
  border-top: 1px solid var(--slides-line);
}
/* back, position, forward: on the right of both bars */
.slides-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-self: end;
}
.slides-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.slides-button:hover {
  background: var(--slides-hover);
}
.slides-button:focus-visible,
.slides-menu__item:focus-visible {
  outline: 2px solid var(--slides-accent);
  outline-offset: -2px;
}
.slides-button:disabled {
  opacity: 0.3;
  cursor: default;
  background: transparent;
}
.slides-heading {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.slides-heading__deck {
  font-weight: 600;
}
.slides-heading__slide {
  color: var(--slides-muted);
}
.slides-heading__slide:not(:empty)::before {
  content: "\00B7";
  margin: 0 8px;
}
.slides-position {
  min-width: 76px;
  margin: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
/* how far the learner is, as a line on the edge of the lower bar */
.slides-progress {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--slides-line);
}
.slides-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--slides-accent);
  transition: width 0.2s ease;
}

/* stage: reveal.js fits the slides into it, without a margin */
.slides-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #ffffff;
}
.slides-stage .reveal {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  color: var(--slides-text);
}
.reveal .slides section {
  padding: 0;
  height: 100%;
}
.reveal .slides section img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
  background: #ffffff;
}
/* the page text: for screen readers and search, not shown */
.slide-text,
.slides-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: normal;
}

/* menu */
.slides-backdrop {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(17, 24, 39, 0.4);
}
.slides-menu {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 11;
  display: flex;
  flex-direction: column;
  width: min(340px, 86%);
  background: #ffffff;
  box-shadow: 4px 0 24px rgba(17, 24, 39, 0.18);
  animation: slides-menu-in 0.18s ease-out;
}
@keyframes slides-menu-in {
  from {
    transform: translateX(-24px);
    opacity: 0;
  }
}
.slides-menu__head {
  flex: 0 0 var(--slides-bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--slides-line);
}
.slides-menu__title {
  margin: 0;
  font-weight: 600;
}
.slides-menu__list {
  flex: 1 1 auto;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  list-style: none;
}
.slides-menu__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  padding: 10px 16px 10px 13px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.slides-menu__item--level2 {
  padding-left: 37px;
}
.slides-menu__item--level3 {
  padding-left: 61px;
}
.slides-menu__item:hover {
  background: var(--slides-hover);
}
.slides-menu__item[aria-current="true"] {
  border-left-color: var(--slides-accent);
  background: var(--slides-hover);
  background: color-mix(in srgb, var(--slides-accent) 9%, #ffffff);
  font-weight: 600;
}
/* a ring: not seen yet; filled with a tick: seen */
.slides-menu__mark {
  flex: 0 0 18px;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid #b4bbc5;
  border-radius: 50%;
}
.slides-menu__item.is-visited .slides-menu__mark {
  position: relative;
  border-color: var(--slides-accent);
  background: var(--slides-accent);
}
/* The tick, cut out of a layer in the colour that is seen on the accent colour: white, or dark on a light
   accent colour (--slides-accent-contrast, set by the package) */
.slides-menu__item.is-visited .slides-menu__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--slides-accent-contrast, #ffffff);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.slides-menu__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .slides-heading__slide {
    display: none;
  }
}
/* a phone: the buttons keep their size, the title makes room */
@media (max-width: 480px) {
  .slides-heading {
    display: none;
  }
  .slides-position {
    min-width: 60px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal .slides section {
    transition: none !important;
  }
  .slides-menu {
    animation: none;
  }
  .slides-progress span {
    transition: none;
  }
}
