/*
 * LMS3 SCORM Creator: the background colours, hero, cards, accordion, slideshow, flip cards, "guess the answer" and
 * hotspots of a learning module (lib/elements.js). Comes after lib/shell.css and lib/module.css, only in a module that
 * has one of them. The colours are custom properties: an additional style sheet of the installation can change them.
 */
.shell-page {
  /* the orange of LMS3 (#ea7f09) a little darker: white text on it is readable (4.6 : 1, WCAG AA) */
  --module-bg-orange: #b26007;
  --module-bg-orange-text: #ffffff;
  --module-bg-darkgray: #3c3c3c;
  --module-bg-darkgray-text: #ffffff;
  --module-bg-lightblue: #d6eaf8;
  --module-bg-lightblue-text: #000000;
  --module-bg-red: #c8102e;
  --module-bg-red-text: #ffffff;
  --module-radius: 8px;
}

/* --- background colours: a box with the text colour that goes with it ------------------------------------ */
.shell-page .module-bg {
  box-sizing: border-box;
  padding: 1.1em 1.35em;
  border-radius: var(--module-radius);
  background: var(--module-bg);
  color: var(--module-bg-text);
}
.shell-page .module-bg--orange { --module-bg: var(--module-bg-orange); --module-bg-text: var(--module-bg-orange-text); }
.shell-page .module-bg--darkgray { --module-bg: var(--module-bg-darkgray); --module-bg-text: var(--module-bg-darkgray-text); }
.shell-page .module-bg--lightblue { --module-bg: var(--module-bg-lightblue); --module-bg-text: var(--module-bg-lightblue-text); }
.shell-page .module-bg--red { --module-bg: var(--module-bg-red); --module-bg-text: var(--module-bg-red-text); }
.shell-page .module-bg :is(h2, h3, h4, h5, h6, p, li, strong, em, blockquote, figcaption, summary, .module-subheader) {
  color: inherit;
}
.shell-page .module-bg a {
  color: inherit;
  text-decoration: underline;
}
.shell-page .module-bg :focus-visible {
  outline-color: currentColor;
}

/* --- hero: a large image, the text in a box over it ------------------------------------------------------ */
.shell-page .module-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--module-radius);
}
.shell-page .module-hero__image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
  max-height: 520px;
  object-fit: cover;
}
.shell-page .module-hero__box {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  max-width: min(32rem, calc(100% - 3rem));
  padding: 1.1em 1.35em;
  border-radius: var(--module-radius);
}
.shell-page .module-hero__box--dark {
  background: rgba(17, 24, 39, 0.82);
  color: #ffffff;
}
.shell-page .module-hero__box--dark :is(h2, p, li, strong, em) {
  color: inherit;
}
.shell-page .module-hero--noimage .module-hero__box {
  position: static;
  max-width: none;
}
.shell-page .module-hero__header {
  margin: 0 0 0.25em;
  font-size: 1.6em;
  line-height: 1.2;
}
.shell-page .module-hero__subheader {
  margin: 0 0 0.5em;
  font-size: 1.1em;
  opacity: 0.92;
}
.shell-page .module-hero__box > :last-child,
.shell-page .module-hero__text > :last-child {
  margin-bottom: 0;
}
@media (max-width: 640px) {
  /* a phone: the box below the image */
  .shell-page .module-hero__box {
    position: static;
    max-width: none;
    border-radius: 0 0 var(--module-radius) var(--module-radius);
  }
  .shell-page .module-hero__image {
    min-height: 0;
  }
}

