/* For Sponsorship banner defined in overrides/main.html */

.md-banner {
  display: none;
}

.sidebar-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--sponsorship-banner-typeset-a-color);
  width: 12.1rem;
  background-color:#76CFE545;
  padding: 0.8rem;
  margin-bottom: 1rem;
  margin-left: 0.8rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.21);
  border-radius: 0.8rem;
  border: 1px solid  var(--color-nav2-light-blue);

  .sponsorship-banner {
    font-size: 0.7rem;
    line-height: 1rem;

    h3 {
      margin: 0rem 0rem 0.5rem 0rem;
    }
  }

  .sponsorship-banner-button {
    color:white;
    background: var(--color-nav2-blue);
    padding: 0.4rem 0.8rem;
    border-radius: 0.3rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.65rem;
    text-align: center;

    &:hover {
      color: white;
      background: var(--color-nav2-light-blue);
    }
  }

  .sponsorship-banner-button--fallback {
    display: none;
  }

  .sponsorship-expanded-banner-logo {
    width: 10rem;
    margin: 0.8rem 0 0.5rem;

    @media screen and (min-height: 740px) and (max-height: 799px) {
      width: 8rem;
    }
    @media screen and (min-height: 670px) and (max-height: 739px) {
      width: 6rem;
    }
  }

  @media screen and (max-height: 669px) {
    .sponsorship-expanded-banner-logo {
      display: none;
    }

    .sponsorship-expanded-banner-button {
      display: none;
    }

    .sponsorship-banner-button--fallback {
      display: inline-block;
    }
  }

  .sponsorship-expanded-banner-button {
    color:white;
    background: var(--color-nav2-blue);
    padding: 0.5rem 1.6rem;
    border-radius: 0.3rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.76rem;
    text-align: center;

    &:hover {
      color: white;
      background: var(--color-nav2-light-blue);
    }
  }
}

/* Small screen <960px */
/* 959.75px = 59.984rem */
@media screen and (max-width: 59.9844em) {

  .md-banner {
    display: block;
    color: var(--color-nav2-gray);
    background-color: var(--color-nav2-light-blue);
    border-bottom: 1px solid #6BBED3;

    .sponsorship-banner {
      margin-right: 1rem;
      line-height: 1rem;
      font-size: 0.7rem;

      /* 480px */
      @media screen and (max-width: 30em) {
        margin-right: 0.1rem;
      }
    }

    .sponsorship-banner-button {
      color:white;
      background: var(--color-nav2-gray);
      padding: 0.3rem 0.6rem;
      border-radius: 0.3rem;
      text-decoration: none;
      font-weight: bold;
      font-size: 0.7rem;
      text-align: center;
      white-space: nowrap;
      line-height: 1.5rem;

      &:hover {
        color: white;
        background:#4e4e4e;
      }
    }
  }

  .md-banner__inner {
    text-align: center;
    margin: 0.5rem auto;
  }
}

/* Disable toc if full-size sponsorship banner is used */
.md-sidebar__scrollwrap--empty {
  display: none !important;
}
