/* Keep the visible menu sequence and keyboard reading order together. */
.footer_component .footer_grid {
  grid-template-areas: none;
  grid-template-rows: none;
}

@media screen and (max-width: 767px) {
  .footer_component .footer_primary-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }

  .footer_component .footer_secondary-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .footer_component .footer_mid-links--wide {
    grid-column: 1 / -1;
  }

  .footer_component .footer_mid-links,
  .footer_component .footer_links {
    min-width: 0;
    width: 100%;
    gap: 0.5rem;
  }

  .footer_component .footer_subheading {
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  /* Page exports clamp footer links to one line; mobile menus need the full label. */
  .footer_component .footer_link {
    display: block;
    min-height: 1.75rem;
    padding-block: 0.125rem;
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    line-height: 1.5;
  }

  .footer_component .footer_bot-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.5rem;
    align-items: start;
  }

  .footer_component .footer_socials {
    flex-wrap: nowrap;
    gap: 0.75rem;
    justify-content: flex-start;
  }

  .footer_component .footer_social {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
  }
}

.footer_component .footer_ask-ai {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.footer_component .footer_ask-ai-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.footer_component .footer_ask-ai-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border--secondary, #cab7ff1a);
  border-radius: 0.5rem;
  color: var(--text--primary, #fff);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer_component .footer_ask-ai-link svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

.footer_component .footer_ask-ai-link:hover {
  opacity: 0.6;
}

.footer_component .footer_ask-ai-link:focus-visible {
  outline: 0.125rem solid #4d65ff;
  outline-offset: 0.125rem;
}

@media screen and (max-width: 767px) {
  .footer_component .footer_ask-ai {
    flex-direction: column;
    align-items: stretch;
  }

  .footer_component .footer_ask-ai-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.25rem;
  }

  .footer_component .footer_ask-ai-link {
    flex: 0 1 2.125rem;
    width: auto;
    min-width: 1.5rem;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .footer_component .footer_ask-ai-link svg {
    width: 55%;
    height: auto;
  }
}
