////
///Placeholder for Copyright ///
////

// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------

// Footer
.md-footer {
  color: var(--md-footer-fg-color);
  background-color: var(--md-footer-bg-color);

  // [print]: Hide footer
  @media print {
    display: none;
  }

  // Footer wrapper
  &__inner {
    padding: px2rem(4px);
    overflow: auto;
  }

  // Footer link to previous and next page
  &__link {
    display: flex;
    padding-top: px2rem(28px);
    padding-bottom: px2rem(8px);
    outline-color: var(--md-accent-fg-color);
    transition: opacity 250ms;

    // [tablet +]: Adjust width to 50/50
    @include break-from-device(tablet) {
      width: 50%;
    }

    // Footer link on focus/hover
    &:focus,
    &:hover {
      opacity: 0.7;
    }

    // Footer link to previous page
    &--prev {
      float: left;

      // [mobile -]: Adjust width to 25/75 and hide title
      @include break-to-device(mobile) {
        width: 25%;

        // Hide footer title
        .md-footer__title {
          display: none;
        }
      }

      // Adjust for right-to-left languages
      [dir="rtl"] & {
        float: right;

        // Flip icon vertically
        svg {
          transform: scaleX(-1);
        }
      }
    }

    // Footer link to next page
    &--next {
      float: right;
      text-align: right;

      // [mobile -]: Adjust width to 25/75
      @include break-to-device(mobile) {
        width: 75%;
      }

      // Adjust for right-to-left languages
      [dir="rtl"] & {
        float: left;
        text-align: left;

        // Flip icon vertically
        svg {
          transform: scaleX(-1);
        }
      }
    }
  }

  // Footer title
  &__title {
    position: relative;
    flex-grow: 1;
    max-width: calc(100% - #{px2rem(48px)});
    padding: 0 px2rem(20px);
    font-size: px2rem(18px);
    line-height: px2rem(48px);
  }

  // Footer link button
  &__button {
    margin: px2rem(4px);
    padding: px2rem(8px);
  }

  // Footer link direction (i.e. prev and next)
  &__direction {
    position: absolute;
    right: 0;
    left: 0;
    margin-top: px2rem(-20px);
    padding: 0 px2rem(20px);
    font-size: px2rem(12.8px);
    opacity: 0.7;
  }
}

// Footer metadata
.md-footer-meta {
  background-color: var(--md-footer-bg-color--dark);

  // Footer metadata wrapper
  &__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: px2rem(4px);
  }

  // Lighten color for non-hovered text links
  html &.md-typeset a {
    color: var(--md-footer-fg-color--light);

    // Text link on focus/hover
    &:focus,
    &:hover {
      color: var(--md-footer-fg-color);
    }
  }
}

// Footer copyright and theme information
.md-footer-copyright {
  width: 100%;
  margin: auto px2rem(12px);
  padding: px2rem(8px) 0;
  color: var(--md-footer-fg-color--lighter);
  font-size: px2rem(12.8px);

  // [tablet portrait +]: Show copyright and social links in one line
  @include break-from-device(tablet portrait) {
    width: auto;
  }

  // Footer copyright highlight - this is the upper part of the copyright and
  // theme information, which will include a darker color than the theme link
  &__highlight {
    color: var(--md-footer-fg-color--light);
  }
}

// Footer social links
.md-footer-social {
  margin: 0 px2rem(8px);
  padding: px2rem(4px) 0 px2rem(12px);

  // [tablet portrait +]: Show copyright and social links in one line
  @include break-from-device(tablet portrait) {
    padding: px2rem(12px) 0;
  }

  // Footer social link
  &__link {
    display: inline-block;
    width: px2rem(32px);
    height: px2rem(32px);
    text-align: center;

    // Adjust line-height to match height for correct alignment
    &::before {
      line-height: 1.9;
    }

    // Fill icon with current color
    svg {
      max-height: px2rem(16px);
      vertical-align: -25%;
      fill: currentColor;
    }
  }
}
