@import "./variables.css";

/**
 * UNITS footer components
 *
 * ==================================
 * @base:   [.uc-footer]
 * ==================================
 * @parts:  [.uc-***]
 *          [.uc-***]
 * ==================================
 * @option: [._***]
 *          [._***]
 * ==================================
 */

.uc-footer {
  padding: 80px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: white;
  text-align: center;

  @media (--small-viewport) {
    padding: 56px 20px;
  }

  > p {
    margin: 24px 0 0;
    font-size: .875rem;
    line-height: 1.8;

    @media (--small-viewport) {
      margin: 32px 0 0;
      font-size: .75rem;
    }

    & + p {
      margin: 16px 0 0;
    }
  }

  > small {
    display: block;
    font-size: .75rem;
    margin: 48px 0 0;

    @media (--small-viewport) {
      margin: 32px 0 0;
      font-size: .625rem;
    }
  }

  &._dark {
    background-color: var(--color-dark);
  }

  &._black {
    background-color: color(black a(.92));
  }

  &._dark,
  &._black {
    > p,
    > small,
    a {
      color: color(white a(.5));
    }
  }
}

.uc-footer-logo {
  font-size: 2rem;
  line-height: 1;
  font-weight: bold;
  margin: 56px 0 0;

  > cite {
    font-style: normal;
  }

  ._dark &,
  ._black & {
    color: white;
  }
}

.uc-footer-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style-type: none;

  @media (--small-viewport) {
    width: 100%;
    margin: -16px 0 0;
  }

  > a {
    display: block;
    margin: 0 16px;
    position: relative;
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    transition: opacity .35s var(--Hover_easeOut);

    @media (--small-viewport) {
      width: 100%;
      margin: 0;
      padding: 16px 24px;
      border-bottom: 1px solid color(white a(.08));
    }

    ._dark &,
    ._black & {
      color: color(white a(.8));
    }

    &:hover {
      opacity: .7;
    }

    &:after {
      content: " ";
      display: inline-block;
      width: 1px;
      height: 16px;
      background-color: var(--color-black);
      position: absolute;
      top: 50%;
      right: -16px;
      margin-top: -8px;

      @media (--small-viewport) {
        display: none;
      }

      ._dark &,
      ._black & {
        background-color: color(white a(.3));
      }
    }

    &:first-child {
      margin-left: 0;
    }

    &:last-child {
      margin-right: 0;
    }

    &:last-child:after {
      display: none;
    }
  }
}
