/* The footer on a phone: each column folds away behind its heading.

   Compiled on its own into _common/css/footer-accordion.css and linked from
   the master page, because main.css is a Compass build we cannot regenerate.

   Everything here is behind .has-footer-accordion, which the script adds, so
   with no script the footer stays open exactly as it was. */
@media all and (max-width: 767px) {
  .has-footer-accordion .mastfooter-nav {
    padding-top: 24px;
    padding-bottom: 24px;
  }
  .has-footer-accordion .mastfooter-nav__col--foldable {
    width: 100% !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    /* the heading becomes the control, with the sign on the right; the column
       draws the one hairline under it, so the heading gives up its own */
  }
  .has-footer-accordion .mastfooter-nav__col--foldable > header {
    position: relative;
    display: block;
    margin: 0;
    padding: 15px 34px 15px 0;
    border-bottom: 0 !important;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
  }
  .has-footer-accordion .mastfooter-nav__col--foldable > header::before, .has-footer-accordion .mastfooter-nav__col--foldable > header::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 4px;
    width: 13px;
    height: 2px;
    margin-top: -1px;
    background-color: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .has-footer-accordion .mastfooter-nav__col--foldable > header {
    /* the upright of the plus, which lies down to make a minus */
  }
  .has-footer-accordion .mastfooter-nav__col--foldable > header::after {
    transform: rotate(90deg);
  }
  .has-footer-accordion .mastfooter-nav__col--foldable > ul {
    display: none !important;
    margin: 0 !important;
    padding: 0 0 10px;
  }
  .has-footer-accordion .mastfooter-nav__col--foldable.is-open > ul {
    display: flex !important;
  }
  .has-footer-accordion .mastfooter-nav__col--foldable.is-open > header::after {
    transform: rotate(0deg);
    opacity: 0;
  }
  .has-footer-accordion {
    /* the last column already ends in a hairline, so the legal strip below
       does not draw a second one */
  }
  .has-footer-accordion .mastfooter-bottom__content {
    border-top: 0 !important;
  }
  .has-footer-accordion {
    /* the columns that share a row on a phone each take the full width instead */
  }
  .has-footer-accordion .mastfooter-nav__col--foldable li {
    width: 100% !important;
    padding-right: 0 !important;
  }
  .has-footer-accordion .mastfooter-nav__col--foldable > ul {
    flex-direction: column;
  }
  .has-footer-accordion .mastfooter-nav__col--foldable li a {
    display: block;
    padding: 6px 0;
  }
}
