/* Add the supplied brand mark without changing the existing wordmark text. */
.nav-logo {
  align-items: center;
  display: inline-flex;
  min-height: 31px;
  padding-left: 39px;
  position: relative;
  white-space: nowrap;
}

.nav-logo::before {
  background-image: url("/bloom-logo-transparent.png");
  background-position: -15.72px -4.83px;
  background-repeat: no-repeat;
  background-size: 61.8px 61.8px;
  content: "";
  height: 31px;
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 31px;
}

/* The top navigation is hidden on phones, so keep the footer wordmark branded. */
@media (max-width: 768px) {
  .footer-logo,
  .footer-brand {
    align-items: center;
    display: inline-flex;
    min-height: 24px;
    padding-left: 30px;
    position: relative;
  }

  .footer-logo::before,
  .footer-brand::before {
    background-image: url("/bloom-logo-transparent.png");
    background-position: -12.18px -3.74px;
    background-repeat: no-repeat;
    background-size: 47.84px 47.84px;
    content: "";
    height: 24px;
    left: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
  }
}

/* Keep the expanded public navigation comfortable on desktops and tablets. */
.nav-links {
  gap: clamp(10px, 1.2vw, 20px);
}

.nav-links a {
  font-size: 12px;
  white-space: nowrap;
}

.footer-links {
  flex-wrap: wrap;
}

.footer-contact {
  color: rgba(250, 247, 242, 0.65);
  text-decoration: none;
}

.footer-contact:hover {
  text-decoration: underline;
}

@media (min-width: 1161px) {
  body > nav:not(.bottom-nav) {
    padding-left: clamp(24px, 3vw, 40px);
    padding-right: clamp(24px, 3vw, 40px);
  }
}

@media (max-width: 1160px) {
  .has-bottom-nav {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .has-bottom-nav > nav:not(.bottom-nav) {
    justify-content: center;
    padding-left: 24px;
    padding-right: 24px;
  }

  .has-bottom-nav .nav-links {
    display: none;
  }

  .has-bottom-nav .bottom-nav {
    background: var(--white);
    border-top: 1px solid #e8e0da;
    display: flex;
    height: calc(64px + env(safe-area-inset-bottom));
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 24px env(safe-area-inset-bottom);
    z-index: 200;
  }

  .has-bottom-nav .bottom-nav-item {
    align-items: center;
    color: var(--text-soft);
    display: flex;
    flex: 1;
    flex-direction: column;
    font-size: 10px;
    font-weight: 500;
    gap: 4px;
    justify-content: center;
    letter-spacing: 0.04em;
    padding: 10px 0 8px;
    text-decoration: none;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .has-bottom-nav .bottom-nav-item svg {
    height: 22px;
    width: 22px;
  }

  .has-bottom-nav .bottom-nav-item.active {
    color: var(--forest);
  }

  .has-bottom-nav .bottom-nav-item.tab-join {
    color: var(--gold);
    font-weight: 600;
  }

  .has-bottom-nav .toast {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

/* Social links share each footer's text colour. */
.footer-social a {
  color: inherit;
  text-decoration: none;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  text-decoration: underline;
}
