/* The Products menu in the top navigation. Every marketing page styles [data-component="top"] itself; this file
   only adds what the menu needs, so it looks the same on the home page, the product pages, Zen and Enterprise. */
[data-component="top"] [data-component="nav-products"] {
  position: relative;

  > button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--color-text-strong);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  > button:hover {
    text-decoration: underline;
    text-underline-offset: var(--space-1);
    text-decoration-thickness: 1px;
  }

  [data-slot="menu"] {
    display: none;
    position: absolute;
    top: calc(100% + 18px);
    left: -16px;
    min-width: 21rem;
    padding: 8px;
    background: var(--color-background);
    border: 1px solid var(--color-border-weak);
    border-radius: 6px;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.25);
    z-index: 20;

    a {
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 10px 12px;
      border-radius: 4px;
      text-decoration: none;
      line-height: 1.5;

      strong {
        font-weight: 600;
        color: var(--color-text-strong);
        display: flex;
        align-items: center;
        gap: 8px;
      }

      span {
        color: var(--color-text-weak);
        font-size: 0.875em;
      }

      [data-badge] {
        font-size: 0.6875rem;
        font-weight: 500;
        letter-spacing: 0.02em;
        padding: 1px 6px;
        border-radius: 3px;
        border: 1px solid var(--color-border-weak);
        color: var(--color-text-weak);
      }
    }

    a:hover {
      background: var(--color-background-weak);
      text-decoration: none;
    }

    [data-slot="all"] {
      margin-top: 4px;
      border-top: 1px solid var(--color-border-weak);
      border-radius: 0 0 4px 4px;
      color: var(--color-text);
    }
  }

  /* Opens on hover and keyboard focus without JavaScript, and stays open after a click on touch screens. */
  &:hover [data-slot="menu"],
  &:focus-within [data-slot="menu"],
  &[data-open] [data-slot="menu"] {
    display: block;
  }

  /* Bridges the gap between the button and the menu so the hover doesn't drop. */
  &:hover::after,
  &[data-open]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 20px;
  }
}

[data-component="top"] [data-component="nav-mobile-menu-list"] li a span {
  display: block;
  font-size: 0.8125em;
  color: var(--color-text-weak);
}
