deckgo-deck {
  --background: white;
  --color: black;
}

/* Content (see also reveal for margin) */

deckgo-deck h1,
deckgo-deck h2,
deckgo-deck h3,
deckgo-deck section,
deckgo-deck ol,
deckgo-deck ul,
deckgo-deck deckgo-reveal-list,
deckgo-deck deckgo-math,
deckgo-deck deckgo-markdown {
  width: 100%;
}

deckgo-deck deckgo-highlight-code {
  width: calc(100% - 32px);
}

deckgo-deck h1,
deckgo-deck h2,
deckgo-deck h3,
deckgo-deck section,
deckgo-deck ol,
deckgo-deck ul,
deckgo-deck deckgo-reveal-list {
  padding: 8px;
}

deckgo-deck h1,
deckgo-deck h2,
deckgo-deck h3,
deckgo-deck section,
deckgo-deck ol,
deckgo-deck ul,
deckgo-deck deckgo-reveal-list,
deckgo-deck deckgo-highlight-code,
deckgo-deck deckgo-math,
deckgo-deck deckgo-markdown,
deckgo-deck deckgo-lazy-img[slot] {
  margin: 8px auto;
  outline: none;
}

deckgo-deck deckgo-lazy-img[slot] {
  overflow: auto;
}

deckgo-deck li:not(:last-of-type) {
  margin: 0 0 4px;
}

/* Slide split */

deckgo-slide-split {
  --slide-split-align: center;
  --slide-split-padding-top: 64px;
  --slide-split-padding-bottom: 64px;

  &[vertical] {
    --slide-split-text-align: center;
  }

  > deckgo-demo {
    width: 100%;
    height: 100%;
  }

  @media screen and (max-width: 1024px) {
    --slide-split-padding-top: 16px;
    --slide-split-padding-bottom: 16px;
  }
}

/* Social */

deckgo-deck deckgo-social {
  display: flex;
}

/* Chart */

deckgo-deck deckgo-slide-chart[area="false"] {
  --deckgo-chart-stroke: var(--color);
}

/* Images */

deckgo-deck deckgo-social deckgo-lazy-img {
  --deckgo-lazy-img-width: 2rem;
  --deckgo-lazy-img-height: auto;
  --deckgo-lazy-img-vertical-align: middle;
  padding: 0 8px 0 0;
}

deckgo-deck deckgo-reveal[img] {
  height: 100%;
  flex: 1;
}

deckgo-deck deckgo-lazy-img {
  width: 100%;
  flex: 1;

  --deckgo-lazy-img-width: auto;
  --deckgo-lazy-img-height: 100%;
  --deckgo-lazy-img-vertical-align: top;
  --deckgo-lazy-img-object-fit: contain;
}

deckgo-deck deckgo-slide-split deckgo-lazy-img[slot] {
  --deckgo-lazy-img-height: auto;
  --deckgo-lazy-img-max-height: 100%;
}

deckgo-deck deckgo-drr deckgo-lazy-img {
  --deckgo-lazy-img-width: 100%;
  --deckgo-lazy-img-object-fit: fill;
}

/* Background */

deckgo-deck > * div[slot="background"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

deckgo-deck:not(.papyrus) > * div[slot="background"] {
  display: flex;
  justify-content: center;
  align-items: center;
}

deckgo-deck [slot="background"] > deckgo-lazy-img {
  min-width: 100%;
  min-height: 100%;
  border: 0;

  --deckgo-lazy-img-min-width: 100%;
}

deckgo-deck:not(.papyrus) [slot="background"] > deckgo-lazy-img {
  display: flex;
  justify-content: center;
  align-items: center;

  --deckgo-lazy-img-height: auto;
  --deckgo-lazy-img-width: 100%;
}

deckgo-deck.papyrus [slot="background"] > deckgo-lazy-img {
  --deckgo-lazy-img-object-fit: cover;
}

deckgo-deck.papyrus deckgo-lazy-img[slot] {
  --deckgo-lazy-img-height: auto;
}

deckgo-deck.papyrus > deckgo-slide-aspect-ratio div[slot="background"] {
  width: var(--slide-width);
  height: calc(var(--slide-width) * 9 / 16);
  top: 50%;
  transform: translate(0, -50%);
}

deckgo-deck > svg[wave] {
  vertical-align: middle;
}

deckgo-deck:not(.papyrus) [slot="background"] {
  > svg[wave="upward"] {
    align-self: flex-end;
  }

  > svg[wave="downward"] {
    align-self: flex-start;
  }
}

deckgo-deck.papyrus [slot="background"] {
  > svg[wave] {
    position: absolute;
  }

  > svg[wave="upward"] {
    bottom: 0;
  }

  > svg[wave="downward"] {
    top: 0;
  }
}

/* Reveal */

deckgo-slide-split deckgo-reveal > * {
  height: calc(100% - 32px);
}

deckgo-deck deckgo-reveal {
  width: 100%;
  margin: 16px 0;
}

deckgo-deck deckgo-reveal h1,
deckgo-deck deckgo-reveal h2,
deckgo-deck deckgo-reveal h3,
deckgo-deck deckgo-reveal section,
deckgo-deck deckgo-reveal deckgo-highlight-code,
deckgo-deck deckgo-reveal deckgo-math,
deckgo-deck deckgo-reveal deckgo-markdown,
deckgo-deck deckgo-reveal deckgo-lazy-img[slot] {
  margin: 0 auto;
}

deckgo-deck ol,
deckgo-deck ul,
deckgo-reveal-list {
  list-style-position: inside;
  --reveal-list-style-position: inside;
}

deckgo-deck ul {
  list-style-type: disc;
}

deckgo-deck ol {
  list-style-type: decimal;
}

/* User select not inherited in Firefox  */
deckgo-deck .deckgo-slide-container * {
  -moz-user-select: text;
}
