@layer components {
  .app-header__menu,
  /* kebab wrapper on entity / match hero navs — anchors the same
     `.dropdown-menu` (top: 100%; right: 0) used by the home header. */
  .kebab-menu {
    position: relative;
  }

  .dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    display: none;
    z-index: 100;
    transform-origin: top right;
  }

  .dropdown-menu--open {
    display: block;
    animation: dropdown-menu-in 140ms var(--easing-default);
  }

  .dropdown-menu__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: var(--weight-medium);
    text-align: left;
    cursor: pointer;
  }

  .dropdown-menu__item:active {
    background: var(--color-surface-hover);
  }

  .dropdown-menu__item:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
  }

  .dropdown-menu__item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--color-text-muted);
    fill: none;
  }

  .dropdown-menu__divider {
    height: 1px;
    margin: 4px 0;
    background: var(--color-border-subtle);
  }

  /* Pill switch indicator (inside a dropdown__item) */
  .dropdown-menu__pill {
    width: 36px;
    height: 20px;
    margin-left: auto;
    flex-shrink: 0;
    background: var(--color-bg);
    border-radius: 10px;
    position: relative;
    transition: background var(--duration-fast) var(--easing-default);
  }

  .dropdown-menu__pill::after {
    content: "";
    width: 16px;
    height: 16px;
    background: var(--color-text);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform var(--duration-fast) var(--easing-default);
  }

  .dropdown-menu__pill--active {
    background: var(--color-accent);
  }

  .dropdown-menu__pill--active::after {
    transform: translateX(16px);
  }

  @media (prefers-reduced-motion: reduce) {
    .dropdown-menu__pill,
    .dropdown-menu__pill::after {
      transition: none;
    }
  }

  @keyframes dropdown-menu-in {
    from {
      opacity: 0;
      transform: scale(0.96) translateY(-4px);
    }

    to {
      opacity: 1;
      transform: scale(1) translateY(0);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .dropdown-menu--open {
      animation: none;
    }
  }
}
