/* The slim footer of the member's account pages (views/partials/footer-slim.php): graphite, one row.
   The copyright on the left and the legal links on the right; on phones the links fold into a Legal list
   that opens upwards (site.js toggles aria-expanded on its button). */

.footer-slim {
  --focus-ring: 0 0 0 var(--sp-1) var(--c-focus-ring-on-dark);
  font-size: var(--fs-small);
  color: var(--c-on-dark-muted);
  background-color: var(--c-dark);
}

.footer-slim__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-block: var(--sp-4);
}

/* Up to 991px: the header's 24px edges, so the footer lines up with the menu. */
@media (max-width: 991.98px) {
  .footer-slim__inner {
    max-width: none;
    padding-inline: var(--sp-6);
  }
}

.footer-slim__legal {
  position: relative;
}

.footer-slim__button {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  color: var(--c-on-dark-muted);
  border: var(--border-1) solid var(--c-line-on-dark);
  border-radius: var(--radius-pill);
}

.footer-slim__button .bi {
  transition: transform var(--duration-fast) var(--ease);
}

.footer-slim__button[aria-expanded="true"] .bi {
  transform: rotate(180deg);
}

/* Phones: the links in a white list above the Legal button. */
.footer-slim__links {
  position: absolute;
  right: 0;
  bottom: calc(100% + var(--sp-2));
  min-width: var(--menu-w);
  padding: var(--sp-2);
  background-color: var(--c-page);
  border: var(--border-1) solid var(--c-line);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
}

[aria-expanded="false"] + .footer-slim__links {
  display: none;
}

.footer-slim__link {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  color: var(--c-text);
  text-decoration: none;
  border-radius: var(--radius-1);
}

.footer-slim__link:hover {
  color: var(--c-accent-text);
  background-color: var(--c-accent);
}

/* From 768px: no button, the links in a row on the graphite. */
@media (min-width: 768px) {
  .footer-slim__inner {
    padding-block: var(--sp-6);
  }

  .footer-slim__button {
    display: none;
  }

  .footer-slim__links,
  [aria-expanded="false"] + .footer-slim__links {
    position: static;
    display: flex;
    gap: var(--sp-6);
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .footer-slim__link {
    padding: 0;
    color: var(--c-on-dark-muted);
  }

  .footer-slim__link:hover {
    color: var(--c-on-dark);
    background: none;
  }
}
