// This file contains the styles used for tweaking how ReadTheDoc's embedded
// contents would show up inside the theme.

#furo-sidebar-ad-placement
  padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)
  .ethical-sidebar
    // Remove the border and box-shadow.
    border: none
    box-shadow: none
    // Manage the background colors.
    background: var(--color-background-secondary)
    &:hover
      background: var(--color-background-hover)
    // Ensure the text is legible.
    a
      color: var(--color-foreground-primary)

  .ethical-callout a
    color: var(--color-foreground-secondary) !important

#furo-readthedocs-versions
  position: static
  width: 100%
  background: transparent
  display: block

  // Make the background color fit with the theme's aesthetic.
  .rst-versions
    background: rgb(26, 28, 30)

  .rst-current-version
    cursor: unset
    background: var(--color-sidebar-item-background)
    &:hover
      background: var(--color-sidebar-item-background)
    .fa-book
      color: var(--color-foreground-primary)

  > .rst-other-versions
    padding: 0
    small
      opacity: 1

  .injected
    .rst-versions
      position: unset

  &:hover,
  &:focus-within
    box-shadow: 0 0 0 1px var(--color-sidebar-background-border)

    .rst-current-version
      // Undo the tweaks done in RTD's CSS
      font-size: inherit
      line-height: inherit
      height: auto
      text-align: right
      padding: 12px

      // Match the rest of the body
      background: #1a1c1e

      .fa-book
        float: left
        color: white

    .fa-caret-down
      display: none

    .rst-current-version,
    .rst-other-versions,
    .injected
      display: block

    > .rst-current-version
      display: none