/* --- cards ------------------------------------------------------------------------------------------------ */
.shell-page .module-cards__header {
  margin: 0 0 0.6em;
}
.shell-page .module-cards__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shell-page .module-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid var(--shell-line, #dfe3e8);
  border-radius: var(--module-radius);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
.shell-page .module-card::before {
  content: none;
}
.shell-page .module-card.module-bg {
  padding: 0;
  border-color: transparent;
}
.shell-page .module-card__image {
  display: block;
  width: 100%;
  height: 10rem;
  object-fit: cover;
}
.shell-page .module-card__body {
  padding: 14px 16px 16px;
}
.shell-page .module-card__title {
  margin: 0 0 0.35em;
  font-size: 1.05em;
}
.shell-page .module-card__text > :first-child {
  margin-top: 0;
}
.shell-page .module-card__text > :last-child {
  margin-bottom: 0;
}

/* --- accordion ------------------------------------------------------------------------------------------- */
.shell-page .module-accordion__header {
  margin: 0 0 0.6em;
}
.shell-page .module-accordion__item {
  border: 1px solid var(--shell-line, #dfe3e8);
  border-radius: 0;
  background: #ffffff;
}
.shell-page .module-accordion__item + .module-accordion__item {
  border-top: 0;
}
.shell-page .module-accordion__item:first-of-type {
  border-radius: var(--module-radius) var(--module-radius) 0 0;
}
.shell-page .module-accordion__item:last-of-type {
  border-radius: 0 0 var(--module-radius) var(--module-radius);
}
.shell-page .module-accordion__item:only-of-type {
  border-radius: var(--module-radius);
}
.shell-page .module-accordion__summary {
  position: relative;
  min-height: 48px;
  box-sizing: border-box;
  padding: 13px 44px 13px 16px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.shell-page .module-accordion__summary::-webkit-details-marker {
  display: none;
}
.shell-page .module-accordion__summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.shell-page .module-accordion__item[open] > .module-accordion__summary {
  color: var(--shell-accent, #1f2937);
}
.shell-page .module-accordion__item[open] > .module-accordion__summary::after {
  margin-top: -2px;
  transform: rotate(-135deg);
}
.shell-page .module-accordion__summary:hover {
  background: var(--shell-hover, #f1f3f5);
}
.shell-page .module-accordion__summary:focus-visible {
  outline: 2px solid var(--shell-accent, #1f2937);
  outline-offset: -2px;
}
.shell-page .module-accordion__body {
  padding: 0 16px 14px;
}
.shell-page .module-accordion__body > :first-child {
  margin-top: 0;
}
.shell-page .module-accordion__body > :last-child {
  margin-bottom: 0;
}

/* --- slideshow and flip cards: one at a time ------------------------------------------------------------- */
.shell-page .module-slideshow__header,
.shell-page .module-flipcards__header {
  margin: 0 0 0.6em;
}
.shell-page .module-slideshow__slides,
.shell-page .module-flipcards__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.shell-page .module-slideshow__slide,
.shell-page .module-flipcard {
  margin: 0 0 1em;
  padding: 0;
}
.shell-page .module-slideshow__slide::before,
.shell-page .module-flipcard::before {
  content: none;
}
.shell-page .is-ready .module-slideshow__slide,
.shell-page .is-ready .module-flipcard {
  margin: 0;
}
.shell-page .module-slideshow__figure {
  margin: 0;
}
.shell-page .module-slideshow__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 34rem;
  object-fit: contain;
  border-radius: var(--module-radius);
  background: #f4f5f7;
}
.shell-page .module-slideshow__caption {
  padding: 0.6em 0.1em 0;
  color: var(--shell-muted, #5b6573);
}
.shell-page .module-slideshow__title {
  display: block;
  color: var(--shell-text, #1f2937);
}
.shell-page .module-slideshow__text > :first-child {
  margin-top: 0.2em;
}
.shell-page .module-slideshow__text > :last-child {
  margin-bottom: 0;
}
.shell-page .module-slideshow__controls,
.shell-page .module-flipcards__controls {
  display: none;
}
.shell-page .is-ready > .module-slideshow__controls,
.shell-page .is-ready > .module-flipcards__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
}
.shell-page .module-slideshow__prev,
.shell-page .module-slideshow__next,
.shell-page .module-flipcards__prev,
.shell-page .module-flipcards__next {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--shell-line, #dfe3e8);
  border-radius: 50%;
  background: #ffffff;
  color: var(--shell-text, #1f2937);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.shell-page .module-slideshow__prev:hover:not(:disabled),
.shell-page .module-slideshow__next:hover:not(:disabled),
.shell-page .module-flipcards__prev:hover:not(:disabled),
.shell-page .module-flipcards__next:hover:not(:disabled) {
  background: var(--shell-hover, #f1f3f5);
}
.shell-page .module-slideshow__prev:disabled,
.shell-page .module-slideshow__next:disabled,
.shell-page .module-flipcards__prev:disabled,
.shell-page .module-flipcards__next:disabled {
  opacity: 0.35;
  cursor: default;
}
.shell-page .module-slideshow__position,
.shell-page .module-flipcards__position {
  min-width: 5em;
  color: var(--shell-muted, #5b6573);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.shell-page .module-slideshow__dots {
  display: flex;
  flex-basis: 100%;
  justify-content: center;
  gap: 2px;
  order: 3;
}
.shell-page .module-slideshow__dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.shell-page .module-slideshow__dot::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: auto;
  border-radius: 50%;
  background: var(--shell-line, #dfe3e8);
}
.shell-page .module-slideshow__dot[aria-current="true"]::after {
  background: var(--shell-accent, #1f2937);
}

/* a flip card */
.shell-page .module-flipcards__intro {
  margin: 0 0 1em;
}
.shell-page .module-flipcard {
  position: relative;
}
.shell-page .module-flipcard__inner {
  position: relative;
  display: grid;
  min-height: 15rem;
  cursor: pointer;
  perspective: 1200px;
}
.shell-page .module-flipcard__face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 2.2rem 1.5rem 3.6rem;
  border: 1px solid var(--shell-line, #dfe3e8);
  border-radius: var(--module-radius);
  background: #ffffff;
  text-align: center;
  backface-visibility: hidden;
  transition: transform 0.45s ease;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.08);
}
.shell-page .module-flipcard__face--back {
  background: var(--shell-accent, #1f2937);
  color: var(--shell-accent-contrast, #ffffff);
  transform: rotateY(180deg);
}
.shell-page .module-flipcard__face--back :is(h4, p, li, strong, em) {
  color: inherit;
}
.shell-page .module-flipcard.is-flipped .module-flipcard__face--front {
  transform: rotateY(-180deg);
}
.shell-page .module-flipcard.is-flipped .module-flipcard__face--back {
  transform: rotateY(0deg);
}
/* without the script: both sides, one below the other */
.shell-page .module-flipcards:not(.is-ready) .module-flipcard__inner {
  display: block;
  cursor: default;
}
.shell-page .module-flipcards:not(.is-ready) .module-flipcard__face {
  transform: none;
  margin-bottom: 8px;
}
.shell-page .module-flipcards:not(.is-ready) .module-flipcard__turn {
  display: none;
}
.shell-page .module-flipcard__side {
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 0.8em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}
.shell-page .module-flipcard__image {
  display: block;
  max-width: 100%;
  max-height: 11rem;
  width: auto;
  height: auto;
  margin: 0 auto 0.75em;
  border-radius: 4px;
}
.shell-page .module-flipcard__title {
  margin: 0 0 0.35em;
  font-size: 1.25em;
}
.shell-page .module-flipcard__text > :first-child {
  margin-top: 0;
}
.shell-page .module-flipcard__text > :last-child {
  margin-bottom: 0;
}
.shell-page .module-flipcard__turn svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
}
.shell-page .module-flipcard__turn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--shell-line, #dfe3e8);
  border-radius: 18px;
  background: #ffffff;
  color: var(--shell-text, #1f2937);
  font: inherit;
  font-size: 0.9em;
  cursor: pointer;
}
.shell-page .module-flipcard__turn:focus-visible,
.shell-page .module-slideshow__prev:focus-visible,
.shell-page .module-slideshow__next:focus-visible,
.shell-page .module-slideshow__dot:focus-visible,
.shell-page .module-flipcards__prev:focus-visible,
.shell-page .module-flipcards__next:focus-visible {
  outline: 2px solid var(--shell-accent, #1f2937);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .shell-page .module-flipcard__face {
    transition: none;
  }
}

/* --- guess the answer ------------------------------------------------------------------------------------ */
.shell-page .module-reveal__header {
  margin: 0 0 0.5em;
}
.shell-page .module-reveal__question > :first-child {
  margin-top: 0;
}
.shell-page .module-reveal__details {
  margin-top: 0.75em;
}
.shell-page .module-reveal__button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--shell-accent, #1f2937);
  color: var(--shell-accent-contrast, #ffffff);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.shell-page .module-reveal__button::-webkit-details-marker {
  display: none;
}
.shell-page .module-reveal__button::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}
.shell-page .module-reveal__details[open] > .module-reveal__button::before {
  transform: rotate(45deg);
}
.shell-page .module-bg .module-reveal__button {
  background: var(--module-bg-text);
  color: var(--module-bg);
}
.shell-page .module-reveal__button:focus-visible {
  outline: 2px solid var(--shell-accent, #1f2937);
  outline-offset: 2px;
}
.shell-page .module-reveal__answer {
  margin-top: 0.75em;
  padding: 0.9em 1.1em;
  border-left: 4px solid var(--shell-accent, #1f2937);
  border-radius: 0 6px 6px 0;
  background: var(--shell-hover, #f1f3f5);
  color: var(--shell-text, #1f2937);
}
.shell-page .module-reveal__answer :is(p, li, strong, em) {
  color: inherit;
}
.shell-page .module-reveal__answer > :first-child {
  margin-top: 0;
}
.shell-page .module-reveal__answer > :last-child {
  margin-bottom: 0;
}

/* --- hotspots -------------------------------------------------------------------------------------------- */
.shell-page .module-hotspots__header {
  margin: 0 0 0.5em;
}
.shell-page .module-hotspots__intro {
  margin: 0 0 0.75em;
}
.shell-page .module-hotspots__stage {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.shell-page .module-hotspots__image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--module-radius);
}
.shell-page .module-hotspots__spot {
  position: absolute;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--shell-accent, #1f2937);
  color: var(--shell-accent-contrast, #ffffff);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 3px 8px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.shell-page .module-hotspots__spot::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  opacity: 0;
  animation: module-hotspot-pulse 2.4s ease-out infinite;
}
@keyframes module-hotspot-pulse {
  0% { opacity: 0.85; transform: scale(0.7); }
  70%, 100% { opacity: 0; transform: scale(1.25); }
}
.shell-page .module-hotspots__spot:hover {
  transform: translate(-50%, -50%) scale(1.08);
}
.shell-page .module-hotspots__spot:focus-visible {
  outline: 3px solid var(--shell-accent, #1f2937);
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .shell-page .module-hotspots__spot::after {
    animation: none;
  }
}
.shell-page .module-hotspots__dialog {
  box-sizing: border-box;
  width: min(36rem, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.35);
  color: var(--shell-text, #1f2937);
}
.module-hotspots__dialog::backdrop {
  background: rgba(17, 24, 39, 0.55);
}
.shell-page .module-hotspots__content {
  padding: 20px 22px 4px;
}
.shell-page .module-hotspots__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 0.75em;
  font-size: 1.25em;
}
.shell-page .module-hotspots__number {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--shell-accent, #1f2937);
  color: var(--shell-accent-contrast, #ffffff);
  font-size: 0.8em;
}
.shell-page .module-hotspots__figure {
  margin: 0 0 0.75em;
}
.shell-page .module-hotspots__figure img,
.shell-page .module-hotspots__video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.shell-page .module-hotspots__figure figcaption {
  margin-top: 0.4em;
  color: var(--shell-muted, #5b6573);
  font-size: 0.9em;
}
.shell-page .module-hotspots__video,
.shell-page .module-hotspots__audio {
  margin: 0 0 0.75em;
}
.shell-page .module-hotspots__audio {
  display: block;
  width: 100%;
}
.shell-page .module-hotspots__text > :first-child {
  margin-top: 0;
}
.shell-page .module-hotspots__actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px 22px 18px;
}
.shell-page .module-hotspots__close {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--shell-accent, #1f2937);
  color: var(--shell-accent-contrast, #ffffff);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.shell-page .module-hotspots__close:focus-visible {
  outline: 2px solid var(--shell-accent, #1f2937);
  outline-offset: 2px;
}

@media print {
  .shell-page .module-slideshow__controls,
  .shell-page .module-flipcards__controls,
  .shell-page .module-flipcard__turn,
  .shell-page .module-hotspots__spot::after {
    display: none;
  }
  .shell-page .module-slideshow__slide[hidden],
  .shell-page .module-flipcard[hidden] {
    display: block;
  }
}
