#footer {
  background-color: var(--sws-primary-gray);
  display: flex;
  text-align: center;
  font-size: 16px;
  padding: 40px 3%;
  justify-content: center;
  margin-top: 32px;

  & * {
    /* HACK: because universal selector is used in custom_sws stylesheet */
    font-size: 16px !important;
    color: white !important;
  }

  a {
    &:hover {
      text-decoration: underline;
    }
  }

  #footer-container {
    margin: 1rem 0 3rem 0;
    max-width: var(--sws-content-max-width);
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }
}

#footer-links,
#footer-labels,
#footer-extras {
  padding-inline: 0;
}

#footer-links {
  display: flex;
  gap: 24px;
  flex-direction: column;
  text-align: start;

  & > div {
    display: flex;
    flex-direction: column;
  }

  & .col-header,
  & .mobile-hidden .col-header {
    font-weight: bolder;
    margin-bottom: 1rem;
  }
}

#footer-labels {
  .footer-labels-wrapper {
    align-items: center;
    justify-content: center;
    margin: 1rem 0 3rem 0;

    .footer-label-container {
      display: flex;
      padding: 20px;
      justify-content: center;

      img {
        width: 100%;
        max-width: 140px;
        max-height: 75px;
      }
    }
  }
}

#footer-extras {
  display: flex;
  justify-content: space-between;
  flex-direction: row;

  #footer-copyright {
    text-align: left;
    order: 2;
  }

  #footer-socialmedia {
    gap: 16px;
    display: flex;
    justify-content: center;
    order: 1;
  }

  #footer-slogans {
    text-align: right;
    order: 3;

    & > div {
      display: none;

      &.active {
        display: block;
      }
    }
  }
}

/* ------------------------- Mobile ------------------------------------ */

@media (max-width: 767px) {
  #footer-links {
    text-align: center;
  }

  #footer-extras {
    flex-direction: column;
    gap: 16px;

    #footer-copyright,
    #footer-socialmedia,
    #footer-slogans {
      text-align: center;
    }
  }

  .mobile-hidden {
    display: none !important;
  }
}

/* ------------------------- Tablet ------------------------------------ */

@media (min-width: 768px) {
  #footer {
    #footer-links {
      flex-direction: row;

      & > div {
        width: 25%;
        align-items: flex-start;
      }
    }

    #footer-extras {
      flex-wrap: wrap;

      #footer-copyright,
      #footer-slogans {
        flex: 0 0 50%;
      }

      #footer-socialmedia {
        flex: 0 0 100%;
        margin-bottom: 16px;
      }
    }
  }
}

/* ------------------------- Desktop ------------------------------------ */

@media (min-width: 992px) {
  #footer {
    #footer-extras {
      align-items: center;
      flex-wrap: nowrap;

      #footer-copyright {
        order: 1;
      }

      #footer-socialmedia {
        order: 2;
      }

      #footer-copyright,
      #footer-socialmedia,
      #footer-slogans {
        flex: 1;
      }
    }
  }
}
